Changes

Jump to: navigation, search

How to test the access speed of a Linux disk drive

1,698 bytes added, 17:32, 16 March 2007
New page: The access speed of a disk drive attached to a Linux system can tested using the Linux ''hdparm'' utility. ''hdparm'' is supplied as standard with most linux distributions and essentially ...
The access speed of a disk drive attached to a Linux system can tested using the Linux ''hdparm'' utility. ''hdparm'' is supplied as standard with most linux distributions and essentially provides a command line interface to the Linux disk device driver subsystem.

''hdparm'' supports a number of useful commandline options, although a number of the options reconfigure drive settings and such options be used with great care (if at all). As far as testing the access speed of the device, however, the ''-T'' and ''-t'' flags are of particular interest.

The ''-T'' flag performs a speed test on the Linux buffer cache and does not access the physical sisk drive. This is essentially a performance test of the system processor, cache and memory.

The ''-t'' flag performs the speed of reading from the physical disk device through the buffer cache. This test provides an indication of how fast the drive can sustain sequential data reads.

When using the above flags it is recommended that the tests are repeated 2 or 3 times on an inactive system with at least 1 or 2 megabytes of memory available. Appropriate user permissions are also required to run this utility.

For example, assuming the hard disk is device /dev/sda, hdparm would be run as follows:

<blockquote>
<pre>
/sbin/hdparm -Tt /dev/sda
</pre>
</blockquote>

This will provide two lines of information along the lines of:

<blockquote>
<pre>
/dev/sda:
Timing cached reads: 3652 MB in 2.00 seconds = 1827.27 MB/sec
Timing buffered disk reads: 168 MB in 3.08 seconds = 54.50 MB/sec
</pre>
</blockquote>

The first line is the speed of the Linux Buffer Cache. The second line tells you the speed transfer rate of the drive.

Navigation menu