Local buffer pools live in each member’s DBM1. When two DB2 members update or read the same page set, those local pools are not enough — you need a group buffer pool (GBP) in the Coupling Facility so nobody keeps a stale page. This page focuses on GBP0, GBP1, GBP caching, GBP-dependent page sets, and cross-invalidation.
There is a one-to-one name mapping: local BPn ↔ CF structure GBPn. You define the structure in the CFRM policy as groupname_GBPn. Each member still has its own BP0 with its own VPSIZE; they all share one GBP0.
A simplex GBP resides in one CF. Duplexed GBPs have primary and secondary in different CFs. You can spread different GBP names across CFs so one CF loss does not take every cache.
123-ALTER GROUPBUFFERPOOL(GBP0) GBPCACHE(YES) RATIO(5) -DIS GROUPBUFFERPOOL(GBP0) CONNLIST(YES) -DIS GBPOOL(*) TYPE(GCONN) GDETAIL(*)
The GBP has two kinds of slots:
| Option | Meaning |
|---|---|
| GBPCACHE YES | XI plus cache changed pages (usual GBP default) |
| GBPCACHE NO | XI only — no data elements for changed pages |
| Page set CHANGED | Cache changed pages for that page set |
| Page set ALL | Cache changed and clean pages (more CF storage) |
| Page set NONE | Do not cache this page set in the GBP |
| Page set SYSTEM | Special system use (for example certain LOB patterns) |
Default behavior caches updated data. You can cache all pages, none, or use a LOB-oriented option. GBPCACHE(NO) on the GBP still maintains XI but forces more disk I/O after invalidation. That can be a last-resort CF-storage trade-off, not a general performance feature.
| Name | Typical default | Meaning |
|---|---|---|
| CLASST | 5% | Class castout: changed pages in a class of objects |
| GBPOOLT | 30% | GBP-wide castout threshold |
| GBPCHKPT | 4 minutes | GBP checkpoint interval |
| RATIO | 10:1 | Directory entries per data element |
Prefer hitting CLASST (more targeted castout) over slamming into GBPOOLT. Write failures because the GBP is full of changed pages mean castout is too slow or the GBP is too small. Directory reclaims mean RATIO or size is wrong: you need roughly one directory entry for every local buffer that might hold a page plus one per GBP data page.
A table space, index space, or partition is GBP-dependent when there is inter-Db2 read/write interest: more than one member has it open, and at least one has it open for write. Then:
If only one member has the page set open, it can stay non-GBP-dependent and behave much like a non-data-sharing buffer pool — until a second member shows up. Interest is dynamic: DB2A might update alone; when DB2B needs the same page, DB2A writes the dirty page to the (duplexed) GBP and DB2B reads it from the primary GBP.
Objects that never have inter-Db2 interest still need a GBP defined if they use that BP name, but they will not spend CF cache until interest appears. Catalog and directory in BP0/GBP0 are the structures that become GBP-dependent as soon as two members are active and touching the catalog — which is immediately in a real group.
Cache coherency is the whole point. IBM’s update walk-through:
Later, the castout owner writes the page from the GBP to DASD so restart and GBP failure have a disk copy. Until castout, the GBP may hold the only current version — which is why duplexing GBPs is an availability requirement, not a luxury.
Cross-invalidation also happens when a directory entry is reclaimed. Those XIs are “false” from a business point of view: nobody updated the page; the GBP just ran out of directory slots. Tune RATIO before you blame the application.
User-managed duplexing: Db2 writes changed pages to both GBP instances. If you lose connectivity to the primary, Db2 can use the secondary without a log-based rebuild of those changed pages. Directory entries are rebuilt more gradually. If you lose both copies, you are in GBP recovery: reconstruct from DASD plus logs for pages not yet cast out. AUTOMATIC RECOVERY on DISPLAY GROUPBUFFERPOOL shows whether Db2 will attempt automatic GBP recovery.
12D XCF,STR,STRNAME=DSNDB0A_GBP0 -DIS GROUPBUFFERPOOL(GBP0) GDETAIL(INTERVAL)
DISPLAY output includes class castout threshold, GBP castout threshold, checkpoint interval, recovery status, CFRM policy duplex indicator, and current duplexing mode (DUPLEX versus SIMPLEX). Use it.
Each Db2 member has a lunchbox (local buffer pool). When two kids share the same sandwich (a data page), they also use a fridge in the hallway (the GBP). If one kid adds mustard and puts the sandwich in the fridge, the other kid’s lunchbox copy gets a sticker that says “stale” (cross-invalidation). That kid then takes the mustard version from the fridge instead of eating the old one. GBP0 is the fridge for the school office files (catalog). GBP1 is another fridge for a different shelf of lunches. If the hallway fridge is the only place the mustard sandwich exists until someone writes it back to the pantry (castout), you want two fridges in two hallways (duplexing).
1. What does GBP0 cache?
2. When is a page set GBP-dependent?
3. What is cross-invalidation?
4. What does GBPCACHE NO do?
5. Why duplex a GBP?