17.10 - Usage Notes - Advanced SQL Engine - Teradata Workload Management

Teradata Vantageā„¢ - Workload Management User Guide

Product
Advanced SQL Engine
Teradata Workload Management
Release Number
17.10
Release Date
July 2021
Content Type
Administration
User Guide
Publication ID
B035-1197-171K
Language
English (United States)
  • Only the Collective rule type is supported for an ARM rule. Individual and Member rule types are not supported.
  • Each ARM rule is limited to a single time unit. Time units cannot be mixed across states. If a secondary state has a different time unit then the base state, the time unit for the secondary state is ignored and the time unit for the base state is used instead. A warning will be written to the DBC.TDWMEventLog table.
  • TDWM tracks the number of admitted requests within the given time unit for each ARM rule.
  • Each ARM counter is divided into 6 equal intervals for better responsiveness. For example, a minute based ARM rule is divided into six 10-second intervals.
  • The current arrival rate is the sum of the 6 interval counts.
  • Each interval has a start time, an expiration time, and a query arrival count. An example of a minute based ARM rule:
    Interval Number Start Time Expiration Time Number of Arriving Requests
    1 8:00:00 8:01:00 1
    2 8:00:10 8:01:10 2
    3 8:00:20 8:01:20 0
    4 8:00:30 8:01:30 4
    5 8:00:40 8:01:40 2
    6 8:00:50 8:01:50 1
    Current Arrival Rate = 10/minute
  • When an interval expires, a new interval is created with a new start time, expiration time, and interval count. The expired interval count is logically subtracted from the ARM count. If the ARM count is below the limit, TDWM checks to see if any deferred queries can be admitted into the system. TDWM can keep admitting deferred queries until the ARM limit is reached.
  • The ARM count is based on query admission time. The elapsed time of the query itself is not relevant. It is possible for the ARM count to drop to zero but still have associated queries running (for example, a second based ARM rule where queries run for several seconds). Conversely, it is possible for queries to complete but still be counted against the ARM rule (for example, an hour based ARM rule where queries run for several seconds).
  • If an ARM rule is defined with a non-zero qualify time, it is possible for the current ARM rate to exceed the limit until the required qualify time is met.

This is an example of ARM counter behavior with an ARM limit of 10 requests per minute with 0 qualify time:

Interval Number Interval Time Expiration Time Number of Arriving Requests Current Arrival Rate Defer Queue Length Comment
1 8:00:00 - 8:00:09 08:01:00 1 1 0 First request is admitted. Current rate is set to 1.
2 8:00:10 - 8:00:19 08:01:10 2 3 0 Second and third requests are admitted. Current rate is set to 3.
3 8:00:20 - 8:00:29 08:01:20 2 5 0 Fourth and fifth requests are admitted.
4 8:00:30 - 8:00:39 08:01:30 3 8 0 Sixth, seventh, and eighth requests are admitted.
5 8:00:40 - 8:00:49 08:01:40 2 10 0 Ninth and tenth requests are admitted.
6 8:00:50 - 8:00:59 08:01:50 1 10 1 Eleventh request is added to Defer Queue because current arrival rate has reached the limit.
7 8:01:00 - 8:01:09 8:02:00 3 10=>9=>10 3 The first request is no longer counted in the current rate. Current rate drops to 9. One deferred request (for example, eleventh) is released. Current rate goes back to 10. The 3 new requests arriving in this interval are added to Defer Queue (total of 3).
8 8:01:10 - 8:01:19 8:02:10   10=>8=>10 1 The second and third requests are no longer counted in the current rate. Rate drops to 8. Two deferred requests are released. Current rate goes back to 10. No new request arrives in this interval. One request remains in Defer Queue.
9 8:01:20 - 8:01:29 8:02:20   10=>8=>9   The fourth and fifth requests are no longer counted in the current rate. Rate drops to 8. One deferred request is released. Current rate goes up to 9. Defer Queue is empty.
10 8:01:30 - 8:01:39 8:02:30   6   The sixth, seventh, and eighth requests are no longer counted in the current rate. Rate drops to 6.