PGCon2016 - 1.1.35

PGCon 2016
The PostgreSQL Conference

Andres Freund
Day Talks - Day 2 - 2016-05-20
Room DMS 1160
Start time 13:00
Duration 00:45
ID 958
Event type Lecture
Track Hacking
Language used for presentation English

PostgreSQL's buffer manager - Problems & Improvements

The buffer manager (primarily configured by shared_buffers) is the part of Postgres that caches on-disk data in memory. That is required both for correct crash recovery and performance.

Unfortunately some parts are showing its age. We'll discuss how it currently works, what problems there are, and what attempts are in progress to rectify these weaknesses: * Checkpoints can sometimes trigger huge amounts of IO, leading to long delays of concurrent requests * Lookups in the buffer cache are expensive * The Buffer Mapping table is a hash table, making efficient implementations of prefetching, write coalescing, dropping of cache contents hard * Relation extension scales badly * Cache replacement is inefficient and often replaces the wrong buffers * Double Buffering between the OS and postgres

The exact content of the talk will take the state of postgresql's master branch from around the conference into account. It'll less focus on how to tune postgres, and more on how postgres itself can be improved.