Measure Hard Disk Data Transfer Speed
Measure Hard Disk Data Transfer Speed
Login as the root and enter the following command:$ sudo hdparm -tT /dev/sda
OR
$ sudo hdparm -tT /dev/hda
Sample outputs:
/dev/sda: Timing cached reads: 7864 MB in 2.00 seconds = 3935.41 MB/sec Timing buffered disk reads: 204 MB in 3.00 seconds = 67.98 MB/sec
For meaningful results, this operation should be repeated 2-3 times. 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.
Here is a for loop example, to run test 3 time in a row:
for i in 1 2 3; do hdparm -tT /dev/hda; done
Where,
- -t :perform device read timings
- -T : perform cache read timings
- /dev/sda : Hard disk device file
sudo hdparm -I /dev/sda | grep -i speed
Output:
* Gen1 signaling speed (1.5Gb/s) * Gen2 signaling speed (3.0Gb/s)
Above output indicate that my hard disk can use both 1.5Gb/s or 3.0Gb/s speed. Please note that your BIOS / Motherboard must have support for SATA-II.
dd Command
You can use the dd command as follows to get speed info too:dd if=/dev/zero of=/tmp/output.img bs=8k count=256k rm /tmp/output.img
Sample outputs:
262144+0 records in 262144+0 records out 2147483648 bytes (2.1 GB) copied, 23.6472 seconds, 90.8 MB/s
found at http://www.cyberciti.biz/tips/how-fast-is-linux-sata-hard-disk.html
Comments
Post a Comment