CPU Shares and the minimum utilization setting (A cautionary tale)

Earlier, when I was describing the concept of how CPU shares worked, I talked about a couple of cases where the existence of work in service class affected how CPU is allocated:

  • Each service class is allocated a proportion of CPU relative to the ratio of its shares to the sum of shares for all active service classes
  • Hard shares enforce their relative limit of CPU consumption until all other service classes are no longer active on the database.

As is natural in such general descriptions, I skipped over an interesting detail of how WLM dispatcher actually decides that a service class is no longer active (at least from a CPU consumption perspective).

The WLM Dispatcher decides who is active or not active by establishing a minimum level of CPU consumption below which it will consider the service class to be inactive. When that point is reached, the dispatcher will no longer consider the service class's shares as part of the total amount of shares to be considered for CPU allocation and will reconsider hard share enforcement.

By default, the WLM dispatcher uses a minimum of 5% CPU consumption by a service class within each dispatcher evaluation cycle to determine whether a service class is active or not.

This minimum value is controlled by the WLM_DISP_MIN_UTIL database manager configuration parameter. Our strong recommendation is not to change this value (unless you have a very good reason).

Why am I sharing this level of detail if you should not change it? :)

Well, it is important to know about this minimum utilization level in order to avoid setting up a problematic WLM configuration.

For example, if you were to put a CPU limit of 3% on a service class, then, by definition, that service class would never be considered active by the WLM Dispatcher since the class is forced to be below the mimimum of 5% CPU consumption because of the CPU limit.

This means that the service class would be ignored for any shares related calculations anf the system would behave as if the service class did not exist. And you might end up scratching your head for quite a while to try and figure out why without knowing this little tidbit! :)

Recent Stories
How can I stay current on what fix packs are available for each Db2 release, what Hiper APARs might be out there, and if there are any security vulnerabilities that I should know about?

Things to consider when considering Db2 Native Encryption

An old Db2 Easter Egg: Setting the default isolation value for dynamic SQL