Linux iowait
Linux iowait is a CPU-time accounting category for idle time attributed to outstanding I/O waits.
The /proc/stat cpu and cpuN lines expose this category in USER_HZ units, alongside other CPU-time categories. The aggregate cpu line combines the per-CPU figures. These are not bytes, completed requests or device-busy time. [1]
In Linux v6.12, account_idle_time adds idle time to CPUTIME_IOWAIT when the current runqueue's nr_iowait is positive, otherwise to CPUTIME_IDLE. An I/O-blocked task need not prevent another task from using the CPU, so low iowait does not establish low application I/O latency. [2] [1]
The documented /proc/stat iowait value can decrease under some conditions, and per-CPU attribution is difficult on multicore systems. A collector should retain this caveat rather than interpret every negative delta as a reboot or silently treat the field as strictly monotonic. [1]
PSI io.pressure instead tracks intervals with stalled tasks: some includes at least one stalled task; full includes all non-idle tasks stalled together. Its total uses microseconds. CPU iowait, PSI and process byte counters describe different scopes and cannot substitute for one another. [3]
Application-level blocked-time analysis is a different measurement. Ousterhout et al. instrumented Spark tasks and simulated scheduling after removing disk or network waits. Their best-case estimate is not obtainable by subtracting host iowait from job runtime. [4]
Relations
Limitations
Citations
- Linux 6.12: /proc/stat CPU accounting and iowait limitations
- Linux v6.12 kernel/sched/cputime.c: account_idle_time
- Linux 6.12: Pressure Stall Information
- Ousterhout et al. Making Sense of Performance in Data Analytics Frameworks. NSDI 2015, pp. 293-307, section 2.3
Sources & caveats
- Source synthesis from Linux 6.12 documentation and version-pinned accounting code; no workload benchmark or new host experiment.
- The named helper illustrates one implementation path, not every architecture, kernel configuration or distribution patch.