~/talk

Getting the most out of pg_stat_io

Talkat PostgreSQL Conference Europe 2023 · 2023-12-12..12-15· [databases]
links:none on file
slides:none on file

PostgreSQL 16 adds pg_stat_io and it exposes concrete I/O counters: extends, evictions, hits, fsyncs, read/write counts and timings, but track_io_timing is off by default so enable it and use pg_test_timing utility and pg_reset_shared('io') to validate before measuring. Extends match 8KB blocks (example showed 8 extends → 8×8KB), evictions can hit ~150k when preloading large relations, and a developer-only direct I/O option shows ~5–10% speedup in simple benchmarks (requires restart and careful workload testing).

AI-written summary · about

  1. 0:00Introduction to pg_stat_io
  2. 1:08Default zero IO timings
  3. 4:02Tracking IO timing settings
  4. 4:23Understanding extends in PostgreSQL
  5. 10:19Evictions and cache behavior
  6. 17:45Interpreting eviction metrics
  7. 18:06Cache hits explained
  8. 22:04Hits vs evictions analysis
  9. 22:25Fsync operations overview
  10. 23:53Other pg_stat_io metrics
  11. 24:14Direct IO in PostgreSQL
  12. 26:17Summary and acknowledgments
  13. 27:27Q&A session
~/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.