- Hdparm
hdparm is a command line utility for the
Linux operating system to set and view IDEhard disk hardware parameters. It can set parameters such as drive caches, sleep mode, power management, acoustic management, and DMA settings.Changing hardware parameters from suboptimal conservative defaults to their optimal settings can improve performance greatly. For example, turning on DMA can in some instances double or triple data throughput. Unfortunately at present there's no reliable method for determining the optimal settings for a given controller/drive combination, except careful trial and error; nor is there yet any central database that collects and shares the combined experience of "hdparm" users.
"hdparm" has a more serious drawback: it can crash a computer and make data on its disk inaccessible if certain parameters are misused. Out of approximately forty parameters, seven are dangerous and may result in "massive filesystem corruption":
* -m set multiple sector I/O count
* -n set "ignore write errors" flag
* -p set PIO mode
* -u set interrupt-unmask flag
* -U unregister IDE interface
* -w reset a device
* -X set IDE transfer modeBefore using "hdparm" it is important to read its
man page , and (if testing any of its seven dangerous parameters) to have a full backup of everything on the drive."hdparm" is
free software under theBSD license .Usage
hdparm [flags] [device]
Important: hpdarm has to be run with root privileges, otherwise it will either not be found or not be executed properly.
Examples:
Turn on DMA for the first hard drive. hdparm -d1
/dev/hda Turn off DMA for the first hard drive. hdparm -d0 /dev/hda
Test cache read performance of the first hard drive hdparm -T /dev/hda
Test read performance of the first hard drive hdparm -t /dev/hda
External links
* [http://sourceforge.net/projects/hdparm/ Sourceforge Project Page]
* [http://freshmeat.net/projects/hdparm/ Freshmeat Project Page]
* [http://gentoo-wiki.com/HOWTO_Use_hdparm_to_improve_IDE_device_performance Gentoo Wiki - HOWTO Use hdparm]
* [http://hdparm-win32.dyndns.org/hdparm/ hdparm for Windows]
Wikimedia Foundation. 2010.