Difference between revisions of "Hdparm"

From ArchWiki
Jump to: navigation, search
m (Category:Storage is a sub category of Category:Hardware. A page should not belong to parent and child category at the same time.)
m (link to the french wiki page)
Line 1: Line 1:
 
[[Category:File systems]]
 
[[Category:File systems]]
 
[[Category:Storage]]
 
[[Category:Storage]]
 +
[[fr:hdparm]]
 
{{lowercase title}}
 
{{lowercase title}}
 
hdparm is a performance and [[benchmarking]] tool for your hard disk (SATA/IDE).
 
hdparm is a performance and [[benchmarking]] tool for your hard disk (SATA/IDE).

Revision as of 11:58, 6 October 2012

hdparm is a performance and benchmarking tool for your hard disk (SATA/IDE).

Warning: Be careful, it is easy to destroy your hard drive with hdparm!

Installation

hdparm can be installed from the official repositories. For use with SCSI devices, install sdparm.

Usage

Disk info

To get information about your hard disk, run the following:

# hdparm -I /dev/sda

Reading speed MB/s

To measure how many MB/s your hard disk (SATA/IDE) can read, run the following:

# hdparm -t --direct /dev/sda

Writing speed MB/s

To measure how many MB/s your hard disk (SATA/IDE) can write, run the following:

$ sync;time bash -c "(dd if=/dev/zero of=bf bs=8k count=500000; sync)"

Do not forget to Template:Keypress and rm bf after that.

Note: bf is just the name of the output file that dd writes to.

Parking your hard drive

If your hard drive is clicking many times, the kernel is parking the hard drive's actuator arm (what moves the read/write head). This happens often on laptops (2.5" IDE hard drives). If it happens too often, it could damage your hard drive.

This will just park the reading head when you shut down the computer:

# hdparm -B254 /dev/sd

Default value is -B128. An average value could be -B199 if it is parking too often.

Tips and tricks

KDE => 4.4.4 and hdparm

To stop KDE version 4.4.4 or greater from messing around with your (manually) configured hdparm values, enter the following and you should be done:

# touch /etc/pm/power.d/harddrive