HDPARM - IDE CONFIGURATOR
From: Peck Dickens <peck_d@bellsouth.net>
A friend of mine who uses redhat did the following to his
system that has IDE drives installed. I have done it once to a
system I have (p100) with IDE in it. However, it's probably
been a year so since I did it... Anyway the following does
greatly improve performance. Just remember: If you choose to do
this it is at your own risk and I don't want to hear about it
if your system gets trashed.
How to do it:
You must be logged in as root to do this. Also, make sure no
one else is using the hard drive (i.e. don't do this on a
production file server in the middle of a work day.) do *not*
not try this on SCSI hard drives. You have been warned.
Enter the following command at the # to check whether 32-bit
I/O and DMA are turned on.
hdparm -c -d /dev/hda
On a new install, they are probably set to 0 which means
they're turned off. Test the performance of the hard drive to
get a benchmark for later comparison. Enter the following
command at the # and give it about 15 to 30 seconds to
complete.
hdparm -t /dev/hda
Now, you should see something that looks like the
following:
/dev/hda
Tming buffered disk reads: 64 MB in 21.12 seconds = 3.03
MB/sec
Turn on DMA and 32-bit access and see if you get better
performance. Enter the following command at the # :
hdparm -c 1 -d 1 /dev/hda
Now run the test again.
hdparm -t /dev/hda
Here are what new results will sort-of look like:
/dev/hda
Timing buffered disk reads: 64 MB in 4.86 seconds = 13.17
MB/sec
About a 400% improvement. Make sure your system will use the
new settings after a rebooting. Enter the following command at
the # to save the new setting after a soft reboot:
hdparm -k 1 /dev/hda
To save these settings through a hard reboot, you must add a
line to a start-up scripts. Add the following line to the end
of the file /etc/rc.d/rc.local:
hdparm -c 1 -d 1 -k 1 /dev/hda
In this example, you are changing the settings for the first
hard drive your system (hda). If you have more than one IDE
hard drive, you should change the setting for it as well.
Be careful. *VERY* careful.
------------------
Here is the Oreilly Article:
http://linux.oreillynet.com/pub/a/linux/2000/06/29/hdparm.html
Here are the -X parameters:
IDE modes for hdparm -X parameters:
PIO mode
0 -X08 3.3MB/sec
1 -X09 5.2MB/sec
2 -X10 8.3MB/sec NEC PC-98*1
3 -X11 11.1MB/sec
4 -X12 16.7MB/sec
Single word DMA mode
0 2.1MB/sec
1 4.2MB/sec
2 8.3MB/sec
Multiword DMA mode
0 -X32 4.2MB/sec
1 -X33 13.3MB/sec
2 -X34 16.6MB/sec
Ultra DMA mode
0
1
2 -X66 33MB/sec UDMA33
3
4 -X68 66MB/sec UDMA66
|
|
|