[CentOS] Very slow disk I/O

Wed Jan 28 23:20:24 UTC 2015
Gordon Messmer <gordon.messmer at gmail.com>

On 01/28/2015 04:32 AM, Jatin Davey wrote:
> Could someone point me on how to improve the disk I/O on my server and
> reduce the wait time on I/O.

Start by identifying your disk and controller.  Assuming that this is a 
single SATA disk:

# smartctl -a /dev/sda | egrep 'Model:|Rate:|SATA Version'
# lspci | grep SATA

Next install and run iotop.  If there's something on your system that's 
particularly active and unnecessary, disable it.

If everything contending for your disk *is* necessary, then you may need 
to take steps to improve disk performance.  There are a number of 
possibilities.

1: Use an SSD instead of a disk.

2: Use an SSD in addition to a disk.  If a purely SSD storage system is 
too expensive, you might choose to use an SSD for one or more filesytems 
that you can mount where the high volume IO is occurring, and continue 
to use the disk for filesystems that need more data capacity and fewer IOPS.

3: Use a fast RAID array.  A RAID1 array can provide better read 
performance than a single disk.  For higher write volumes, use RAID10 on 
four or more disks.  Avoid RAID 5 or 6, as they'll be slower than a 
single disk.

4: Replace poorly supported hardware.  It might be that your SATA 
controller isn't well supported, and performs badly as a result.  I used 
to have a desktop system with NVidia motherboard chipset.  Its SATA 
controller was garbage.  Performance with the same disk was noticeably 
better with a cheap PCI-E SATA controller.