DB2 Version 10.1 for Linux, UNIX, and Windows

Buffer pool priority of service classes

Setting the buffer pool priority of service classes allows you to influence the proportion of pages in the buffer pool that may be occupied by activities in a given service class, which can improve the throughput and performance of activities in that service class.

You can associate each DB2® service class with a relative buffer pool priority, which controls how likely pages fetched into the buffer pool by activities in the service class are to be swapped out. Increasing the buffer pool priority potentially increases the proportion of pages in use by agents of a particular service class.

If you do not specify a buffer pool priority, or if you specify BUFFERPOOL PRIORITY DEFAULT, the buffer pool priority assigned to the service class is DEFAULT. For service superclasses, DEFAULT maps to a value of LOW; for service subclasses, DEFAULT maps to the value of the buffer pool priority of the parent service superclass. All default subclasses have a buffer pool priority of DEFAULT, which cannot be changed.

When upgrading from an earlier DB2 version, the buffer pool priority of existing service classes is set to DEFAULT.

Realizing the benefits of setting buffer pool priority

You are more likely to realize a performance advantage with setting the buffer pool priority for a service class if there is a reasonable amount of contention on the buffer pool. Buffer pool contention demonstrated by an overall hit ratio of 85% or less is likely to see the most benefit. If the overall hit ratio exceeds 90%, there is likely not substantial buffer pool contention to begin with, and setting buffer pool priority will yield less or little benefit in most cases. What benefits you realize are dependent on the type of workload your data server runs.

For some workloads, setting buffer pool priority is more effective if you also turn on proactive page cleaning. This is because buffer pool priority settings are effective only for non-dirty pages and proactive page cleaning is more aggressive about writing out dirty pages to disk. Note that you should turn on proactive page cleaning only if it yields a performance benefit.

If you use asynchronous page cleaning (also known as classic page cleaning), setting the chngpgs_thresh database configuration parameter to a lower value will likely yield the same effect of making your buffer pool priority settings more effective, because a low value for this parameter also ensures that there are enough clean pages in the buffer pool.

It is possible that the positive effects of setting buffer pool priority can be surpassed by the effects of prefetching, with or without setting prefetch priority, if there is a reasonable amount of prefetching taking place. For example, if you define a service class with high buffer pool priority where there is only little prefetching, the effective advantage of this buffer pool priority setting might be small when compared to a service class with low buffer pool priority but where activities perform a significant amount of prefetching. Due to the benefits of prefetching, the activities in the service class with low buffer pool priority might even outperform the activities in the high buffer pool priority service class. However, setting buffer pool priority can still supplement your workload management strategy under these circumstances, and you should use it.