Disk IO Errors: Troubleshooting On Linux Servers
Disk IO Errors: Troubleshooting On Linux Servers
on Linux Servers
Disk IO errors (input/output) issues are a common cause of poor performance
on web hosting servers. Hard drives have speed limits, and if software tries to
read or write too much data too quickly, applications and users are forced to
wait. To put it another way, storage devices can be a bottleneck that stops the
server from reaching its full performance potential.
Disk IO is not the only cause of slow servers, so in this article, we’ll explain
how to use Linux IO stats to identify disk IO issues and how to diagnose and
fix servers with storage bottlenecks.
If you observe any of these, high IO loads might be the culprit, but how do you
know it’s a storage bottleneck rather than a problem with the network or
processor?
vmstat 1 10
iostat -md
The -m option tells iostat to display statistics in megabytes per second, and -d
says we’re interested in device utilization.
The device called vda is writing 730 MB of data each second. Whether that’s
a problem depends on the capabilities of the server and the device, but with
the observed performance degradation and large IO wait times, it’s
reasonable to conclude that excessive disk IO on vda is the cause of our
issues.
There is one other piece of information that could help us narrow things down:
the mount point of the vda device. The mount point is the directory on the
server’s filesystem the device is connected to. You can find it with
the lsblk command.
DMA isn’t available on all servers and, with virtual servers in particular, you
may not be able to modify hard drive settings.
Upgrade Server Hardware
If configuration tweaks don’t solve your IO issues, it’s time to think about
upgrading, replacing, or reorganizing the server’s hardware.
Disk IO bottlenecks can be tricky to diagnose, but the process we’ve outlined
here will help you to quickly determine whether you have an IO problem,
which drives are affected, and what you can do to improve your server’s
performance.
As always, if you have any feedback or comments, please let us know. We
are here to help in the best ways we can. You’ll find us on Discord, the cPanel
forums, and Reddit.