DB2 Version 10.1 for Linux, UNIX, and Windows

DB2 WLM dispatcher manages service class CPU resource allocations

The DB2® workload manager (WLM) dispatcher is a built-in DB2 technology by which you can specifically allocate CPU resources to work that is being executed on a database server. CPU resource entitlements can be controlled by using CPU shares and CPU limit attributes on DB2 WLM user and maintenance service class objects.

CPU resource entitlements can be controlled by using CPU shares and CPU limit attributes on DB2 WLM user and maintenance service class objects.

In summary, the DB2 WLM dispatcher has the following benefits:
  • Easy to implement, requiring less time and effort than implementing an OS WLM such as AIX® WLM or Linux WLM.
  • Supports flexible CPU allocation throughout the normal daily ebb and flow of system use. This flexibility is accomplished through the provisioning of both permanent allocations that are enforced all the time (hard CPU shares and CPU limits), or dynamic allocations that are enforced only when demand exceeds capacity (soft CPU shares).
  • Self-contained within the DB2 database manager such that setting CPU resource entitlements provides you with workload control that is effective across all platforms due to its independence from an OS WLM such as AIX WLM or Linux WLM.
  • You can continue to use the OS WLM products as a workload control mechanism, but it is not necessary if the extra implementation complexity (for example, setting up AIX WLM on each partition) or if the organizational strife (for example, system administrator reluctance to implement or permit use of OS WLM) is a barrier. Alternatively, you can use the OS WLM products for monitoring purposes while relying on the DB2 WLM dispatcher for workload control.

You can use the DB2 WLM dispatcher to effectively manage DB2 workloads by allocating CPU resource entitlements, that you specify, without the need for third-party workload manager software. The dispatcher can control CPU resource entitlements for DB2 workloads by means of CPU shares-based settings and CPU limit settings. Uncapped soft CPU shares provide almost unrestricted use of unused CPU resources, whenever they become available, that you assign to your high-priority work. You can assign capped hard CPU shares or CPU limits to your low-priority work. Hard CPU shares and CPU limits are most effective in preventing low-priority work from interrupting the execution of your high-priority work. Yet, low-priority work, to which hard CPU shares are usually assigned, has the flexibility to consume unused CPU resources that have been relinquished by high-priority work that has become idle or fallen below a minimum CPU utilization level to be considered active; this scenario can typically occur during off-peak business hours. Hard CPU shares and CPU limits are most useful in environments where the CPU utilization is typically low, without the need to assign soft CPU shares which are most effective in environments where the CPU utilization is almost always high.

The dispatcher infrastructure operates at the instance level of the DB2 database manager. The WLM dispatcher determines which DB2 agents can run based on the CPU allocation for their service class.

To enable the WLM dispatcher, you must set the wlm_dispatcher database manager configuration parameter to YES (by default, this configuration parameter is set to NO). By default after the WLM dispatcher has been enabled, the dispatcher can manage CPU resources only by way of CPU limit settings.

After having made the decision that the earlier enabled WLM dispatcher can best manage your strained CPU resources by using CPU shares along with CPU limits, you must enable CPU shares by setting the wlm_disp_cpu_shares database manager configuration parameter to YES. The default setting for this parameter is NO. You can set and adjust CPU shares and CPU limits by using the CREATE SERVICE CLASS and ALTER SERVICE CLASS statements.

Another consideration that gives you maximum flexibility to control the behavior of the DB2 database manager is the option to set a minimum percentage of CPU resource utilization for service classes using the wlm_disp_min_util database manager configuration parameter. Service classes utilizing CPU resources equal to or greater than that minimum percentage are considered to be active on the host or logical partition (LPAR) and the CPU shares of the active service classes are factored into CPU resource entitlement calculations.

The WLM dispatcher can manage a number of simultaneous threads that is referred to as the dispatch concurrency level. You can set the dispatch concurrency level using the wlm_disp_concur database manager configuration parameter. You can either specify that the DB2 database manager itself sets the concurrency level (COMPUTED), or you can manually set the concurrency level to a fixed value.

Workload monitoring has been enhanced to support the WLM dispatcher technology. New and enhanced monitor elements and table functions are as follows: