What is a Teradata AMP?
Teradata AMP (Access Module Processor) is a critical component in the Teradata system, responsible for managing and processing its data share. Each AMP operates as a Linux process, ensuring the even distribution of data rows across all AMPs using a hashing algorithm. Teradata systems, being shared-nothing architectures, distribute data to virtual processes, with each AMP having its own main memory and logical disk. A Teradata node usually runs hundreds of AMPs simultaneously.
What are the tasks of a Teradata AMP?
A Teradata AMP is responsible for various tasks related to its data rows, such as reading and storing, aggregating, performing joins, locking, sorting, disk space management, and font conversion when creating a result set.
What is a Teradata AMP Worker Task (AWT)?
An AMP can assign received plan steps to one of its 80 available AMP worker tasks, enabling parallel execution within the AMP itself. AWTs are specialized for different types of tasks based on their assignment. Some AWTs handle new work, others continue ongoing tasks, and some are exclusively reserved for tactical workloads.
Different workload types necessitate varying numbers of AMP worker tasks. For example, a SQL statement typically requires 1-2 AWTs per AMP, whereas a Teradata Fastload needs 3 AWTs in the acquisition phase and 1 AWT in the apply phase, all per AMP. The number of parallel running fastloads and multiloads is limited, but the default setting can be adjusted. Each AMP reserves 24 AWTs for internal work to prevent blocking and deadlock situations.
What happens when all AMP Worker Tasks of an AMP are in use?
When all AWTs of an AMP are in use, additional tasks are queued in a message queue with limited memory. If the message queue is full, the AMP notifies the parsing engine, which then aborts the task on all AMPs and retries after a brief pause. This process, called flow control mode, repeats until the AMP has available AWTs for the task, potentially impacting the performance of the entire Teradata system.
Are all Teradata AMPs always involved in a request?
Teradata AMPs can be utilized individually, in groups, or altogether to execute tasks, including retrieving steps, join steps, and others. Single AMP operations include accessing rows via the Primary or Unique Secondary Index (USI). Full table scans and most joins require all AMPs, while group AMP or single AMP joins may require fewer.
What happens if an AMP crashes?
Teradata AMPs provide redundant access to data rows, ensuring data safety during an AMP crash. Modern Teradata Intelliflex systems activate FALLBACK protection, where a backup AMP replaces the crashed AMP. If an entire node crashes, AMPs can migrate to another node. However, it is common practice to immediately have a hot standby node available for use in case of problems.