How to: Linux check IDE / SATA hard disk transfer speed
So how do you find out how fast is your hard disk under Linux? Is it running at SATA I (150 MB/s) or SATA II (300 MB/s) speed w/o opening computer case or chassis?
You can use hdparm command. It provides a command line interface to various hard disk ioctls supported by the stock Linux ATA/IDE/SATA device driver subsystem. Some options may work correctly only with the latest kernels (make sure you have cutting edge kernel installed). I also recommend to compile hdparm with the include files from the latest kernel source code. It provides more accurate result.
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
Output:
/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 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. Here is for loop 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
To find out SATA hard disk speed, enter:
sudo hdparm -I /dev/sda | grep SATA
Output:
* SATA-I signaling speed (1.5Gb/s)
* SATA-II 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.
Want to stay up to date with the latest Linux tips, news and announcements? Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
You may also be interested in other helpful articles:
- Linux smartd SATA drives support
- Linux Disk Benchmarking - IO Performance With fio Tool
- 4 TB Hard disk by 2011
- Linux Find SCSI Hard Disk Model, Serial Number, Size, and Total Sectors Information
- Does Ubuntu Linux kill / shorten hard disk life?
Discussion on This Article:
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!
Tags: disk_access_time, disk_speed_time, hdparm_command, linux_ata, sata_hard_disk, sudo_command



$ sudo hdparm /dev/sda (and following)should be
$ sudo hdparm -tT /dev/sda
to get the output you show and describe (At least on most distros).
thanks for the heads up!
I am trying to install linus n the machine having SATA Hard Drive .
Please let me know the URl or the site name where I will find these drivers
help me in finding SATA Hard Drive Drivers for Linux