Share

Understanding Teradata Flow Control Mode for Efficient Workflow Management

Understanding Teradata Flow Control Mode for Efficient Workflow Management
admin3

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.


Want more practical data engineering analysis like this?

Join DWHPro Letters and get field-tested notes on Teradata, Snowflake, AI, migrations, performance, and enterprise data work. Early subscribers keep launch access before the paid plan launches.

Get the next issue


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.

Get the next issue by email.

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.


Planning or surviving an enterprise data platform migration?

I write regularly about the performance, cost, architecture, and project mistakes that show up in real Teradata, Snowflake, Databricks, and enterprise data work.

Subscribe before the paid plan launches and keep launch access.

Written by Roland Wenzlofsky, founder of DWHPro and author of Teradata Query Performance Tuning. DWHPro has helped data warehouse practitioners for 15+ years.

Subscribe to DWHPro Letters

Practical field notes on enterprise data engineering, production AI systems, platform migration, and the senior engineering market.
Written by Roland Wenzlofsky Founder of DWHPro Author of Teradata Query Performance Tuning
Get the next issue
Subscribe