Cookbook recipe

Checkpoint frequency too high — I/O spike pattern

Applies to PostgreSQL 13–17 Last reviewed Nov 2025 Grounded in source
Estimated investigation4 min

Scenario

Periodic I/O storms are visible in storage metrics, correlating with PostgreSQL checkpoints running far more frequently than configured. Diagnose it Requires PostgreSQL 16+ (on earlier versions, checkpoint counts were in pg_stat_bgwriter which had a different column…

Investigation Path

Periodic I/O storms are visible in storage metrics, correlating with PostgreSQL checkpoints running far more frequently than configured.

Diagnose it

Requires PostgreSQL 16+ (on earlier versions, checkpoint counts were in
pg_stat_bgwriter which had a different column set):

SELECT num_timed,
       num_requested,
       num_done,
       round(write_time  / 1000.0, 1) AS write_s,
       round(sync_time   / 1000.0, 1) AS sync_s,
       buffers_written,
       stats_reset
FROM pg_stat_checkpointer;

If num_requested > num_timed, checkpoints are being forced by WAL fill
rather than by the time interval (checkpoint_timeout). This is the clearest
sign that max_wal_size is too small for your write rate.

This is a Pro lesson

Get every Learning Pathway and cookbook recipe — grounded in PostgreSQL source code, with diagnostics, fixes, and prevention for each topic.

Continue this lesson to learn:

  • Why it happens
  • How to fix it
  • Prevent it next time
  • Related & next steps
  • All 36 Learning Pathway lessons
  • 170+ cookbook recipes
  • Source-grounded diagnostics & fixes

Secure checkout Cancel anytime Source-grounded

Career Impact

This scenario builds production judgment and operational confidence under pressure.

Open Career Dashboard →

Keep going

Related & next steps

Was this helpful?

← All cookbook recipes