Use of caching for group buffer pools

You can cache pages in the group buffer pool as they are read into a member's local buffer pool by specifying GBPCACHE ALL when you create or alter a table space or index.

When you choose ALL, pages are copied to the group buffer pool as they are read in from disk, even if no inter-Db2 read/write interest exists in those pages.

However, when only a single member has exclusive read/write interest in the page set (that is, only one member has the page set open for update), pages are not cached in the group buffer pool when they are read in from disk. As soon as another member in the data sharing group shows interest in the page set or partition, it becomes GBP-dependent. Changed pages are moved into the group buffer pool, and all pages read in from disk are cached in the group buffer pool.

Choosing GBPCACHE ALL does not prevent Db2 from continuing to cache changed pages in the group buffer pool before writing them to disk (the function provided by the default, GBPCACHE CHANGED).

Note: For LOB table spaces, use the default, GBPCACHE CHANGED. If you use GBPCACHE CHANGED for a LOB table space that is defined with LOG NO and the coupling facility fails, the LOB table space is placed in GRECP. When group buffer pool recovery occurs, all LOB values that were in the coupling facility at the time of the failure are marked invalid because the log records that are necessary to perform the recovery for those values are missing due to the LOG NO attribute.

Example: Use the GBPCACHE clause to cache read-only page sets in the group buffer pool:

Begin general-use programming interface information.
ALTER TABLESPACE DSN8D13A.DSN8S13D
  GBPCACHE ALL;
End general-use programming interface information.

Why choose GBPCACHE ALL?

By choosing GBPCACHE ALL, you prevent multiple members from reading the same page in from disk. For this reason, page sets or partitions that typically have a high degree of inter-Db2 read interest are good candidates for GBPCACHE ALL.

If you use the GBPCACHE ALL option, it increases the need for coupling facility resources: processing power, storage, and channel utilization.