Buffer pools are the first place a GETPAGE looks before Db2 waits on disk. Designing them means choosing which objects share a pool, how big VPSIZE is, and how steal and write thresholds behave. Tuning them means reading -DISPLAY BUFFERPOOL and changing attributes with -ALTER BUFFERPOOL while DB2 is running. This page covers the named 4/8/16/32 KB pools, thresholds, PGSTEAL/PGFIX/FRAMESIZE/AUTOSIZE, hit ratio, and group buffer pools.
Db2 provides families of pools by page size. You assign a table space or index to a pool of the matching page size (BUFFERPOOL clause on CREATE/ALTER). Common names you will see in shops:
| Pool | Page size | Typical use |
|---|---|---|
| BP0, BP1, BP2 (… BP49) | 4 KB | BP0: catalog/directory; BP1/BP2: user 4 KB table spaces or indexes |
| BP8K0, BP8K1 (… BP8K9) | 8 KB | 8 KB table spaces (wider rows, some catalog uses) |
| BP16K0, BP16K1 (… BP16K9) | 16 KB | 16 KB table spaces |
| BP32K (… BP32K9) | 32 KB | 32 KB table spaces, LOB/XML, declared temp tables, long sort rows |
There are fifty 4 KB pools (BP0–BP49), ten 8 KB (BP8K0–BP8K9), ten 16 KB (BP16K0–BP16K9), and ten 32 KB (BP32K–BP32K9). You do not have to allocate every name; unused pools can stay at VPSIZE 0.
BP0 is the installation default 4 KB pool. Keep catalog and directory (and usually other system 4 KB objects) here so user tablespace scans cannot flush catalog pages. BP1 and BP2 are the next 4 KB pools people carve out—for example BP1 for 4 KB table spaces and BP2 for 4 KB indexes, or BP1 for OLTP random access and BP2 for sequential history. Isolation is the point: mixed sequential and random traffic in one pool fights over VPSEQT.
Wider pages hold longer rows and fewer rows per I/O. BP32K is required for 32 KB table spaces and is important for work file databases (declared global temporary tables need a 32 KB work file table space). Sort records longer than 100 bytes prefer 32 KB work files. Do not dump all user 4 KB data into BP32K “for headroom”—page size is a table-space design choice, not a tuning cheat.
VPSIZE is the number of buffers. Memory used is roughly VPSIZE × page size. IBM’s performance book: specify the largest sizes you can back with real storage. Undersize and you do extra I/O. Oversize without real storage and z/OS pages the pool—often worse than a smaller pool that stays resident.
123-DISPLAY BUFFERPOOL(BP0) DETAIL -ALTER BUFFERPOOL(BP0) VPSIZE(20000) -ALTER BUFFERPOOL(BP1) VPSIZE(50000) VPSEQT(10) DWQT(30) VDWQT(5)
| Attribute | Meaning |
|---|---|
| VPSIZE | Number of buffers in the virtual pool |
| VPSEQT | Sequential steal threshold (% of pool sequential pages may fill) |
| VPPSEQT / VPXPSEQT | Parallel sequential / assisting parallel sequential thresholds |
| DWQT | Deferred write threshold (% unavailable pages in the pool) |
| VDWQT | Vertical deferred write threshold (updated pages for one data set) |
Sequential steal (VPSEQT): when sequentially accessed pages exceed this percent, Db2 prefers to steal sequential buffers so random (often OLTP) pages survive. Default 80 is high—fine for mostly sequential pools, too generous for a pool that must protect random GETPAGEs. Lower VPSEQT (for example 10–20) on OLTP data/index pools.
DWQT (deferred write threshold, historically ~30%): when unavailable pages (updated or in-use) exceed the percent, Db2 schedules writes for enough data sets (up to 128 pages each) to get about 10% below the threshold. VDWQT (vertical deferred write) is per data set so one hot page set cannot dirty the whole pool before writes start. Lower DWQT/VDWQT for smoother trickle writes; very high values make checkpoint write storms.
DISPLAY BUFFERPOOL DETAIL shows DWT HIT and VERTICAL DWT HIT. Frequent hits are normal on busy pools; zero hits with huge checkpoint I/O often means thresholds are too high.
| PGSTEAL | When to use it |
|---|---|
| LRU | Default. Steal least-recently-used pages. Best when pages are reused. |
| FIFO | Steal oldest pages regardless of reuse. Good for one-pass sequential / work files. |
| NONE | Do not steal; keep objects in memory. Size VPSIZE for all open pages plus overflow. |
LRU steal tracks recency. FIFO is cheaper to maintain and fits work files and one-time scans where reuse is rare—IBM and Redbooks often suggest FIFO for DSNDB07-style pools. Sequential steal is not a separate PGSTEAL value; it is the VPSEQT behavior that prefers stealing sequential pages first under LRU.
PGSTEAL(NONE) is an in-memory pool, not “infinite LRU.” If objects grow past VPSIZE, overflow and failures appear. Revisit size after LOAD growth.
PGFIX(YES) fixes buffers in real storage when they are used, avoiding the disaster of z/OS paging out a page Db2 believes is cached (long response time, counters that still look like hits). Production with enough real memory should use PGFIX(YES). Db2 will not honor PGFIX if real storage is too tight (documented internal threshold around 80% of real storage for fixed pools).
FRAMESIZE selects 4 KB, 1 MB, or 2 GB frames for the pool. Large frames reduce TLB pressure for big pools. Pair large frames with PGFIX(YES) and enough real storage. You cannot always change FRAMESIZE without draining the pool.
AUTOSIZE(YES) lets WLM adjust VPSIZE between VPSIZE MINIMUM and VPSIZE MAXIMUM. Use it when you want Db2 to grow/shrink with workload, not as a substitute for a thought-out starting size. DISPLAY shows AUTOSIZE, MIN, MAX, and ALLOCATED.
12-ALTER BUFFERPOOL(BP1) PGFIX(YES) FRAMESIZE(1M) PGSTEAL(LRU) -ALTER BUFFERPOOL(BP32K) PGSTEAL(FIFO) VPSEQT(90) AUTOSIZE(NO)
The hit ratio is (GETPAGEs − pages read from DASD) / GETPAGEs. Also read:
Tuning loop: DISPLAY → change one attribute → measure. Do not raise VPSIZE if PAGE-INS are already high. Separate sequential work files from random indexes. After you move objects (ALTER TABLESPACE BUFFERPOOL), rebound plans are not required for the buffer assignment itself, but access path cost can change because I/O cost assumptions move.
In data sharing, local pools still live in each member’s DBM1. Group buffer pools (GBP0 for BP0, GBP1 for BP1, …) live in the Coupling Facility. When a page is of group interest, members use the GBP for coherency (directory entries and optionally cached copies). Castout writes changed GBP pages back to DASD. GBP tuning (GBPCACHE, class castout, GBP checkpoint) is related but not the same as VPSIZE. A huge local pool with a tiny GBP still causes GBP misses and XI (cross-invalidation).
DISPLAY GROUPBUFFERPOOL and ALTER GROUPBUFFERPOOL are the GBP counterparts of the local commands. Failed or full GBPs put pages on LPL/GRECP—recovery topics for the data sharing section.
IBM: largest sizes you can back with real storage; if paging rises, add memory or shrink the pool. Simulation (IBM Buffer Pool Analyzer / DISPLAY simulation options where licensed) beats guessing VPSIZE from hit ratio alone.
A buffer pool is a desk. Disk is the toy closet. VPSIZE is how big the desk is. If the toy is already on the desk (hit), play starts immediately. If not, you walk to the closet (I/O). VPSEQT is “don’t let the big pile of books you only skim once shove the favorite toy off the desk.” PGSTEAL(NONE) is gluing the favorite toys to the desk. PGFIX is nailing the desk to the floor so someone else (z/OS) cannot hide the toys under the bed. Group buffer pools are a shared tray in the hallway so kids in different rooms do not paint two different faces on the same doll.
1. What does VPSIZE specify?
2. BP0 is conventionally used for:
3. VPSEQT is the:
4. PGSTEAL(NONE) means:
5. PGFIX(YES) is recommended when: