{
  "slug": "dirty-page-throttling",
  "term": "Dirty-page throttling",
  "aliases": [
    "Linux dirty throttling",
    "dirty-memory throttling"
  ],
  "definition": "Dirty-page throttling regulates Linux tasks that modify cached file data to restrain dirty-memory accumulation relative to writeback progress.",
  "note": "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. [dirty-vm]\n\nThe 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. [dirty-code] [wbt-code]\n\nThe 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. [dirty-vm] [dirty-fsync]\n\nWith 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. [dirty-cgroup]",
  "advantages": [
    {
      "text": "Slows producers as dirty-memory pressure rises, helping balance cached writes against writeback progress.",
      "citationIds": [
        "dirty-code"
      ]
    }
  ],
  "limitations": [
    {
      "text": "Thresholds and periodic timers do not establish a per-write persistence deadline or application-latency guarantee.",
      "citationIds": [
        "dirty-code",
        "dirty-vm",
        "dirty-fsync"
      ]
    },
    {
      "text": "Cgroup writeback requires filesystem support and does not precisely attribute simultaneous writers from different groups to one inode.",
      "citationIds": [
        "dirty-cgroup"
      ]
    }
  ],
  "related": [
    "page-cache",
    "buffered-io",
    "cgroup-v2-io-controller",
    "linux-writeback-throttling",
    "fsync"
  ],
  "citations": [
    {
      "id": "dirty-vm",
      "title": "Linux 6.12 VM sysctl documentation: dirty thresholds, age and periodic writeback",
      "url": "https://docs.kernel.org/6.12/admin-guide/sysctl/vm.html",
      "accessed": "2026-11-30"
    },
    {
      "id": "dirty-code",
      "title": "Linux v6.12 mm/page-writeback.c: __wb_calc_thresh and balance_dirty_pages",
      "url": "https://github.com/torvalds/linux/blob/v6.12/mm/page-writeback.c",
      "accessed": "2026-11-30"
    },
    {
      "id": "dirty-cgroup",
      "title": "Linux 6.12 cgroup v2: writeback ownership and dirty-memory constraints",
      "url": "https://docs.kernel.org/6.12/admin-guide/cgroup-v2.html#writeback",
      "accessed": "2026-11-30"
    },
    {
      "id": "dirty-fsync",
      "title": "Linux man-pages: fsync(2), synchronization, directory entries and errors",
      "url": "https://man7.org/linux/man-pages/man2/fsync.2.html",
      "accessed": "2026-11-30"
    },
    {
      "id": "wbt-code",
      "title": "Linux v6.12 block/blk-wbt.c: read-latency feedback for write throttling",
      "url": "https://github.com/torvalds/linux/blob/v6.12/block/blk-wbt.c",
      "accessed": "2026-11-30"
    }
  ],
  "status": "shipping",
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-30",
  "provenance": [
    "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."
  ]
}
