Ok here goes:
To test your current HD-performance use this:
[root@linus /root]# /sbin/hdparm -tT /dev/hda
/dev/hda:
Timing buffer-cache reads: 128 MB in 3.21 seconds = 39.88 MB/sec
Timing buffered disk reads: 64 MB in 10.14 seconds = 6.31 MB/sec
Before you go crazy write down your current settings:
[root@linus /root]# /sbin/hdparm /dev/hda
/dev/hda:
multcount = 16 (on)
I/O support = 0 (default 16-bit)
unmaskirq = 0 (off)
using_dma = 0 (off)
keepsettings = 0 (off)
nowerr = 0 (off)
readonly = 0 (off)
readahead = 8 (on)
geometry = 39703/16/63, sectors = 40020624, start = 0
Ok now off for some tweaking:
(-u[0|1] Controls interrupt-masks for the disk. Provides quite a boost)
(m[2, 4, 8, 16 or 32 ] Multiple sector mode ( IDE Block Mode), Controls how much data there is transfered per cycle)
-d[0|1] Selection/deselection of DMA-transfers.
-X[mode] controls the speed of the DMA-transfer. -X66 is UltraDMA mode 2, X67 is UltraDMA mode 3 and son on)
-c[0|1|2|3] E)IDE 32-bit I/O support. Set this at 3 for 32 I/O with sync
The setting below is for Ultra DMA 66-controllers:
[root@linus /root]# /sbin/hdparm -u1 -m32 -c3 -d1 -X67 /dev/hda
/dev/hda:
setting 32-bit I/O support flag to 3
setting multcount to 16
setting unmaskirq to 1 (on)
setting using_dma to 1 (on)
setting xfermode to 66 (UltraDMA mode2)
multcount = 16 (on)
I/O support = 3 (32-bit w/sync)
unmaskirq = 1 (on)
using_dma = 1 (on)
Now for the benchmark again. repeat this a few times
[root@linus /root]# /sbin/hdparm -tT /dev/hda
/dev/hda:
Timing buffer-cache reads: 128 MB in 3.23 seconds = 39.63 MB/sec
Timing buffered disk reads: 64 MB in 5.76 seconds = 11.11 MB/sec
When you have found a setting that does not give you error edit your /etc/rc.local and place the hdparm setting at the bottom of the file.