hdparm provides a command line interface to various kernel interfaces supported by the Linux SATA/PATA/SAS “libata” subsystem and the older IDE driver subsystem.

hdparm [ flags ] [device]

-T Perform timings of cache reads for benchmark and comparison purposes. For meaningful results, this operation should be repeated 2-3 times on an otherwise inactive system (no other active processes) with at least a couple of megabytes of free memory. This displays the speed of reading directly from the
Linux buffer cache without disk access. This measurement is essentially an indication of the throughput of the processor, cache, and memory of the system under test.

root@desktop:~#hdparm -T /dev/sda
/dev/sda:
Timing cached reads: 2254 MB in 1.99 seconds = 1131.64 MB/sec

-t Perform timings of device reads for benchmark and comparison purposes. For meaningful results, this operation should be repeated 2-3 times on an otherwise inactive system (no other active processes) with at least a couple of megabytes of free memory. This displays the speed of reading through the buffer cache to the disk without any prior caching of data. This measurement is an indication of how fast the drive can sustain sequential data reads under Linux, without any filesystem overhead. To ensure accurate measurements, the buffer cache is flushed during the processing of -t using the BLKFLSBUF ioctl.

root@desktop:~# hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 118 MB in 3.01 seconds = 39.16 MB/sec

Trackback URI | Comments RSS

Leave a Reply

You must be logged in to post a comment.