content_image/981685.jpg
## 2.2.3 Managing a contiguous buffer pool 

In DB12, PGSTEAL(NONE) is the recommended page stealing technique to minimize CPU consumption for tables and indexes that are frequently accessed and can be contained in a buffer pool. 

Although the use of PGSTEAL(NONE) provides a performance advantage, the challenging task lies in identifying the tables and indexes that are good candidates to use in-memory (contiguous) buffer pools. Use the following guidelines to screen for candidates: 

GLYPH<SM590000> Finding the Db2 objects that are referenced frequently with a high number of getpages 

GLYPH<SM590000> Ensure that the objects can be fully contained in the buffer pool 

To help with managing a contiguous buffer pool, Db2 12 introduced a new GETPAGES column in the real-time statistics tables, SYSIBM.SYSTABLESPACESTATS and SYSIBM.SYSINDEXSPACESTATS. This field reports the cumulative getpage count for a Db2 object since the last REORG, LOAD REPLACE operation or since the object was created. 

The getpage count alone is not adequate to determine the best candidate objects. Getpage intensity (getpage count/object size in pages) also must be calculated and reviewed. By choosing the objects with high getpage intensity, we might avoid picking objects that are frequently accessed but reference only a small portion of a large table or index as PGSTEAL(NONE) candidates. 

To further screen the objects identified with a high getpage intensity, we also must consider whether it is feasible to fit the entire object in memory. If the object is too large and cannot completely fit in the current buffer pool, a decision must be made on whether you want to increase the size of the buffer pool to use PGSTEAL(NONE), or not put the object into a contiguous buffer pool. 

Also, although some objects might perfectly meet the screening guidelines in their current state, you also must take their future growth into consideration. It is not advisable to use PGSTEAL(NONE) for objects that grow quickly over time, such as objects with a high volume of inserts. Moreover, because objects that are suited and not suited for PGSTEAL(NONE) can originally be in the same buffer pool, they might need to be separated and moved to buffer pools with the appropriate PGSTEAL settings. 

The next section outlines the steps that we used in our lab environment to identify objects that might benefit from the use of contiguous buffer pools. 

## Identifying candidates for a contiguous buffer pool 

We completed several steps to identify objects that might benefit from being in a contiguous buffer pool in our complex OLTP workload. The first step is to identify objects with a high getpage count and intensity for the period of interest. After deciding on the time frame, the following the steps were completed to identify candidate objects for a contiguous buffer pool: 

1. Create user RTS tables (see Example 2-1) for copying the externalized real-time statistics. 

<img src='content_image/981685.jpg'>

