{
  "slug": "linux-io-priority",
  "term": "Linux I/O priority",
  "aliases": [
    "ioprio",
    "I/O scheduling priority",
    "ionice"
  ],
  "definition": "Linux I/O priority assigns a scheduling class and level to a thread's I/O, with effects determined by the storage path and scheduler.",
  "note": "Scope: ioprio_set selects threads, a process group or a user. IOPRIO_WHO_PROCESS with who=0 addresses the calling thread, not automatically every sibling thread; CLONE_IO can share an I/O context. [ioprio-api]\n\nClasses: realtime (RT), best-effort (BE) and idle (IDLE) express scheduling priority. BE levels run from 0 (highest) to 7 (lowest), but their effect is scheduler-specific. Linux 6.12 documentation names BFQ and mq-deadline as supporting priorities. [ioprio-doc]\n\nInterpretation: BFQ maps levels to baseline weights; low-latency heuristics can raise effective weights. Linux v6.12 mq-deadline selects class queues and allows aged lower-priority requests to proceed; its dispatch does not use the within-class level. The realtime name alone supplies no request-completion deadline. [ioprio-bfq] [ioprio-deadline]\n\nWriteback: ordinary buffered asynchronous writes are later issued outside the dirtying thread's context. Do not infer their priority from that thread's setting. Cgroup io.prio.class can also change request classes; io.max separately limits per-device BPS or IOPS and permits temporary bursts. [ioprio-api] [ioprio-cgroup]",
  "status": "shipping",
  "advantages": [],
  "limitations": [
    {
      "text": "Changing host scheduling priority does not reserve private SSD channels or make an in-flight device command preemptible.",
      "citationIds": [
        "hesela"
      ]
    },
    {
      "text": "BFQ strict_guarantees waits for outstanding I/O to complete before dispatching another request, trading device parallelism for service-order control; low_latency weight raising is a separate policy.",
      "citationIds": [
        "ioprio-bfq"
      ]
    }
  ],
  "related": [
    "io-scheduler",
    "bfq",
    "mq-deadline",
    "cgroup-v2-io-controller",
    "semi-preemptible-io"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-13",
  "citations": [
    {
      "id": "ioprio-api",
      "title": "Linux man-pages: ioprio_set(2), thread scope and asynchronous writes",
      "url": "https://man7.org/linux/man-pages/man2/ioprio_set.2.html",
      "accessed": "2026-11-13"
    },
    {
      "id": "ioprio-doc",
      "title": "Linux v6.12: block I/O priorities and scheduler support",
      "url": "https://raw.githubusercontent.com/torvalds/linux/v6.12/Documentation/block/ioprio.rst",
      "accessed": "2026-11-13"
    },
    {
      "id": "ioprio-bfq",
      "title": "Linux 6.12: BFQ per-process ioprio, weights and idle-class service",
      "url": "https://docs.kernel.org/6.12/block/bfq-iosched.html",
      "accessed": "2026-11-13"
    },
    {
      "id": "ioprio-deadline",
      "title": "Linux v6.12: mq-deadline class queues and priority aging",
      "url": "https://github.com/torvalds/linux/blob/v6.12/block/mq-deadline.c",
      "accessed": "2026-11-13"
    },
    {
      "id": "ioprio-cgroup",
      "title": "Linux 6.12: cgroup v2 I/O limits, writeback and priority policy",
      "url": "https://docs.kernel.org/6.12/admin-guide/cgroup-v2.html#io",
      "accessed": "2026-11-13"
    },
    {
      "id": "ioprio-paper",
      "title": "Valente and Andreolini, SYSTOR 2012: Improving Application Responsiveness with the BFQ Disk I/O Scheduler",
      "url": "https://iris.unimore.it/bitstream/11380/812721/3/a6-valente.pdf",
      "accessed": "2026-11-13"
    },
    {
      "id": "hesela",
      "title": "Hesela: Sharing an SSD: who pays for the slowdown?",
      "url": "https://hesela.com/analyses/ssd-fairness-shared-queues/",
      "accessed": "2026-11-13"
    }
  ],
  "provenance": [
    "Kernel behavior is scoped to Linux v6.12 documentation and source; no device benchmark or latency guarantee is inferred.",
    "The man-page API and writeback scope are used here, not its historical CFQ-only scheduler-support paragraph.",
    "The SYSTOR 2012 BFQ study explains responsiveness-oriented weight raising on three rotational-disk systems; it is historical evidence, not an NVMe benchmark. [ioprio-paper]"
  ]
}
