In this article we will describe some simple hard drive speed tests you can perform using your Linux system and command line tool hdparm. hdparm tool is an easy to use tool to quickly asses your hard drive's speed. When performing speed tests hdparm disregards files system currently in use as it writes to a raw device. The actual real read/write speed of your hard drive will be slightly slower and dependent on file system in use. In any case the hdparm should provide you with a solid overview of your hard drive's speed. In the examples below we will use /dev/sda as our testing block device.

First and most basic test is transfer speed test. Please note that all tests should be run multiple times and average time should be calculated to get more accurate result.
# hdparm -t /dev/sda

 Timing buffered disk reads: 104 MB in  3.04 seconds =  34.25 MB/sec

The next test you want to perform is data transfer rate but this time bypassing hard drive's buffer cache memory thus reading directly from the disk.
# hdparm -t --direct /dev/sda

 Timing O_DIRECT disk reads: 100 MB in  3.00 seconds =  33.31 MB/sec
In the next example we will instruct hdparm to read data from the second half of the disk that is if the hard drive size is 100GB.
hdparm --offset 50 -t /dev/sda
 Timing buffered disk reads (offset 50 GB):  72 MB in  3.05 seconds =  23.61 MB/sec
To obtain cached reads run the following linux command:
# hdparm --offset 50 -T /dev/sda

 Timing cached reads:   4484 MB in  2.00 seconds = 2246.69 MB/sec
Please refer all article related questions to:

You may also be interested in: