Menu

Fast Disks, Slow WAL Sync: Finding Linux Writeback Throttling
📰

Fast Disks, Slow WAL Sync: Finding Linux Writeback Throttling

DEV Community: azure·Franck Pachot·18 days ago
#rr9lPcDx
Long article (731 words) — no AI summary yet.
Reading 0:00
15s threshold

As described in the previous post , the primary now uses a high-I/O Ultra disk. Reads and writes took fractions of a millisecond, yet PostgreSQL WAL synchronization averaged 25-30 ms. Removing synchronous-standby waits didn't help: synchronous_commit=local still requires local WAL durability. With device-read constraints reduced and remote acknowledgments excluded, I traced the primary's synchronization call across the guest-OS boundary.

To investigate those durable-commit timings, I returned to synchronous_commit=on with normal HA for a full repeat, then used a separate pilot prepared for controller tracing.

Measure the synchronization, not only the disk

The relevant cumulative PostgreSQL counters are:

SELECT wal_write , wal_sync , wal_write_time , wal_sync_time , stats_reset FROM pg_stat_wal ;

Enter fullscreen mode

Exit fullscreen mode

With track_wal_io_timing=on , the interval mean is:

mean WAL sync ms = delta(wal_sync_time) / delta(wal_sync)

Enter fullscreen mode

Exit fullscreen mode

The full…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.