~/talk

Practical Memory Tuning for PostgreSQL

Talkat PostgreSQL Conference Europe 2024 · 2024-10-22..10-25· [databases]
links:none on file
slides:none on file

Poor memory settings cause dramatic slowdowns: a misconfigured server shows an 11x reduction in throughput when buffers and swap are wrong, and the OOM killer targets recent backends and risks whole-cluster restarts. Hugepages matter at scale — a 160GB working set benchmark collapses without them at high client counts. Work_mem and hash_mem multiplier tuning speeds joins (multiplier=8 with work_mem=2 yields ~75% faster runs) while Postgres 17 brings a 5x reduction in vacuum memory and can use >1GB, avoiding many extra index scans. Beware prepared-statement bloat — 10 million prepared statements used 85GB and crashed the server.

AI-written summary · about

  1. 0:00Introduction and importance
  2. 1:52Memory, swapping, and OOM
  3. 3:17The role of swap memory
  4. 6:28Memory structure in PostgreSQL
  5. 9:01Understanding working sets
  6. 12:06Optimizing shared buffers
  7. 18:10Huge pages configuration
  8. 21:58Cluster and session parameters
  9. 24:00Work memory and operations
  10. 29:14Prepared statements bloat
  11. 30:55Maintenance work memory
  12. 32:56Vacuum performance in 17+
  13. 39:19Advanced vacuum configurations
  14. 42:17Questions and answers
~/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.