Teradata Senior Technical Consultant Carrie Ballinger offers advice on migrating to the new Teradata priority scheduler.
A New Mindset
Teradata priority scheduler’s hierarchical approach adds simplicity and accuracy while being ‘completely fair.’
A new Teradata priority scheduler will change how priorities are expressed and implemented. The version in Linux SLES 11 makes it easier to predict the impact of setup changes, improves handling of tactical workload priorities, and allows the user to define multiple high-priority groupings.
All multitasking operating systems (OSs) come with a scheduler—a component that decides which tasks, among the many that are waiting, will get the CPU next. In SLES 11, the Linux OS unveiled The Completely Fair Scheduler. To take advantage of this offering, Teradata has designed a new priority scheduler that’s tightly integrated with The Completely Fair Scheduler to manage database priorities.
The priority scheduler is workload-based. While the previous version translated Teradata Active System Management workloads to performance groups behind the scenes, in SLES 11 the workload becomes the priority object.
Linux SLES 11 implements priorities using a hierarchy, and the database priority scheduler builds on this approach. Each workload is given a location within a predefined but expandable tree structure. The administrators’ placement of a workload within this tree influences the share of resources that the workload’s tasks receive.
Conceptually, resources flow from the top of this tree down through the lower levels, with workloads at each level taking what they can use and then passing unused resources to the levels below. Tasks belonging to workloads at higher levels have their resource needs satisfied before tasks and workloads at lower levels.
The Virtual Partition level is at the top of what the user sees of the priority hierarchy. (See figure.) A single virtual partition exists for user work by default, but up to 10 may be defined. Multiple virtual partitions are intended for sites that support several distinct business units or geographic entities that require strict separation.
Workloads defined as “tactical” are located in the first level under Virtual Partition. The Tactical tier is intended for workloads that represent highly tuned, very short requests that have to finish as quickly as possible, even at the expense of other work in the system. Tactical workloads receive the highest priority available to user work and are allowed to consume close to all the resources allocated to their virtual partition.
Click to enlarge
The Service Level Goal (SLG) tiers, which are just below Tactical, are for workloads associated with short service level goals. This is the more complex tactical-like work whose response time is critical to the business. One SLG tier may be adequate to satisfy this time-dependent work, but several can be defined. If more than one SLG tier is assigned workloads, those on higher SLG tiers receive their share of resources before workloads on the lower ones.
The Tactical and SLG tiers are automatically provided with a workload called “Remaining” to act as a conduit for resources that flow into their tier but either are not used or have been set aside for the tiers below. The Remaining workload represents the resources that are left over after workloads on that tier have been provided with their intended resources.
Each SLG tier can support multiple workloads. Database administrators (DBAs) assigning a workload to a particular SLG tier are prompted to specify a “workload share percent.” This represents the percent of resources that the DBA would like to target to that specific workload from within the resources that are made available to that tier. The workload share percent is a percent of the resources that flow to that tier, not a percent of all system resources.
Timeshare: The Base of the Tree
Workloads running in Timeshare, which sits at the base of the tree, are expected to consume the majority of the resources. Timeshare is intended for workloads that are important, but whose response time is less critical to the business, such as BI reporting, ad hoc queries or other moderate or lower-priority work. Resources not used by the Tactical or SLG tiers will immediately flow down to the Timeshare tier.
Timeshare comes with four access levels that represent four priorities: Top, High, Medium and Low. When using Timeshare, the DBA must assign each workload to an access level. Workloads in the Low access level receive the least amount of resources among the Timeshare workloads, while those in the Top level receive the most:
- Requests in Top get 8 times the resources as each request in Low
- High gets 4 times the resources
- Medium gets 2 times the resources
- Each Low request gets a minimum base share, depending on what is available from the tier above
Simpler Is Better
This simple, hierarchical approach to defining and managing priorities in the Teradata Database requires a new mindset for workload management setup. But users will be rewarded with more granular priority differences and more predictable behavior.