{
  "status": "shipping",
  "advantages": [
    {
      "text": "Setting low_latency to 0 switches off the latency heuristics for a device whose only goal is maximum throughput.",
      "citationIds": [
        "bfq"
      ]
    },
    {
      "text": "Group weights from 1 to 1000, with a default of 100, are set through io.bfq.weight in cgroup v2 or blkio.bfq.weight in cgroup v1.",
      "citationIds": [
        "bfq"
      ]
    }
  ],
  "limitations": [
    {
      "text": "Enabling CONFIG_BFQ_CGROUP_DEBUG lowers the sustainable request rate because the blkio.bfq statistics are created and updated.",
      "citationIds": [
        "bfq"
      ]
    },
    {
      "text": "The default configuration favors latency over throughput, so its schedules can deliver lower throughput.",
      "citationIds": [
        "bfq"
      ]
    },
    {
      "text": "In v6.16, slice_idle uses integer division: setting slice_idle_us to 500 reads back as 0 milliseconds and 500 microseconds, even with strict_guarantees disabled. Neither readback measures an actual wait; inspect the microsecond value.",
      "citationIds": [
        "bfq-source"
      ]
    }
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-08",
  "slug": "bfq",
  "term": "Budget Fair Queueing (BFQ)",
  "aliases": [
    "BFQ",
    "Budget Fair Queuing"
  ],
  "definition": "Budget Fair Queueing is a Linux I/O scheduler that uses weighted queues and sector budgets to distribute storage service.",
  "note": "BFQ budgets count sectors rather than a fixed service time. Weights apportion bandwidth within an I/O-priority class, while classes have distinct priorities. It can switch to time-based sharing to limit throughput loss. [bfq]\n\nWith low_latency enabled, selected interactive and soft-real-time workloads receive raised weights. Configured weights alone therefore do not predict the observed bandwidth ratio. Idling and strict service settings also change the throughput and latency trade-off. [bfq]\n\nIn v6.16, strict_guarantees stops ordinary dispatch while tot_rq_in_driver is nonzero. Requests on the separate dispatch list are handled before that check, so it is not a universal queue-depth-one invariant. The reduced parallelism can lower throughput. [bfq-source]\n\nThe documentation reports about 1.9 µs of single-lock-protected processing per request on a dated notebook CPU, against 0.7 µs for mq-deadline, and this overhead limits the request rate a CPU can sustain. fifo_expire_sync defaults to 125 ms and fifo_expire_async to 250 ms. [bfq]\n\nIdling can preserve a synchronous queue's service share while its next request is still being prepared. On flash with internal command queueing, this can trade throughput for fairness or latency. [bfq] With strict_guarantees disabled, slice_idle=0 disables idling. Enabling strict_guarantees from zero raises any shorter interval to 8 ms. [bfq-source]\n\nLater slice_idle or slice_idle_us writes can lower that stored interval. Rewriting strict_guarantees=1 while already enabled does not clamp it again. The strict-mode branch precedes the zero-interval check, so a zero readback does not establish disabled idling. Record setter order and final values; the stored interval is not every actual wait duration. [bfq-source]",
  "related": [
    "io-scheduler",
    "blk-mq",
    "inter-flow-interference",
    "slowdown-fairness",
    "cgroup-v2-io-controller",
    "anticipatory-scheduling",
    "work-conserving-scheduler"
  ],
  "citations": [
    {
      "id": "bfq",
      "title": "Linux 6.16: BFQ, budgets, priority classes and low_latency",
      "url": "https://docs.kernel.org/6.16/block/bfq-iosched.html",
      "accessed": "2026-11-08"
    },
    {
      "id": "bfq-source",
      "title": "Linux v6.16: bfq-iosched.c, bfq_better_to_idle, bfq_strict_guarantees_store and __bfq_dispatch_request",
      "url": "https://github.com/torvalds/linux/blob/v6.16/block/bfq-iosched.c",
      "accessed": "2026-11-08"
    },
    {
      "id": "hesela",
      "title": "Hesela: Sharing an SSD: who pays for the slowdown?",
      "url": "https://hesela.com/analyses/ssd-fairness-shared-queues/",
      "accessed": "2026-10-21"
    }
  ],
  "provenance": [
    "bfq is the Linux 6.16 BFQ documentation, re-read for default tunables, cgroup weights and the published per-request overhead figures.",
    "bfq-source is the v6.16 bfq-iosched.c source, re-read on git.kernel.org at the same tag for the dispatch-list and tot_rq_in_driver checks.",
    "The inter-flow-interference entry links here because BFQ weights and budgets shape how concurrent flows share one device."
  ]
}
