hdparmtool is an easy to use tool to quickly asses your hard drive's speed. When performing speed tests
hdparmdisregards 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
hdparmshould provide you with a solid overview of your hard drive's speed. In the examples below we will use
/dev/sdaas our testing block device.
# hdparm -t /dev/sda /dev/sda: Timing buffered disk reads: 104 MB in 3.04 seconds = 34.25 MB/sec
# hdparm -t --direct /dev/sda /dev/sda: Timing O_DIRECT disk reads: 100 MB in 3.00 seconds = 33.31 MB/secIn the next example we will instruct
hdparmto read data from the second half of the disk that is if the hard drive size is 100GB.
hdparm --offset 50 -t /dev/sda /dev/sda: Timing buffered disk reads (offset 50 GB): 72 MB in 3.05 seconds = 23.61 MB/secTo obtain cached reads run the following command:
# hdparm --offset 50 -T /dev/sda /dev/sda: Timing cached reads: 4484 MB in 2.00 seconds = 2246.69 MB/sec