Quantcast
Channel: Teradata Developer Exchange - Blog activity for carrie's blog
Viewing all articles
Browse latest Browse all 1058

Reserved AMP Worker Tasks Exclusively for Utility Jobs, Maybe - blog entry by carrie

$
0
0
Cover Image: 

Teradata is a message passing system.  Messages are sent from parsing engines to AMPs, and from  AMPs to AMPs, and from AMPs to parsing engines.  That’s the key way that components in a shared nothing architecture pass data and work requests among themselves.

When a message arrives on an AMP and the message represents work that needs to get done on the AMP, that message is assigned a“work type”, depending on the importance of the work-to-be-done.  There are 16 different work types supported:  Work00 to Work15.      

Under usual conditions, all load utility jobs and all queries run using AMP worker tasks (AWTs) of the same message work types:  Work00, Work01, and Work02.  However, if you increase AWTs per AMP above a certain threshold, then all your utility jobs will be assigned to different work types and given their own reserve pools.   

If you are someone who monitors or is otherwise interested in AWTs and how they are being used, this posting describes changes related to your utility jobs, and what options you have for managing these changes.

The thinking behind this feature is this:  If you have a high number of AWTs per AMP defined, then it helps balance the work on your platform if some subset of these AWTs are reserved for load utility work exclusively. That way neither queries nor load jobs will be competing for AWTs against each other should there be a shortage.

The Threshold of AWTs/AMP that Triggers this Change

DBS Control parameter MaxAMPWorkerTasks defines the number of AMP worker tasks that each AMP in your configuration will be assigned at startup.  By default, two things happen automatically when a high threshold of AWTs/AMP has been defined in MaxAMPWorkerTasks: 

1.    Load utility jobs will begin to run in message work types Work05/06/07

2.    Work05/06/07 will be given a preset number of reserved AWTs

If you have increased your AWTs/AMP to at least 240, the above two changes will automatically take place, assuming other related parameters are at their default.  AWTs will be taken out of the unassigned AWT pool and placed in the new reserve pools for Work05/06/07.  This will reduce AWTs available for queries and other requests once you have reached the threshold.  However, with such a large number AWTs available, it is not expected to have significant impact on query work running at the same time.  But you might want to factor in this reduction in the unassigned pool when planning for an AWT increase in the 240+ range.

Running at higher work types and with reserve pools can provide a benefit for load utility jobs if your platform ever runs out of AWTs.  Messages assigned higher work types are released from an AMP’s message queue before messages from lower work types, such as those that support query work.  In addition, with this automatic change utilities will have their own reserve pools to protect them if there is AWT exhaustion.

The Number of AMP Worker Tasks Placed in the New Reserve Pools

When you look at the assignment of AWTs across Work05/06/07, be aware that these three work types that have been set aside for load utilities follow the same patterns as the general purpose Work00/01/02, but they are higher work types.  Work00 is for  new work, Work01 for the first level of spawned work, and Work02 is for the second level of spawned work.  That same relationship among different work types carries over to these new work types.  Work05 is for  new utility work, Work06 for the first level of spawned utility work, and Work07 is for the second level of spawned utility work.  

Prior to 16.0, here is the number of AWTs assigned to these new reserve pools by default, once the threshold of reached 240 is reached: 

Work05 = 30

Work06 = 3  

Work07 = 3

However, those numbers of reserve counts has been modified in 16.0 to be:

Work05 = 15

Work06 = 15  

Work07 = 3

The modified 16.0 assignments are likely to be more reasonable for most sites.  That is because Work06 that supports spawned work coming from utilities will have the same number of reserves as Work05 that supports new utility work.  Both MultiLoad (TPT Update) and FastLoad (TPT Load) rely on spawned AWTs during phase I.   Without the change, only three new utility jobs would  be able to start up on a busy system because having only 3 reserves for spawned work would prevent the 4th job from being able to progress, until other AWTs freed up.

How to Manage AWT Reserve Counts for Work05/06/07

You may decide that you don’t want to support these new reserve pools.  Or you may decide that the new reserve pools are a good thing, and will protect your load jobs, but you want different reserved AWT assignments.  Or you may decide you don’t want load jobs to run at higher work types, but rather you want to keep them in Work00/01/02.

There is parameter in DBS Control called AutoAWTConfig that will let you customize your experience when it comes to using these higher work types and these new reserve pools.   As this is an internal field, it is recommended that you do not attempt to change it yourself, but rather consult with CS or the support center and ask for their assistance. 

The most important thing to understand about AutoAWTConfig is that you will only experience utilities running in the higher work types and new reserve pools when you go to 240 or higher AWTS/AMP if this parameter is set at its default of 0.

The AutoAWTConfig internal parameter comes with three possible settings:

AutoAWTConfig - This field is used during startup to

     determine configuration values for AWT worktypes.

     The AWTAutoConfig field can only be modified to the value of 1 if

     the MaxAMPWorkerTasks field has a value greater than or equal to 180 .

     AutoAWTConfig has 3 possible values:

       0 = DBS automatically sets min/max values for AWT

           worktypes and determines if utilities run in a

           separate worktype pool [Default]

       1 = Utilities run in a separate worktype pool but

           DBS does NOT set min/max values for AWT worktypes

       2 = Utilities do NOT run in a separate worktype pool and

           DBS does NOT set min/max values for AWT worktypes

When the database comes up it looks at the values first in the DBS Control AMPWorkerTasks setting.  If that value is 240 or greater and if AutoAWTConfig is at the default of 0, then utility jobs will automatically begin to execute in Work05/06/07 and will automatically have the default number of reserved AWTs assigned, without your taking any action.

But if the AutoAWTConfig parameter has been changed to 1 instead of 0, then whatever actual values you may have specified for the new reserve pools will be used to determine work05/06/07 reserves.  Even if you are not at 240 AWTs/AMP, you at can manually take action to point your utility jobs to these three higher work types by setting AutoAWTConfig to 1, but you must have a minimum of 180 AWTs/AMP for that to work.  The option of 1 lets you customize the three new reserve pools to any number of reserves you like, once you get to 180 or above.

Specifying customized values for work type reserve pools is done in the CTL utility, which will be read at startup after the DBS Control settings.  Once you specify the new reserve counts using CTL, those reserve pool settings would remain across all future restarts.  But if AutoAWTConfig remains at the default of 0, then  every time there is restart, the DBS resets those reserve pools to 30-3-3 (or 15-15-3 on 16.0) when the database comes up.  

If you set the AutoAWTConfig parameter to 2, then it essentially turns off this feature.  Load utilities will not use Work05/06/07, but rather will continue to run in Work00/01/02.  No new reserves will be set up no matter what the number of AWTs/AMP.  

Recommendations

If you are on 16.0 and have increased AWTs to 240 or greater, leaving AutoAWTConfig at the default setting is an acceptable thing to do.  In other words, you can do nothing.  

But if you are not yet on 16.0 and move to 240 AWT/AMPs or greater, talk to the support center about changing to more reasonable reserve counts in Work05/06/07 and modifying the AutoAWTConf setting to 1, so your modified reserve pools will be honored at start up time.  Even if you are on 16.0, you may want to customize the reserve pool numbers to better suit the needs of your utility jobs, and setting the parameter to 1 will allow you to do that.

Setting AutoAWTConfig to 2 is the action to take if you want the same behavior as you had previously, that is load utilities executing in the Work00/01/02 work types and sharing AWTs from those reserves or from the general pool. 

Remember to get guidance and assistance from the GSC or from CS on making any of these types of internal changes.  They can support you in making the right decision for your platform.  

  

 

 

Ignore ancestor settings: 
0
Apply supersede status to children: 
0

Viewing all articles
Browse latest Browse all 1058

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>