Disk is slow; memory is fast. Buffer pools are Db2’s in-memory parking lots for table space and index pages. This overview explains what buffer pools are, how they speed access, how they connect to table spaces, and what beginners should take from DBA performance talk.
Buffer pools are areas of virtual storage that temporarily store pages of table spaces or indexes. When an application accesses a row, Db2 places the page that contains that row in a buffer. Access to data in this temporary storage is faster than accessing data on disk. If the page is already buffered, the program does not wait for a retrieve from disk—time and cost drop.
| Step | Detail |
|---|---|
| 1. Request | SQL needs rows; Db2 identifies the page(s) that hold them |
| 2. Hit? | If the page is already in the buffer pool, use it (fast path) |
| 3. Miss | Read the page from disk into a buffer, then use it |
| 4. Write later | Changed pages are written back under Db2’s write/commit rules |
Buffer pools live in the database services address space (ssnmDBM1). IBM documents that a buffer pool can be sized up to a very large maximum (on the order of terabytes in current materials). Sizes are not “set and forget”: pools require monitoring and tuning because they are critical to the performance of applications that touch data in those pools.
You can specify default buffer pools for user data and for indexes when defining a database. Objects can override those defaults. That is why CREATE DATABASE often shows BUFFERPOOL and INDEXBP clauses next to STOGROUP.
1234CREATE DATABASE APPDB STOGROUP MYSTOGRP BUFFERPOOL BP1 INDEXBP BP2;
BP1 might hold table data pages; BP2 might hold index pages—common separation so index traffic and data traffic do not thrash one shared pool, though real standards vary by site.
Table spaces are divided into pages. The page size is controlled by the buffer pool assigned to the table space: 4 KB, 8 KB, 16 KB, or 32 KB. Default is 4 KB. Wider rows or certain designs may use larger pages—chosen carefully with DBA guidance.
| Page size | Note |
|---|---|
| 4 KB | Default page size; common for many table spaces |
| 8 / 16 / 32 KB | Larger pages via corresponding buffer pools—row width and design driven |
Indexes also use buffer pools. Mixing everything into one tiny pool can force constant steal of buffers (evicting pages to make room), which shows up as I/O wait and busy DBM1 memory behavior. Separating hot indexes, large scanned tables, and LOB-related spaces into appropriate pools is a classic tuning pattern—you will see pool names in object DDL long before you tune thresholds yourself.
In Parallel Sysplex data sharing, a special group buffer pool resides in the coupling facility. It helps multiple Db2 members share information and keep data coherent when the same pages might be cached in more than one subsystem. If you are not on data sharing yet, remember the name; local buffer pools in DBM1 remain the day-one concept.
It is not a full guide to ALTER BUFFERPOOL thresholds, automatic sizing, or interpreting every statistics trace. Those belong in performance deep-dives. Here, fix the mental model: disk holds pages persistently; buffer pools hold pages for fast reuse; SQL still names tables.
1234567-- Application SQL (unchanged by pool internals) SELECT EMPNO, LASTNAME FROM HR.EMPLOYEE WHERE WORKDEPT = 'A00'; -- Behind the scenes: index/data pages checked in their buffer pools, -- with disk reads on misses
Imagine library books on far-away shelves (disk). A buffer pool is a small cart of books kept next to your reading chair. If the book is already on the cart, you read immediately. If not, someone fetches it from the shelf onto the cart. A bigger cart helps when many friends read the same popular books. Grown-ups decide how big each cart is so the library stays quick.
1. A Db2 buffer pool is:
2. Where do buffer pools reside?
3. Why are buffer pool sizes important?
4. Page size for a table space is tied to:
5. A group buffer pool is used in: