Skip to content

iostat - CPU and Disk I/O Statistics Cheatsheet

iostat - CPU and Disk I/O Statistics Cheatsheet

iostat reports CPU utilization and per-device disk I/O statistics — throughput, IOPS, request latency, and queue depth. It is the standard first stop for diagnosing storage bottlenecks on Linux: is the disk saturated, are requests queuing, is latency spiking? It ships as part of the sysstat package alongside mpstat, pidstat, and sar.

Installation

PlatformCommand
Debian/Ubuntusudo apt install sysstat
Fedora/RHELsudo dnf install sysstat
Arch Linuxsudo pacman -S sysstat
macOSiostat is built in (different output)
Verifyiostat -V

Basic Usage

CommandDescription
iostatOne report since boot (CPU + devices)
iostat 2Refresh every 2 seconds
iostat 2 55 reports, 2 seconds apart
iostat -xExtended stats (the useful ones)
iostat -dDevice stats only (no CPU)
iostat -cCPU stats only

The Command You Actually Want

# Extended, human-readable, per-device, every 2s
iostat -xmt 2
FlagEffect
-xExtended statistics (util%, await, aqu-sz, …)
-mReport in MB/s (use -k for KB/s)
-tPrint a timestamp with each report
-p DEVShow partitions of a device (e.g. -p sda)
-d 2Device report every 2 seconds
-hHuman-readable, NVMe-friendly formatting

Reading Extended Output (-x)

ColumnMeaning
r/s, w/sRead/write requests per second (IOPS)
rMB/s, wMB/sRead/write throughput
rareq-sz / wareq-szAverage request size
r_await, w_awaitAvg read/write latency (ms) — key metric
aqu-szAverage queue depth (requests in flight)
%utilFraction of time the device was busy

Interpreting the Signals

ObservationInterpretation
%util near 100%Device is saturated (careful on SSD/NVMe — can parallelize)
High await (tens of ms+)Requests are slow — latency bottleneck
High aqu-szRequests piling up faster than the disk drains
High IOPS, low throughputSmall random I/O (typical DB/metadata workload)
Low IOPS, high throughputLarge sequential I/O (backups, streaming)

On modern SSD/NVMe, %util can read 100% while the device still has headroom (it services requests in parallel). Trust await and aqu-sz more than %util there.

CPU Section

FieldMeaning
%user / %niceTime in user space
%systemTime in the kernel
%iowaitCPU idle waiting on I/O (storage pressure hint)
%stealTime stolen by the hypervisor (noisy neighbors)
%idleIdle time

High %iowait alongside high disk await points squarely at storage as the bottleneck.

Common Workflows

# Watch a suspected disk bottleneck live
iostat -xmt 2

# Focus on one device and its partitions
iostat -xmt -p nvme0n1 2

# Correlate CPU iowait with device latency during a load test
iostat -xmt 1 60 > iostat.log
ToolFocus
iostatPer-device I/O + CPU stats
iotopWhich process is doing the I/O
dstat/doolCombined CPU/disk/net in one view
sarHistorical/recorded system activity

Use iostat to see the device is slow, then iotop to find which process is responsible.

Resources