Storage Performance and IO
Measuring and tuning the I/O path
IOPS, throughput, latency and burst — storage performance is measured at each layer. Matching IOPS/bandwidth to workload while avoiding throttling is how you keep databases fast and bills sane.
What you will learn
- Decompose IOPS, throughput and latency
- Provision IOPS where workloads need them
- Benchmark and tune storage performance
IOPS = operations per second, throughput = bytes/sec (IOPS × block size), latency = per-op time. Volume types fix the IOPS/throughput envelope; DBs need IOPS, media pipelines need throughput, neither wants latency spikes.
What is this?
IOPS vs throughput: a workload with 4KB random writes wants many IOPS; a video copy wants GB/s. Volume archetypes: gp3 (3000 baseline IOPS, 125 MB/s, burstable), io2 (provisioned up to 256K IOPS), st1 (throughput), Ultra Disk/pd-ssd/io2 for extreme IOPS. Latency also depends on host type, EBS-optimized instances, and filesystem mount options (noatime).
Why do you need it?
- Throttled volumes bottleneck whole apps at exactly the moment they need speed.
- Right IOPS sizing avoids the 'fast tier, idle tier' waste.
- Understanding burst mandates the credit-buoyancy of burstable volumes.
- Common interview: 'the DB is slow — is it IOPS, cache or network?'
Mental model
Kitchen staff capacity
IOPS/throughput
IOPS is how many dishes a kitchen can plate per minute (many small plates); throughput is how many kilograms it can move (few gigantic pots). Either maxed out — tiny appetizers or a 300-person banquet — shows up differently.
How it works
- Every op touches the storage network: NIC + hypervisor + storage backend → add host IOPS budget.
- Volume types set envelope: gp3/flat baseline, io2/provisioned, st1 throughput-focused.
- Burst balances replenish with workload; sustained load beyond baseline throttles to baseline.
- Mount options (noatime, NOCOW for DB on xfs) cut metadata ops.
- Filesystem block size vs application pattern shapes effective throughput.
The IO path.
Examples
Measure before you choose
# quick fio on a mounted volumesudo fio --name=randwrite --ioengine=libaio --rw=randwrite \ --bs=4k --size=2G --numjobs=4 --iodepth=32 --time_based \ --runtime=30 --group_reporting# reads underscore what the volume type actually sustainssudo fio --name=readtest --rw=read --bs=1M --numjobs=8 --iodepth=32 \ --runtime=30 --group_reportingSeparate random-IOPS and sequential-throughput benchmarks reveal which dimension your volume type provides.
In production
- A MySQL cluster uses io2 volumes with 30K IOPS and monitors Amazon EBS latency on p99.
- A rendering farm puts source textures on throughput-optimized st1 volumes read sequentially.
- Ultra Disk serves a financial ticker's extreme random IOPS with sub-ms latency.
Best practices
- Benchmark with your actual workload pattern (4K random vs 1M sequential).
- Pick IOPS to cover p99 write spikes, not just averages.
- Enable EBS-optimized/accelerated networking for tight I/O curves.
- Use noatime and align filesystems; set mount io stats for iostat visibility.
Common mistakes
- Buying the biggest IOPS and never benchmarking the actual need.
- Ignoring host-level ceilings: an un-optimized instance cap slices IOPS anyway.
- Interpreting average IOPS when the app needs sustained, not burst-then-throttle.
- Not using batching (iodepth): single-stream IO never saturates NVMe volumes.
Common issues
IOPS sit at exact baseline regardless of loadBurst balances exhausted
Provision a higher-IOPS volume type or reduce op size/batching to lower request rate.
Low throughput on a 'fast' volumeInstance network bandwidth ceiling or single-stream
Scale instance network budget, increase dept/parallelism, or move to a throughput type.
Debugging tips
- Run iostat -x: await/r_await show device latency vs total runtime.
- Compare measured IOPS to volume baseline: hitting baseline with sustained load = throttling.
- Check EBS VolumeQueueLength and burst balance metrics.
- Network-bound? 'netstat'/bandwidth metric on the instance reveals the NIC ceiling before the volume.
Interview checkpoint
Quick quiz
A customer copies 1 GiB files. Which storage dimension matters most?