This guide helps Linux admins confirm or clear a suspected disk bottleneck with iostat, a standard tool that reports how busy each disk is. Maybe your server feels slow, the load average (the count of processes waiting on CPU or disk) is up, and you suspect the disk. iostat -x 1 can confirm or clear that suspicion in about thirty seconds, as long as you read the right columns. Run iostat -x 1 and ignore the first block of numbers. That block is an average since boot, not what is happening now. Then watch three columns together. r_await and w_await show how long each read or write request (each I/O, short for input/output) waits, in milliseconds. aqu-sz shows how many requests are queued or in flight at once. %util shows how busy the device looks. High await plus an aqu-sz above 1 means the device cannot keep up. A high %util on its own proves almost nothing, especially on SSD or NVMe drives that serve many requests in parallel. The sections below read a real saturated-disk sample line by line. Then they show how to prove the disk is the bottleneck, rather than the CPU or the application, before you spend money on faster storage.
What you’ll accomplish
- Read every column of
iostat -x—%util,await,r_await/w_await,aqu-sz,r/s,w/s,rMB/s,wMB/s— and know which ones actually indicate trouble. - Tell a saturated device (deep queue, rising latency) from one that only looks busy.
- Find the process responsible with
pidstat -dandiotop. - Confirm the bottleneck is disk I/O and not CPU iowait or memory pressure, before you change anything.
- Avoid the interpretation traps that send people to buy faster disks they did not need.
Prerequisites
- The
iostat,pidstat, andmpstatbinaries all come from the sysstat package. Install it withapt install sysstaton Debian and Ubuntu,dnf install sysstaton Fedora and RHEL,apk add sysstaton Alpine. You do not need to enable the sysstat data collector (thesarcron job) — that is for historical logging. Interactiveiostatworks the moment the package is present. - No root needed to read
iostatorvmstat; both read counters any user can see.pidstat -dandiotopneed privilege to attribute I/O to processes you do not own — usesudothere. - Be honest about
%util. On a single spinning disk it is a fair proxy for saturation, because that device serves one request at a time. On an SSD or NVMe drive that services many requests in parallel,%utilreaching 100% only means “at least one request was in flight the whole interval” — the device can often absorb far more. On those devices, trustaqu-szandawait, not%util. - Version note: sysstat 12 renamed the queue-depth column from
avgqu-sztoaqu-szand removedsvctm(service time), which had become unreliable on modern multi-queue storage. Runiostat -Vto see your version. This guide uses the current names and points out the old ones where they differ.
How it works
The kernel keeps a running set of counters for every block device in /proc/diskstats — total reads completed, sectors read, milliseconds spent reading, the same three for writes, and the number of I/Os currently in progress. These are monotonic counters, not rates. iostat reads them once, waits your interval, reads them again, and divides the difference by the elapsed time. That is why the first report from iostat -x 1 covers the entire time since boot: there is no earlier snapshot to subtract, so it averages everything the machine has ever done. It is nearly useless for diagnosing a live problem. Every report after the first covers just that one interval, which is what you want.
Each column is a specific arithmetic result from those counter deltas:
r/s,w/s— read and write requests completed per second. This is IOPS, the request rate.rMB/s,wMB/s— megabytes read and written per second. This is throughput. (Without-m, the columns arerkB/sandwkB/sin kilobytes.)r_await,w_await— the average time, in milliseconds, that a read (or write) request spent from the moment it was queued until it completed. This includes time waiting in the queue plus time being served. It is the latency the application actually feels. The older singleawaitcolumn is the blend of both.aqu-sz(formerlyavgqu-sz) — the average number of requests that were outstanding on the device during the interval. Derived from the time-in-queue counter, it is the single best saturation signal: below 1 means the device usually had at most one thing to do; consistently above 1 means requests are stacking up behind each other.%util— the percentage of wall-clock time during which the device had at least one request in flight. Read the honesty note above before you lean on it.
Step-by-step
1. Start a live 1-second sample and discard the first block. The interval argument is what turns iostat from a since-boot summary into a live monitor:
iostat -x 1
The first report is the since-boot average — scroll past it. Read the second and later blocks. If you want to skip the noise entirely, ask for a fixed number of reports and read the last one: iostat -x 1 5 prints five intervals and stops.
2. Read a saturated device, column by column. Here is a real-looking block from a host where writes are backing up on sda. Some merge and request-size columns are trimmed to fit:
Device r/s w/s rkB/s wkB/s rrqm/s wrqm/s r_await w_await aqu-sz %util
sda 8.0 412.0 128.0 53657.6 0.0 22.0 2.10 36.80 9.44 98.7
nvme0n1 95.0 610.0 6144.0 78233.6 0.0 4.0 0.09 0.14 0.30 96.0
Read sda as a sentence: 412 writes per second at ~52 MB/s, each write waiting 36.8 ms, with 9.44 requests queued on average and the device busy 98.7% of the time. High latency, a deep queue, and near-total busy time all agree — sda is saturated. Now read nvme0n1 right below it and notice the trap in advance: it is also 96% utilized, but w_await is 0.14 ms and aqu-sz is 0.30. That device is handling a lot of parallel small I/O comfortably. Its %util looks alarming and its actual latency is excellent. Same %util, opposite conclusion — which is exactly why you never diagnose on %util alone.
3. Trim the report to disks only. By default iostat also prints a CPU summary line. When you only care about devices, -d drops the CPU block:
iostat -xd 1
4. Filter to the device you care about. Pass device names as positional arguments and iostat reports only those, which keeps a busy multi-disk host readable:
iostat -xd 1 sda nvme0n1
5. Switch to MB/s when the question is throughput. -m prints rMB/s and wMB/s instead of the default kilobyte columns — easier to reason about when you are chasing bandwidth rather than IOPS:
iostat -xdm 1 sda
6. Attribute the I/O to a process. iostat tells you a device is busy; pidstat -d tells you who is making it busy. This is the step that turns a symptom into a cause:
sudo pidstat -d 1
04:12:07 UID PID kB_rd/s kB_wr/s kB_ccwr/s iodelay Command
04:12:08 1001 8421 0.00 51284.00 0.00 612 postgres
04:12:08 0 744 0.00 16.00 0.00 3 journald
kB_wr/s is the process’s write rate to the block layer, and iodelay is the time (in clock ticks) its tasks were blocked waiting on I/O. Here postgres is doing essentially all the writing that sda is struggling with — the two numbers line up, so you have your culprit.
7. Watch it live with iotop. When you want a top-style, continuously sorted view rather than a scrolling log, iotop ranks processes by current disk I/O:
sudo iotop -oPa
-o shows only processes actually doing I/O, -P aggregates threads to processes, -a shows accumulated totals since it started. It is not from sysstat — install it separately (apt install iotop) — but it pairs naturally with pidstat for confirmation.
Validate it works
You have a saturated device and a process that looks responsible. Confirm the chain before you act on it.
Confirm the CPU is genuinely waiting on I/O. A disk can be busy while the real bottleneck is elsewhere. Check the iowait share of CPU time:
vmstat 1
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
r b swpd free buff cache si so bi bo in cs us sy id wa st
1 6 0 210344 18400 984120 0 0 4 52240 1802 3611 6 4 12 78 0
The wa column is the percentage of CPU time spent waiting on I/O; the b column counts processes blocked on it. Here wa is 78 and six processes are blocked — the CPU is mostly idle because it is stuck waiting for the disk. That is a disk bottleneck confirmed from the CPU’s side. The same number is the %wa field in top. If instead wa were near zero while us or sy were high, your problem would be CPU, not disk, no matter how busy iostat looked.
Confirm the process and the device agree. Cross-check that the pidstat -d write rate for your suspect roughly matches the wMB/s that iostat shows for the device. In the example, postgres at ~51 MB/s accounts for the ~52 MB/s on sda. When those two numbers match, the causal chain is complete: this process is loading this device past what it can serve.
Troubleshooting
%util is 100% but the disk is fine. This is the single most common misread. On an SSD or NVMe device that serves requests in parallel, %util saturates long before the hardware does — it only measures whether something was in flight, not whether the device was maxed out. If aqu-sz is well under 1 and await is a fraction of a millisecond (see the nvme0n1 row above), the device has headroom regardless of what %util says. Believe the queue depth and the latency.
The first sample looks catastrophic, then everything is calm. You read the first block of iostat -x 1 and saw huge numbers. That block is the average since boot — it is not now. Always discard it and read from the second interval onward. If a script feeds iostat output somewhere, have it drop the first report.
Few IOPS but enormous await. A device doing 3 reads per second with a r_await of 800 ms is not saturated — a saturated device is busy. This pattern (tiny request rate, huge latency, aqu-sz near 1) is the signature of a failing or degrading disk: the drive is retrying sectors internally. Stop tuning and check dmesg for I/O errors and smartctl -a /dev/sda for reallocated sectors before you trust the device at all.
LVM, dm-crypt, or multipath double-counts the I/O. On a stacked setup, the same write appears on the logical device (dm-0, vg-lv) and again on the physical disk under it (sda). Summing them overcounts. Decide which layer answers your question: the dm-* device shows what the filesystem is asking for; the physical device shows what the hardware is actually doing. When they diverge sharply, the mapping layer (encryption, RAID, thin provisioning) is where the time is going.
A brief spike right after a cold start. Numbers that are ugly for a few seconds after boot or a mount, then settle, are usually cache warm-up — the page cache is cold and every read hits the disk. Watch for thirty seconds before you call it a problem. A real bottleneck is sustained, not a transient.
When this is the wrong approach
iostat gives you rates and averages per device. It cannot show you the distribution of latency — an average w_await of 8 ms can hide a tail of 200 ms operations that are the actual pain. When you need the shape of the latency, not its mean, reach for a tracing tool: biolatency from bcc/BPF prints a latency histogram per device, and biosnoop traces individual I/Os with the issuing process. Those answer questions iostat structurally cannot.
iostat also cannot see a cloud provider’s throttling. On AWS EBS, Google Persistent Disk, or Azure managed disks, the volume can be throttled by an IOPS or throughput cap, or by exhausted burst credits, while the guest’s iostat shows high await and a full queue with no local fault at all. If the numbers say saturation but the workload has not changed, check the provider’s volume metrics for a throttling event before you blame the guest.
Finally, if the real problem is an application calling fsync on every small write, no amount of reading iostat fixes it — you will watch a healthy disk spend its life on durability barriers. That is an application design question (batch the writes, or relax the durability guarantee where it is safe), not a metrics one. Confirm the disk is genuinely the limit first — a full disk is a different story — and remember a process stuck on I/O can look like one stuck on a socket, which is its own triage entirely.
The iostat(1) man page documents every column and flag, and is worth reading once end to end.
If this is the kind of work you’d rather never own again, it’s the daily job of Managed Cloud Ops — book an infrastructure review.