Determining Precedence Among TASM Planned Environments

Blog
The best minds from Teradata, our partners, and customers blog about whatever takes their fancy.
Teradata Employee

Most Teradata systems support different processing windows, each which has a somewhat different set of business priorities.  From 8 AM to 12 noon the most important work may be the Dashboard application queries.  But from 12 noon to 6 PM it could be the ad hoc business users.   At night maybe it’s the batch loads and reporting.   Planned Environments function within the TASM state matrix to support the ability to automatically manage changes to workload management setup during those different windows of time.

The state matrix represents more than just processing windows, however.  It intersects your Planned Environments (time-based processing windows) with any system Health Conditions you may have defined (such as high AMP worker task usage levels, or hardware disabilities).  TASM moves you from one Planned Environment to another or one Health Condition to another based on events that you have defined being triggered (such as time of day).

At the intersection of the two dimensions are the TASM states, which contain the actual workload management setup definitions.  A state may contain different values for some of the TASM settings, such as throttle limits or workload priorities. So when you change state, you are changing some of the rules that TASM uses when it manages your workloads.

Example of a State Matrix

The figure below illustrates a simple 4 x 3 state matrix.  The Planned Environments go along the top, and the Health Conditions go along the left side.   The same state can be, and often is, used at multiple intersection points.

How TASM Decides Which State to Switch to  

At each event interval, all system events are checked to see if a Health Condition needs to be changed.   After that is done, all defined Planned Environments are checked to see if a different Planned Environment should now be in effect.   It is possible for both the Planned Environment and the Health Condition to change on a given event interval.   Once the correct ones are established, their intersection points to the state that they are associated with. 

If more than one Planned Environment meets the current conditions (for example, one planned environment is for Monday and the other is for the end of the month and the end of the month falls on a Monday), then the Planned Environment with the highest precedence number wins. This will usually be the one in the rightmost position in the state matrix. 

When the Planned Environments are evaluated to see which one should be active, internally the search is performed from the right-most state (the one with the highest precedence) and moves leftwards, stopping at the first Planned Environment that fits the criteria.  For Health Conditions, the search starts at the bottom, with the one with the highest severity, stopping at the first Health Condition that qualifies.   That way, if more than one of those entities is a candidate for being active, the one that is deemed most important or most critical will be selected first. 

Changing Precedence

Viewpoint Workload Designer allows you to set the precedent order you wish by dragging and dropping individual planned environments.  In the state matrix shown above, assume that the Planned Environments are in the order in which they were created, with Monday being the right-most as it was add most recently.  But if you your business dictated that MonthEnd processing was more important and should be in effect during the times when Monday ended up being at the end of the month (a two-way tie), then you would want to drag EndOfMonth over to the right-most position.  You state matrix would then look like this:

Note that when you drag a Planned Environment to a different position, the cells below it that represent the states associated with that Planned Environment are moved as well.

In addition to looking at your Workload Designer screens, you can also see which Planned Environment has the highest precedence amongst two that might overlap by looking at tdwmdmp -a output.  

Under the heading "State and Event Information" tdwmdmp output will show you each Operating Environment (AKA Planned Environment) that is available, with their precedence order.  If more than one is eligible, the one with the higher precedence wins.  In the output below, the EndOfMonth Planned Environment will win if another Planned Environment is triggered at the same time.

Tdwmdmp -a also tells you the current Planned Environment.

State and Event Information: 

Operational Environments:

 PRECE  OPENV     OPERATING ENVIRONMENT 

 DENCE    ID             NAME               ENAB  CURR  DFLT

 -----  ------  --------------------------  ----  ----  ----

     4      77  EndOfMonth                   Yes            

     3      74  Monday                       Yes   Yes      

     2      75  Weekday                      Yes            

     1      76  Always                       Yes         Yes

7 Comments
Teradata Employee

Hello Carrie,

Well-written Article. I have 01 question:

(a) For PE, the rightmost PE will take the highest precedence irrespective of whether the DBA wishes or not. For Health Condition, is it the same philosophy that the bottom-most HC will take the highest priority or the HC with more severe Health Condition based associated event will take higher precedence.

Thanks,

Smarak

Teradata Employee

My apologies for the delayed response Smarak,  

The search for the correct Health Condition starts at the bottom with the highest severity Health Condition and stops when its finds a Health Condition that qualifies.  If more than one Health Conditoin qualifies, the most severe has precendence.

Thanks, -Carrie

Enthusiast

Hi Carrie,

I need to create a new workload and a new planned environment. No problem here...

The new workload needs to be in SLG Tier2 during the new planned environment,, but then in Timeshare outaside of that planned environment... but it does not work for me :(

Before I pull more hair!!!!  Is it even possible to have a workload in SLG tier in one planned environment and in timeshare in other planned environments?

Teradata Employee

Hi Nazy,

It is not a recommended practice to move a workload to a different tier across planned environments.    I don't believe Viewpoint Workload Designer will even allow you to do that.

Extra effort has to be made inside of the SLES 11 operating system when workloads are moved from one tier in the hierarchy to another, and it can slow down the state change operation.   So it is  better not to try to do that.

However, a workload on an SLG Tier can easily have its allocation percent changed across different planned environments, from a high percentage to a low percentage, or vice versa.   That is the recommended way to change a workload's priority across a planned environment.

Thanks, -Carrie

Enthusiast

Hi Carrie,

Thanks for the information.  Yes, Workload Designer is not letting me. Once I move the workload to SLG in on environment, it moves the workload from all environment to SLG...  Just wanted to make sure I am not missing something...

So,,, I need this new workload to have very high priority during one planned Envirinment (2nd Tier SLG), but  virtually same priority as Timeshare Top the rest of the time.  I dont want this job to impact the rest of the jobs CPU usage outside of that planned environment. 

So, if I keep it in SLG all the time, I am a bit concern about what % to give it outside the planned environmet.  I do not want to give it too big a %, because it will impact other critical jobs,,, What if I dont give it enough?  Will it get what it needs from timeshare, or will the job suffer?

Teradata Employee

Nazy,

Unfortunately, I can't tell you what settings would be best for you without being there on site and seeing all the workload management detail as a whole.   

But I can suggest that you need to keep workloads on the same tier through different planned environments.

I think you are looking at this correctly.  In the planned environment where you want this workload to have a high priority, give it a high allocation percent (like 30% or 50%).   In the other planned environments, give it a low allocation percent (like 2% to 5%, or even 1%).  Giving a workload on an SLG Tier a very low allocation percent is an effective way of keeping its CPU usage as low as you want.   However, if there are unused resources on the platform, and Timeshare workloads cannot use all the unused CPU, then SLG Tier workloads could end up consuming more than their allocation entitles them to.   I see that as a good thing.

If you want that workload to have a similar priority as Timeshare Top workloads, you might be able to figure that out if you look at the global weights of the Timeshare workloads in the System Workload Report screen of Viewpoint Workload Designer.  See the most recent Priority Scheduler Orange book (15.0/15.10) chapter on Global Weights  (chapter 9).  It tells you how to view the global weights of your workloads.  Some versions of Viewpoint do not display global weights for Timeshare access levels, but  I believe the most current Viewpoint screens do show the global weights of Timeshare workload broken out (global weights are called "% of System" in Viewpoint).  In addition, there is a blog posting on Dev X that discussed Global Weights.

https://developer.teradata.com/blog/carrie/2015/04/global-weights-in-sles-11-priority-scheduler

There is some trial and error involved in setting the allocation percent of SLG Tier workloads.  If you are in a position to pursue it and feel there would be a value, there is a group in Professional Services that can help with workload management setup or tuning (the Performance and Workload Management COE).

Thanks, -Carrie

Enthusiast

Thank you Carrie, great information....