How to Test Disk Read Speed in Linux using the hdparm Command

Diagnosing Storage Bottlenecks

When a Linux server is experiencing severe performance degradation, the CPU and RAM are often the first components investigated. However, in many database-heavy workloads or file-server environments, the actual bottleneck is the physical storage drive. If the hard drive (HDD) or Solid State Drive (SSD) is failing or connected via a degraded SATA port, its read speeds will plummet, causing the entire operating system to hang while waiting for data.

To quickly diagnose whether the storage hardware is performing optimally, you can use the hdparm command to execute a rapid, low-level disk read benchmark directly from the terminal.

Step 1: Identify the Drive Identifier

Before you can benchmark a drive, you need to know its block device name (e.g., /dev/sda, /dev/nvme0n1).

Run the following command to list all attached storage drives:

lsblk

Look for the primary disk containing your operating system or the specific drive you want to test. For this example, we will assume the drive is /dev/sda.

Step 2: Run the Benchmark

The hdparm utility requires root privileges to bypass the standard file system and interact directly with the hardware controller.

Run the command with the -t (timing buffered disk reads) and -T (timing cached reads) flags:

sudo hdparm -Tt /dev/sda

Understanding the Output

The test takes approximately 3 to 5 seconds to complete. The output will look something like this:

/dev/sda:
 Timing cached reads:   14324 MB in  2.00 seconds = 7168.03 MB/sec
 Timing buffered disk reads: 1532 MB in  3.00 seconds =  510.45 MB/sec
  • Timing cached reads: This measures how fast data can be read directly from the Linux kernel’s RAM cache, completely bypassing the physical disk. This number will be incredibly high (often 5000+ MB/sec) and serves as an indicator of your processor and RAM speed, rather than your hard drive speed.
  • Timing buffered disk reads: This is the most critical metric. This measures how fast the system can pull data directly off the physical platters or NAND flash of the drive.
    • A modern NVMe SSD should show results above 2000 MB/sec.
    • A standard SATA SSD should show roughly 500 MB/sec.
    • A traditional mechanical HDD will usually show between 80 and 150 MB/sec.

If your SATA SSD is reporting read speeds of 15 MB/sec, you have immediately identified a severe hardware failure, a dying drive, or a failing SATA controller, allowing you to begin disaster recovery procedures immediately.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.