Buffer pool
An area of memory where DB2 keeps recently used pages of data and indexes, so it does not have to read them from disk each time.
Also written bufferpool, BP0, getpage, buffer pool hit ratio
DB2 reads and writes data in pages, usually 4 KB each, and keeps copies of recently used pages in memory. These memory areas are buffer pools. When a program needs a page that is already in a buffer pool, DB2 can use it at once. If not, it has to read it from disk, which takes much longer.
A DB2 system has several buffer pools with names such as BP0, BP1 and BP32K. Each table space and index is assigned to one. Database administrators separate them by use, for example putting busy indexes in a pool of their own so they stay in memory.
The key measures are getpages, how many times DB2 asked for a page, and how many of those needed a read from disk. The fewer the reads, the better the pool is working. Making a pool larger usually helps, as long as there is enough real memory to back it.
As a developer, you will not set buffer pools, but you will hear about them in performance discussions. A query that reads far more pages than it needs puts pressure on the pools and slows other work too.
Where can I learn this hands-on?
Right here, at ZedBank. You take a junior job at a simulated bank and learn each part of the work by doing it, with Zed beside you. There's nothing to install.
Start at ZedBankRelated
- DB2 for z/OSIBM's relational database on the mainframe, where a great deal of the world's banking and insurance data is stored.
- Table spaceThe storage structure in DB2 for z/OS that holds the data of one or more tables, kept in VSAM datasets that DB2 manages.
- IndexA structure that lets a database find rows by value without reading the whole table.
- Virtual storageThe memory each address space sees, which z/OS maps onto real memory and disk so that every program appears to have its own large space.
- DB2 data sharingA way of running several DB2 subsystems on different systems of a sysplex so that they all share the same databases.