Dirty-page throttling
Dirty-page throttling regulates Linux tasks that modify cached file data to restrain dirty-memory accumulation relative to writeback progress.
In Linux 6.12, dirty_background_bytes or dirty_background_ratio controls background writeback, while dirty_bytes or dirty_ratio contributes to writer throttling. The settings in each byte/ratio pair are alternatives, not additive: setting one makes its counterpart read as zero. Ratios use eligible available memory, not installed RAM. [1]
The implementation normally slows writers progressively. It distributes dirty-memory allowances among writeback instances using completion shares, subject to configured bounds; the global threshold is not an exact per-file quota. Writer throttling counts dirty pages plus pages under writeback; background triggering excludes the latter. WBT instead uses block-layer read-latency feedback. [2] [5]
The age knob dirty_expire_centisecs concerns writeout eligibility; dirty_writeback_centisecs sets periodic wakeups. Both use hundredths of a second. Zero for the wakeup setting disables the periodic trigger, not all writeback. Neither defines a durability deadline: synchronization and its error handling remain separate. [1] [4]
With supported cgroup writeback, both global and cgroup dirty-memory constraints are evaluated and the more restrictive applies. Byte settings are converted to ratios for groups, not copied as identical byte allowances. Available memory is constrained by memory-controller limits and system clean memory. Inode ownership can misattribute concurrent cross-group writers. [3]
Relations
Advantages
- Slows producers as dirty-memory pressure rises, helping balance cached writes against writeback progress. [2]
Limitations
- Thresholds and periodic timers do not establish a per-write persistence deadline or application-latency guarantee. [2, 1, 4]
- Cgroup writeback requires filesystem support and does not precisely attribute simultaneous writers from different groups to one inode. [3]
Citations
- Linux 6.12 VM sysctl documentation: dirty thresholds, age and periodic writeback
- Linux v6.12 mm/page-writeback.c: __wb_calc_thresh and balance_dirty_pages
- Linux 6.12 cgroup v2: writeback ownership and dirty-memory constraints
- Linux man-pages: fsync(2), synchronization, directory entries and errors
- Linux v6.12 block/blk-wbt.c: read-latency feedback for write throttling
Sources & caveats
- Version-pinned synthesis of Linux 6.12 documentation and upstream implementation; not a claim about every filesystem, distribution or later kernel.
- No sysctl changes, kernel experiment, benchmark or recommended tuning values. The fsync manual supplies the separate synchronization contract.