Introduction
Teradata efficiently manages complex workflows by distributing and expanding processes across numerous AMPs. However, when an AMP’s maximum capacity is reached, it can initiate flow control mode. This blog post delves into Teradata’s Flow Control Mode, its impact on performance, and effective monitoring and management strategies.
How It Works
Teradata’s decentralized architecture distributes workload to individual AMPs, which operate autonomously and monitor their workload by tracking active and queued tasks and the overall amount of work accepted.
When an AMP’s workload exceeds a set limit, it activates flow control mode, which causes the AMP to refuse additional tasks assigned by the parsing engine. The AMP rejects new messages in this mode, such as work assignments, row distributions from other AMPs, and internal system tasks.
Upon receiving a message, an AMP attempts to assign an AMP worker task for processing. Nevertheless, in the case of an All-AMP operation such as a full table scan, not every AMP may have available worker tasks. Messages are subject to being queued, enabling certain AMPs to postpone processing while others focus on the All-AMP task.
The message queue of every AMP has limitations for various types of work, such as new tasks, second-level tasks, and row distribution. These types of work help prioritize tasks, giving precedence to ongoing tasks over new assignments.
When a message queue is full, additional messages of that category are rejected. The dispatcher is alerted and will persistently retry sending the messages until the AMP ultimately accepts them. If any AMP reaches capacity, no other AMPs will receive additional work for that particular message type.
When AMPs enter flow control mode, it may indicate system overload, requiring efficient workload management to restore normal operation. Although infrequent and brief flow control incidents are tolerable, repeated and prolonged ones can result in significant performance complications. In such situations, comprehensive analysis is necessary to identify and resolve the underlying issue.
The following query yields information on flow control in a Teradata system, including the maximum number of tasks, queued jobs, flow control events, and parallel flow control events for each sample period.
SELECT
TheDate
,TheTime
,MAX(WorkTypeMax00) AS max_wrk0
,MAX(WorkTypeMax01) AS max_wrk1
,MAX(MailBoxDepth / CollectIntervals)
,SUM(FlowControlled)
,MAX(FlowCtlCnt)
FROM DBC.ResusageSAWT
WHERE TheDATE BETWEEN DATE'2023-01-01' AND DATE
GROUP BY 1,2
Conclusion
Understanding the function and impact of Teradata Flow Control Mode is crucial for managing workflows and achieving optimal performance in a Teradata data warehouse. By understanding flow control mode and its significance, administrators can effectively monitor and manage workloads, minimize disruptions, and sustain peak efficiency. Promptly addressing system overloads by monitoring flow control events ensures a robust, reliable, high-performing data warehouse solution.
Related Services
🔧 Need Expert Database Administration?
Our team brings 25+ years of enterprise DBA experience across Teradata, Snowflake, and Oracle.
Meet Our Team →📋 Considering a Move From Teradata?
Get a personalized migration roadmap in 2 minutes. We have migrated billions of rows from Teradata to Snowflake, Databricks, and more.
Free Migration Assessment →
Hi DWHPro staffs,
I was trying to run the below sql, but it complained about CollectIntervals column does not exist. So what is the correct column name for this sql instead of CollectIntervals column?
Thanks and Regards
Vianh Cao
SELECT
TheDate
,TheTime
,MAX(WorkTypeMax00) AS max_wrk0
,MAX(WorkTypeMax01) AS max_wrk1
,MAX(MailBoxDepth / CollectIntervals)
,SUm(FlowControlled)
,MAX(FlowCtlCnt)
FROM DBC.ResusageSAWT
WHERE TheDATE between ‘2022-07-11’ and ‘2022-07-15’
GROUP BY 1,2;
Hi Ronald – Thanks so much for explaining this topic in a very simple manner.