When your CPU spends significant time waiting for disk operations to complete (I/O wait), everything on the server slows down even though CPU usage itself may look low. This guide covers identifying and resolving disk I/O bottlenecks.
Step 1 — Confirm I/O Wait Is the Issue
top
Look at the %wa (I/O wait) value in the CPU summary line. Sustained values above 10–20% indicate the disk is a genuine bottleneck.
Step 2 — Get Detailed I/O Statistics
sudo apt install sysstat -y
iostat -x 2 5
Key columns to watch:
%util— how saturated the disk device is (near 100% means it's a bottleneck)await— average time (ms) for I/O requests to complete; high values mean slow response
Step 3 — Identify Which Process Is Generating the I/O
sudo apt install iotop -y
sudo iotop -oa
This shows exactly which process is responsible for the disk activity, sorted by usage.
Common Causes and Fixes
Database Performing Excessive Disk Reads
Often means the working data set doesn't fit in the database's memory cache. See How to Tune MySQL/MariaDB Performance for a VPS — increasing innodb_buffer_pool_size is frequently the fix.
A Backup Job Running During Peak Hours
crontab -l
Reschedule heavy backup jobs to low-traffic hours if they're currently overlapping with production usage.
Swapping Due to Memory Pressure
vmstat 1 5
High si/so values mean the system is actively swapping, which generates significant disk I/O as a side effect — the real fix is addressing the underlying memory shortage, not the disk itself. See How to Diagnose and Fix Out of Memory (OOM) Errors.
Log Files Being Written Excessively
Verbose logging (especially debug-level logging left enabled in production) can generate substantial disk write load — review and reduce log verbosity where appropriate.
Underlying Storage Simply Too Slow for the Workload
If a database or heavy I/O application is running on standard SSD rather than NVMe storage, consider whether an upgrade to faster storage is warranted — see How to Choose the Right VPS Specs for a Database Server.
Step 4 — Verify the Fix
iostat -x 2 5
Confirm %util and await have dropped to reasonable levels after addressing the root cause.
Common Errors
High I/O wait but iotop shows nothing significant — check for swap activity with vmstat, since swapping generates I/O that may not show clearly attributed to a specific "application" process.
Diagnostic Checklist
top— check%wato confirm I/O wait is elevatediostat -x— check%utilandawaitfor the specific disk deviceiotop— identify the specific process generating I/O- Address the root cause: database tuning, memory pressure, scheduling, or storage upgrade
Related Articles
- How to Diagnose a Slow VPS: Complete Performance Checklist
- How to Tune MySQL/MariaDB Performance for a VPS
- How to Diagnose and Fix Out of Memory (OOM) Errors
