> For the complete documentation index, see [llms.txt](https://til.notdu.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://til.notdu.com/database/intro-to-database-systems/buffer-pool-and-memory-management/buffer-pool-optimizations/multiple-buffer-pools.md).

# Multiple Buffer Pools

The DBMS does not always have a single buffer pool for the entire system

* Multiple buffer pool instances
* Per-database buffer pool&#x20;
* Per-page type buffer pool

Helps reduce latch contention and improve locality

Approach #1: Object Id

-> Embed an object identifier in record ids and then maintain a mapping from objects to specific buffer pools

![](https://2548495579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTsnKOX7xLvOtvOXY9MlI%2Fuploads%2FCmiOQwGCrCQcrDrL4MBd%2Fimage.png?alt=media\&token=cedcbd3d-4e60-4e91-9100-49c957eef193)

Approach #2: Hashing

-> Hash the page id to select which buffer pool to access.

![](https://2548495579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTsnKOX7xLvOtvOXY9MlI%2Fuploads%2FiVk3NJBpQq0t2HGQg5H2%2Fimage.png?alt=media\&token=a1af4123-cc22-4fa4-8101-e450134f221c)
