hdparm is a command-line utility to set and view ATA and SATA hard disk drive hardware parameters.
sudo hdparm -I /dev/sdX
WARNING: Be sure that no other programs are stressing the drive at the time of testing!
sudo hdparm -tT /dev/sdX
sudo hdparm -d /dev/sdX
NOTE: This is not consistent.
Set features by putting the value directly behind the parameter (without space).
Example, to enable the DMA mode:
sudo hdparm -d1 /dev/sdX
WARNING: Changing the default values can harm the drive or freeze the system.
The following tables introduces the most common parameters.
For a complete list see the hdparm man page.
Parameter | Description |
---|---|
-B | Set the Advanced Power Management feature. The value 1 saves the most energy, the value 255 disables the feature. The values in-between are corresponding steps. Values of 127 and below allow the spin-down of the drive. |
Warning - Aggressive power management can wear the drive because of often spin-downs. | |
-d | Set the DMA feature for IDE and PATA drives. The value 1 enables the feature, 0 disables the feature. |
-E | Set CD / DVD drive speed. Lower speeds can reduces the running noise. |
-M | Set the Automatic Acoustic Management feature. The values 0 disables the feature, 128 sets the most quiet mode, 254 is the fastest mode. |
-S | Set the standby (spin-down after idling) timeout. The value 0 disables the feature, the values from 1 to 240 specifies time steps of 5 seconds, 241 to 251 time steps of 30 minutes. |