Resource assignment with service classes
A service class defines an execution environment in which work can run. This execution environment allocates available resources and can include thresholds that determine how work is permitted to run.
In the previous figure, the activities in both service superclasses are further subdivided. The service class provides a two-tier hierarchy: a service superclass and service subclasses underneath. This hierarchy permits for a more complex division of execution environment and better emulates a real-world model. Unless specified otherwise, service subclasses inherit characteristics from the service superclass. Use the service subclasses to further subdivide work in the service superclass.
Prioritization and resource control
Control | Description |
---|---|
Prefetch priority | This control assigns a priority to the prefetch requests, which affects the order in which they are addressed by the data server. |
Buffer pool priority | This control assigns a buffer pool priority to service classes which affects how likely pages fetched by activities in a service class are to be swapped out. |
Outbound correlator | This control permits a workload to have some of its
resources controlled by a operating system workload manager like AIX® Workload Manager or Linux® workload management. The
tag flows through the agent to the external workload manager and maps to a resource group defined
with the manager. When Db2® workload management is used in conjunction with an operating system workload manager, additional controls are available. With AIX Workload Manager, you can control the amount of processor resource allocated to each service class by setting a minimum, maximum, or relative share of processor resource for each service class. With Linux workload management, you can control the amount of CPU resource by setting shares for each service class relative to the Linux default class. Note: This control cannot be set when agent priority is in use.
|
Service subclasses
Although the service superclass is the highest tier for work, activities run only in service subclasses. Each service superclass has a default service subclass defined to run activities that you do not assign to an explicitly defined subclass. This default subclass is created when the service superclass is created. You can create additional subclasses in a service class as you require them to further isolate work. Except for histograms and the COLLECT ACTIVITY DATA, COLLECT AGGREGATE ACTIVITY DATA and COLLECT AGGREGATE REQUEST DATA options, a service subclass inherits the attributes of its service superclass, unless otherwise specified. The resources of the superclass are shared by all subclasses in it.
You can define only a single level of subclasses (that is, you cannot define a subclass under another subclass, only under a service superclass).
As user requests enter the data server, they are identified as belonging to a given workload and assigned to a service superclass or subclass. There are also system requests (for example, prefetches) that run under a special default system service class (SYSDEFAULTSYSTEMCLASS) and maintenance requests that are driven by Db2 (such as an automatic RUNSTATS from the health monitor) that run under a default maintenance service class (SYSDEFAULTMAINTENANCECLASS).
You can view your service classes by querying the SYSCAT.SERVICECLASSES catalog view.