Setting a CPU limit
Set a CPU limit at the database level by using the wlm_cpu_limit configuration parameter. Set a CPU limit for a service class by using the CPU LIMIT clause of the CREATE SERVICE CLASS or ALTER SERVICE CLASS statements. Set CPU limits to cap the CPU used by a database or service class under all circumstances during workload management dispatcher control.
Before you begin
You must enable the workload management dispatcher by configuring the wlm_dispatcher database manager configuration parameter, if not already done. By enabling the workload management dispatcher, CPU resource control using the CPU limit attribute becomes available by default. See: Enabling the workload management dispatcher.
About this task
The CPU limit is set in this task by using the command line processor.
Restrictions
At the service class level, you can assign CPU limits only to service classes that the workload management dispatcher can control, which are user and maintenance service classes. The CPU resource allocations for system service classes cannot be controlled by the workload management dispatcher.
Procedure
To set CPU limits at the database level (skip to step 2 to set CPU limits at the service class level):
To create a new service class and set the CPU limit (skip to step 3 if an existing service class CPU limit setting is to be altered):
To alter the CPU limit setting for an existing service class:
Results
You have set or altered the CPU limit setting for the specified databases or service classes, or both. The workload management dispatcher will not allocate CPU resources to these service classes or databases beyond the set limit.
What to do next
Set the dispatch concurrency level by configuring the wlm_disp_concur database manager configuration parameter. See: Setting dispatch concurrency level.