There are a couple useful utilities on Linux to test disk input/ouput.
Sequential Disk Access: hdparm
The hdparm command will test sequential disk access and can be used with the below command. Replace /dev/sda1 with the mounted disk you would like to test such as /dev/hda1.
- hdparm -t /dev/sda1
The results will output similar to the below.
- [root@server dir]# hdparm -t /dev/sda1
- /dev/sda1:
- Timing buffered disk reads: 356 MB in 3.00 seconds = 118.66 MB/sec
Real Time Random Access: iostat
The iostat utility can be used to check real time random access of the disk. There are many switches to use but basic functionality can be seen by using the below command.
- iostat -d 2 5
The above will provide 5 sets of data that are 2 seconds apart for each mounted disk. The results of the above command will look like the below.
- [root@server ~]# iostat -d 2 5
- Linux 2.6.18-xen (server.example.com) 01/20/09
- Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
- sda1 16.60 83.49 254.11 614751330 1871144208
- sda2 0.00 0.00 0.00 10448 8280
- Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
- sda1 30.35 0.00 374.13 0 752
- sda2 0.00 0.00 0.00 0 0
- Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
- sda1 18.91 0.00 266.67 0 536
- sda2 0.00 0.00 0.00 0 0
- Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
- sda1 44.78 0.00 772.14 0 1552
- sda2 0.00 0.00 0.00 0 0
- Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
- sda1 0.00 0.00 0.00 0 0
- sda2 0.00 0.00 0.00 0 0
Random Access: seeker
On the linuxinsight.com web site there is another utility called seeker that will test random disk access as well. The utility and more information can be located here.
Hey Alex! Thanks for sharing your experience…… have a great day.