The Alchemy of Shared Buffers: Balancing Concurrency and Performance
Josef Machytka: Speaker portfolio
The Alchemy of Shared Buffers: Balancing Concurrency and Performance
*Josef Machytka: Speaker portfolio*
This talk offers source code guided dive into PostgreSQL’s shared buffers architecture: the three‑layer design, the hit/miss/I‑O lifecycle, and how pins, per‑page LWLocks, and atomic BM_* flags coordinate page‑granular concurrency. We will trace clock‑sweep and buffer rings that prevent big scans and VACUUM from polluting the cache.
Key takeaways
- Architecture & synchronization: three-layer design; buffer pins + per-page LWLocks + partitioned hash table mapping enable fine-grained concurrency
- Eviction & cache pollution control: clock-sweep algorithm maintains hot pages in cache; buffer rings fence off bulk operations like sequential scans and VACUUM
- Performance tuning: balance double-buffering effects, size shared_buffers sensibly, optimize checkpoint parameters; validate with EXPLAIN (BUFFERS) and pg_stat_bgwriter metrics
Presented At & Slides
- CERN PGDay 2026 (slides — talk 45 minutes)
- HOW2026 Jinan China (slides — talk/workshop 3 hours, repository)
Recording
Photos

© HOW2026 conference orginizers

© Adrien Obernesser — LinkedIn
메타데이터
- post_id
- 2e15be67aefe
- slug
- the-alchemy-of-shared-buffers-balancing-concurrency-and-performance-2e15be67aefe
- url
- https://medium.com/@josef.machytka/the-alchemy-of-shared-buffers-balancing-concurrency-and-performance-2e15be67aefe
- canonical_url
- https://medium.com/@josef.machytka/the-alchemy-of-shared-buffers-balancing-concurrency-and-performance-2e15be67aefe
- author_url
- https://medium.com/@josef.machytka
- status
- ok
- fetched_at
- 2026-06-20 20:29:01