Difference between revisions of "How to improve harddisk performance"

From ThinkWiki
Jump to: navigation, search
(Added some hints and reformatted the text.)
(Description)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
== Description ==
 
== Description ==
This tweak can increase the performance of your HDD by enabling DMA, IDE 32-bit I/O and setting the interrupt-unmask flag, which improves Linux's responsiveness. The last parameter sets the IDE Block Mode to fetch 16 blocks per I/O interrupt. Depending on your drive this value may vary (have a look into the man page of hdparm).
+
This tweak can increase the performance of your HDD by enabling DMA, IDE 32-bit I/O and setting the interrupt-unmask flag, which improves Linux's responsiveness. The last parameter sets the IDE Block Mode to fetch 16 blocks per I/O interrupt. Depending on your drive this value may vary (run hdparm -iI /dev/hda to find it out).
  
'''Caution:''' On some hard disks these settings may corrupt the filesystem! Again, have a look into the man page of hdparm to find out if your model is affected.
+
'''Caution:''' On some hard disks, inadvertent experimenting with hdparm options may corrupt the filesystem! Again, have a look into the man page of hdparm to find out if your model is affected.
  
On most systems the specified device is just fine, but change it when necessary (on Ubuntu it's /dev/sda).
+
On systems where the traditional ATA/(E)IDE and ATAPI stack is used, the following is appropriate:
  
 
<pre>
 
<pre>
hdparm -d1c1u1m16 /dev/hda
+
hdparm -d1 -c1 -u1 -m16 /dev/hda
 
</pre>
 
</pre>
  
 +
On newer systems with SATA hard drives (exposed e.g. as /dev/sda), only -d option is applicable, and it has no effect as DMA is already enabled.  (An R61, interestingly, has a SATA HDD whilst the CD+DVD drive is connected via an IDE controller.)
 +
 +
You may also want to tune the acoustic setting (-M), power management mode (-B): for best performance, try -M254 and -B254).
  
 
== Successfully tested Thinkpad models ==
 
== Successfully tested Thinkpad models ==
 
The settings above have been successfully tested on the following models:
 
The settings above have been successfully tested on the following models:
  
T20, T22, T40
+
T20, T22, T23, T40
  
 
Please add your model if missing.
 
Please add your model if missing.

Latest revision as of 23:57, 10 November 2008

Description

This tweak can increase the performance of your HDD by enabling DMA, IDE 32-bit I/O and setting the interrupt-unmask flag, which improves Linux's responsiveness. The last parameter sets the IDE Block Mode to fetch 16 blocks per I/O interrupt. Depending on your drive this value may vary (run hdparm -iI /dev/hda to find it out).

Caution: On some hard disks, inadvertent experimenting with hdparm options may corrupt the filesystem! Again, have a look into the man page of hdparm to find out if your model is affected.

On systems where the traditional ATA/(E)IDE and ATAPI stack is used, the following is appropriate:

hdparm -d1 -c1 -u1 -m16 /dev/hda

On newer systems with SATA hard drives (exposed e.g. as /dev/sda), only -d option is applicable, and it has no effect as DMA is already enabled. (An R61, interestingly, has a SATA HDD whilst the CD+DVD drive is connected via an IDE controller.)

You may also want to tune the acoustic setting (-M), power management mode (-B): for best performance, try -M254 and -B254).

Successfully tested Thinkpad models

The settings above have been successfully tested on the following models:

T20, T22, T23, T40

Please add your model if missing.