gortex icon indicating copy to clipboard operation
gortex copied to clipboard

v0.64.12: four single-file patch intervals report 12.65 GB of WAL traffic before a 16.94 GB checkpoint

Open ianrios opened this issue 2 days ago • 1 comments

On macOS with v0.64.12, we matched the structured daemon log to stderr and the WAL size sampled by our local maintenance job. This observation is separate from the older census reader in #1761 and may help narrow #1739.

The daemon restarted at 16:27 local time. At 16:57, the maintenance job measured a 16,938,642,552-byte WAL. Four completed single-file graph patches in one Python repository reported the following counters. The first and last rows refer to the same file. Each reported wal_bytes_reset=false.

End Delta class Incident edges Node rows Edge rows Reported WAL bytes Duration
16:48:09 structural 966 60,971 285,328 2,722,862,680 90 s
16:52:12 artifact_only 492 76,895 326,690 4,608,693,776 164 s
16:54:58 structural 862 35,946 117,696 2,543,972,256 81 s
16:56:54 structural 973 34,120 89,772 2,776,216,680 110 s

The four counters sum to 12.65 GB. They describe the patch intervals. Concurrent store activity could contribute, so they do not give exclusive per-patch attribution.

At 16:53:38 reclaim reported build_lane_busy, wal_bytes=9448651472, and backfilled_after=2293362 of 2293362 frames. At 16:57:25 a maintenance shutdown interrupted the next reclaim with 4051358 frames and backfilled_after=2293362. During a separate 17:02–19:02 window, 112 deferred retirement bursts also reported WAL traffic, totaling 6.87 GB across valid deltas.

Could the artifact-only patch counters distinguish writes from derived graph updates versus concurrent store work? That distinction would help isolate which write path to reduce. The data above comes from normal operation on an existing store.

ianrios avatar Dec 02 '26 12:12 ianrios

Additional measured interval on v0.64.12, separate from the repeated partial batch described in issue 1815. Over the half hour before a scheduled offline checkpoint, 24 completed working-tree build intervals reported 5.14 GB of WAL traffic. One worktree made forward progress by one path and its interval reported 4.64 GB. Nine graph patch intervals reported 0.37 GB. The counters can overlap and measure writes during intervals, so they cannot assign exclusive bytes to a single operation.

During this daemon lifetime the store logged nine long-reader warnings associated with snapshot retention. It also deferred a passive checkpoint while the build lane was busy. At 15:08 local time a generation bulk end reported checkpoint_deferred with 2,122,443 WAL frames and zero frames checkpointed in that stage. At 15:12:51 the local watchdog measured the physical WAL file at 11,527,941,312 bytes. Its offline checkpoint and restart completed at 15:18:06. The watchdog uses file length; it does not measure outstanding checkpoint debt at that instant.

This documents two independent sources of operational pain: high write traffic can occur while a worktree is making forward progress, and separate periods of failed or postponed reclamation can leave a large file on disk.

ianrios avatar Dec 02 '26 20:12 ianrios