I am learning at Node size with B+trees,it seems that storage speed is very important. I looked around and tried this

sudo hdparm -Tt /dev/sda


 Timing cached reads:   11956 MB in  1.99 seconds = 5993.51 MB/sec
 Timing buffered disk reads: 818 MB in  3.00 seconds = 272.52 MB/sec

Which cache timing refers to? It wolud be nice if someone could explain.

I looked at hdparam options.

sudo hdparm -f /dev/sda


What are the alternatives?

  • Welcome to the site. Can you check if your second hdparm example is complete? It looks as if it were missing lines. Also, what do your mean with "what are the alternatives"? Alternatives to using hdparm for hard disk tuning?
    – AdminBee
    Commented May 29, 2020 at 10:33
  • Yes,exactly hdparam alternatives.
    – mishav
    Commented May 29, 2020 at 10:55
  • I understand. Please, make sure to always include additional information into your question by editing it; if they are only in the comments, they might easily get overlooked.
    – AdminBee
    Commented May 29, 2020 at 11:09

2 Answers 2


Modern systems usually have drivers, which pick optimal settings automatically. So nowadays it is unlikely that significant improvement can be achieved by using hdparm. And playing with those settings requires good knowledge in the field, or else probability of damages is high. Good results may be achieved by investing in betted hardware. Especially using solid-state drives (SSD) instead of magnetic disks (HDD) brings huge improvement. Also better interface cards can significantly help. Then, organizing disks in RAID arrays with stripping to multiple physical disks, can deliver better IO values.

Regarding the question about hdparm test results: Linux uses available RAM to cache the IO operations, whenever possible. You can see size of this cache, e.g. with ‘top’ as ‘buff/cache’. It means, for usual IO operations data is put to memory and then transferred to disk (for write operations) or to the requesting process (for reads). Next read operation of the same data will not access storage, but deliver data directly from memory.

hdparm -t reads certain amount of data from storage. Then erases the cache area, where these data have been buffered, and reads them again. The measured throughput of such operation is displayed as ‘Timing buffered disk reads’. It reflects usual reading throughput, when data is freshly obtained from disk. For example, when streaming large video from disk for the first time.

hdparm -T does similar operation, but without flushing the buffer cache. So only first operation loads data to the buffer, and repeated reading delivers data from memory without disk operations. The measured throughput is displayed as ‘Timing cached reads’. This may reflect timing experienced when displaying the same picture several times one after another.

Your title-question ‘How to check Hard Disk speed’ is difficult to answer. Experienced disk speed depends largely on type of operation. Differences may be immense. For example, when you compare sequential read of large file, with random reads of 4K pages by a database process. So I usually determine the profile of operations, I need to use the storage for, and then simulate such load with IOzone (www.iozone.org).


Hard drives have cache.

That said, 6 GB/s seems like an unreasonable speed for disk cache access. SATA for example provides 6 gigabits per second of theoretical bandwidth, which would correspond to ~600 megabytes per second. Even Samsung 970 evo claims a maximum of 3.5 gigabits/second read speed. The "cached read" number looks like it reads data back from operating system cache (i.e. RAM, never hits the disk).

For an application using b+ trees, random access speed is more important than sequential/bulk i/o speed. There is various disk benchmark software written such as bonnie++ that can test random access.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .