Forum

Teradata AMP Flow C...
 

Teradata AMP Flow Control Mode  

  RSS

Roland Wenzlofsky
(@rwenzlofsky)
Estimable Member
Joined: 6 years ago
Posts: 203
09/03/2014 5:23 pm  

Teradata manages the flow of work in a scalable and decentralized way, on each AMP. Each AMP handles all the workload assigned to it on its own. Each AMP keeps track of the amount of work it accepted, how much work is active, and how much work is waiting in a queue to be executed.

Flow control mode happens, when the workload on an AMP reaches a certain limit. It will decline any further work assigned to it by the parsing engine. The state of an AMP not allowing any further work is called flow control.

In flow control mode, the AMP will decline any newly arriving messages, which can be, for example, new work, rows being sent by other AMPs, or internal system work.

Any message arriving on an AMP tries to get an AMP worker task to fulfill the required task.  In the case of an All-AMP operation, such as a full table scan, it might happen that not all AMPs have free AMP worker tasks available.

Messages received by an AMP can be queued, and not all AMPs have to begin immediately to work on the All-AMP task.

Still, the message queues on each AMP can only hold a limited amount of messages per work type (new work, second level work, such as row distribution, etc.). Grouping queue messages by work type is used to prioritize them. New work, for example, is not as important as ongoing work which is needed to finish an already started task.

When any of the message queues reaches the limit, further messages of the work type are no longer accepted. The dispatcher is informed by the AMP and will retry to send the messages until the AMP finally accepts them again. If only one AMP closes the gates, none of the AMPs will accept further work for the same message.

One or more AMPs in the state of flow control usually are a sign of system overload. Proper workload management has to be applied to bring the AMPs back to a normal state.

Flow control mode can cause severe performance problem if it happens repeatedly and over an extended period. Single occasions of flow control every once in a while and for a couple of seconds are acceptable.

Frequent flow control situations over an extended period should be analyzed in detail.

Below is a simple test query, which gives detailed information about flow control on a Teradata system.

It delivers, per sample period (i.e. the end of the period),  the maximum tasks of type "new task," "continued task," the size of jobs queued, the number of flow control events and the maximum parallel flow control events which occurred during the 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'2014-01-01' AND DATE
GROUP BY  1,2

Questions?
If you have any questions about all this, please ask in the comments! I’ll be paying close attention and answering as many as I can. Thank you for reading. Whatever this blog has become, I owe it all to you.

This topic was modified 7 days ago by DWH Pro Admin

Quote
PB
 PB
(@PB)
Guest
Joined: 2 years ago
Posts: 1
11/08/2017 6:34 pm  

Hi Ronald - Thanks so much for explaining this topic in a very simple manner.


ReplyQuote
Share:
>

Please Login or Register