Test Disk Drive Read Speed With hdparm

hdparm

If you’d like to test the read speed of your hard disk drive(HDD) or solid state drive(SSD) or any type of drive, you can use hdparm on linux. hdparm is an excellent command-line tool to test your disk drive’s read speeds. hdparm can give you an accurate representation of the read speeds of your disk drives to see if they’re performing as expected.

Determine Disk to Test

Whether you have one or more attached disk drives to your computer, you need to determine the disk path.

The paths are listed as follows:

  • (/dev/hd*) = IDE disks: hard Disk Drives(HDD)
  • (/dev/sd*) = SATA disks: Solid State Drives(SSD)
  • (/dev/nvme*) = Express pci disks: Non-Volatile Memory Express(NVMe)

Get Disk Path

To get the disk path we will run the (fdisk) command in our terminal.

sudo fdisk -l

As you can see from the output below, my disk path is (/dev/sda).

Disk /dev/sda: 119.24 GiB, 128035676160 bytes, 250069680 sectors
Disk model: SAMSUNG SSD 830 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 0BB9721E-A0BC-734C-99A0-367A0D530AC2

Device      Start       End   Sectors   Size Type
/dev/sda1    4096    618495    614400   300M EFI System
/dev/sda2  618496 250067789 249449294 118.9G Linux filesystem

Test Disk Read Speed

Now that we have determined our disk path, it is time to run our read speed test.

To test the disk drive read speed we run the following (hdparm) command.

sudo hdparm -t /dev/sda

If you look at my output below, you can see that I’m getting “450.51 MB/sec” which is in line with what the manufacturer advertises. Not bad considering it’s a ten year old SSD as of the date of this article.

/dev/sda:
 Timing buffered disk reads: 1352 MB in  3.00 seconds = 450.51 MB/sec

Conclusion

You should now be able to test read speeds for any attached disk drive to your computer. For more hdparm options you can run (man hdparm) or (tldr hdparm) in your terminal.

Tags: tutorials, linux, command line
· More Articles ·

Show Comments 🗨