Skip to content

Investigating disk I/O contention on a cloud VM

A cloud VM is suddenly slow, CPU looks fine, and the application is blaming the database. Here is how to confirm whether disk I/O contention is the actual cause.

A familiar ticket: “The site is slow, but CPU usage looks fine.” Application developers blame the database, the database team blames the network, and the symptom is real but nobody can name a cause. On a cloud VM, the most common culprit when CPU is idle and the app is slow is disk I/O — either the workload has outgrown its provisioned ceiling, or a noisy neighbour on shared storage is stealing IOPS.

What’s actually happening

Cloud VM disks have a provisioned IOPS and throughput limit. Once a workload hits that ceiling, additional I/O requests do not fail — they queue. The application sees this as latency: every database read takes longer, every log write blocks the worker that issued it, p95 climbs. The kernel reports the CPU as iowait, which most monitoring dashboards roll into “CPU usage looks fine” because it isn’t user or system time.

The other failure mode is the burst budget. Many baseline-disk tiers credit unused IOPS against a burst pool. A workload that has been running fine for weeks can degrade overnight when the burst pool empties and the steady-state ceiling is lower than the new sustained load.

How to verify

Confirm iowait is present and elevated:

top -bn1 | grep '%Cpu'
# or
mpstat 2 5

If the wa or %iowait column is consistently above 10–15%, I/O is a contributor. Now find the volume responsible:

iostat -xz 2 10

Read the %util (saturation), r/s + w/s (operations), await (request latency), and aqu-sz (queue depth). A volume at %util 95%+ with await over 20ms and a non-zero aqu-sz is being asked for more than it can deliver.

Identify which process is generating the load:

sudo iotop -oPa
# or, more portable
sudo pidstat -d 2 5

Cross-reference against the cloud provider’s volume metrics dashboard. If the provisioned IOPS line is being hit, this is a sizing problem. If the volume is well under its ceiling but await is high, suspect noisy-neighbour contention or a hypervisor-level issue and open a provider ticket with the iostat output.

The fix

If the workload has outgrown its provisioned IOPS, increase the volume’s IOPS provisioning or move to a higher tier (NVMe-class, provisioned-IOPS). If the workload is bursty and routinely depletes the burst budget, the baseline tier is the wrong product — switch to provisioned-IOPS. If the provider confirms a host-level issue, request a live migration. If the slow path is a database doing full table scans on a hot table, the cheapest fix is in the application, not the storage.

Stack Harbor diagnoses I/O contention as part of Cloud Compute operations. If your monitoring says CPU is fine but the application disagrees, we can find the actual bottleneck.