~/talk

Problem in PostgreSQL SLRU - And how we are optimizing it

Talkat PGConf.dev 2024 · 2024-05-28..05-31· [databases]
links:none on file
slides:none on file

Identifies severe SLRU contention where a 64-entry subtransaction cache overflow plus a long‑running transaction makes pgbench on a 128‑core machine fall from ~38,000 TPS to ~18,000 and then near zero; generating many multi‑xacts also drives vacuum and table bloat. Implements a configurable SLRU split into associative buffer banks (small fixed bank size, e.g., 16 slots), per‑bank locks and per‑bank LRU counters in PG 17. Tests show the patch avoids freezes, reduces global lock and cacheline churn, and yields 2–3x performance improvements under the problematic workloads.

AI-written summary · about

  1. 0:00Introduction and agenda
  2. 1:40SLRU system design
  3. 4:22Identifying design problems
  4. 7:55Subtransaction cache overflow
  5. 11:51Snapshot and visibility analysis
  6. 19:14Multixact contention
  7. 24:00Multixact SLRU mechanics
  8. 28:35Proposed optimization strategies
  9. 35:04Implementing bank-based design
  10. 40:03Performance test results
  11. 43:59Summary and Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.