AlgoViz

Page cache, writeback and reclaim

medium 7 min

A buffered write initially modifies a cached page.

Where it shows up

The same pattern appears across everyday software.

  • Fast writes followed by a long stall

    Import jobs run normally for the first minute, then every few seconds a write blocks. Compare dirty and writeback bytes, device throughput and the time workers spend stalled. Clean file cache can often be reclaimed cheaply. Dirty pages need writeback, and anonymous pages have different reclaim options. Clearing caches can discard precisely the hot data the workload needs.

  • Verifying the intervention

    Pace the importer and reserve I/O capacity. Confirm that stalls and dirty backlog fall together. A flat dirty backlog with isolated long sync calls can indicate device flush latency rather than excessive buffered production.