IBM Db2 - The Ultimate Database for Cloud, Analytics & Mobile
A Db2 group buffer pool (GBP) consist of two parts:
1) Directory entries
2) Data entries
For each data entry there must be an associated directory entry in the GBP.
A directory entry can exist without a data entry in the GBP.
Directory entries are needed for the cross-invalidation process in the primary GBP. The base for this cross-invalidation is the usage of IXLCACHE with registered interest (e.g. REGUSER=YES) by each member.
For the secondary GBP Db2 does not register its interest for a page, otherwise the structure of primary and secondary GBP is the same.
A data entry is the equivalent of a page in the local buffer pool.
Consider that for e.g. 8K buffer pools a factor 2 is visible in the displays.
Db2 shows (DISPLAY GBPOOL):
DSNB759I DB2B NUMBER OF DIRECTORY ENTRIES = 1730
NUMBER OF DATA PAGES = 345
XCF shows (D XCF,STR,STRNAME=gbp_name):
ENTRY COUNT: 1730
ELEMENT COUNT: 691
ENTRY:ELEMENT RATIO: 5 : 2
Factor 4 or 8 applies for 16K or 32K buffer pools,
The relation between directory entries and data entries is fixed by the RATIO parameter in ALTER GBPOOL.
Directory entries and data entries together are ~equal to the current size of the GBP from XCF specification point of view (MINSIZE, INITSIZE, SIZE parameters). As the size of a directory entry is dependent on e.g. CFCC level or degree of sharing or ..., the directory entry is variable in size.
Therefore, the final calculation of needed directory entries and data entries based on RATIO and size specification in CFRM policy can sometimes be difficult.
To help customers for skew in directory entries versus data entries due to workload or miscalculation, XCF offers ALLOWAUTOALT specification in the GBP definition.
One function of ALLOWAUTOALT is to adjust the RATIO dynamically based on needs.
With above APAR two changes are introduced:
1) The default for the RATIO is changed from 5 to 10.
If objects are GBP dependent e.g. page set p-lock of IX, Db2 registers the page during read from DASD into local buffer pool. This higher default value is in line with such processing, which normally dominates workloads.
2) The upper limit of the RATIO can now be 1024. Consider that ALLOWAUTOALT already today adjusts to higher values than 255.
Always avoid running into a situation, in which directory entries are reclaimed: This means directory entries are already used and must be freed. This freeing can result into cast-out processes e.g. if the data entry, which is administrated by this directory entry, is not on DASD, it must go to DASD before the directory entry can be reused.
Having the wrong RATIO and ALLOWAUTOALT(NO) is the base for such situations.
It is better to use the correct RATIO instead of ALLOWAUTOALT(YES), because the latter has some delay in its reaction due to good reasons: E.g. changing the RATIO up and down every second is probably not a good approach.
The number of adequate directory entries can be calculated by the summation of all associated local buffer pool pages and the data entries in the GBP.
If the number of directory entries is not adequate, DSNB787I RECLAIMS FOR DIRECTORY ENTRIES can be used to monitor it.
The number of data entries is more difficult to adjust, but a good start is to look periodically at DSNB786I CHANGED PAGES SNAPSHOT VALUE. Hitting the wall of data entries is indicated by DSNB319A and DSNB325A: This should be avoided as possible. Although sometimes it is unavoidable due to heavy write activity to the GBP triggered by e.g. batch jobs.
Consider that Db2 11 for z/OS introduces GBP write around protocol, which can relief such GBP full situations, see message DSNB777I for the monitoring of this functionality.
Add a Comment