PDA

View Full Version : Speed up Hard drive access in Fedora (Ultra DMA)


James
3rd April 2004, 02:04 PM
This small guide will speed up your ultra dma hard disk drive access.

1. Log in as root as these commands can only be run as root.

2.*Open a terminal and type in hdparm -c3 -u1 -a64 -k1 /dev/hda

3. Now if you prefer using a gui you can browse to the location /etc/rc.d/ and open the rc.local file with your favourite text editor, now type in the same command into the config script hdparm -c3 -u1 -a64 -k1 /dev/hda , now save the file and the command will be run every time you start up fedora.

The above step can also be done from the command line by typing. emacs /etc/rc.d/rc.local and then adding the hdparm line as above, once finished save the current buffer and exit, you could also use vi /etc/rc.d/rc.local if you prefer vi.

* This is the explanation of the hdparm commands.

c3 = get/set IDE 32-bit IO setting
u1 = set unmaskirq flag to on
a64 = set fs readahead to 64
k1=turn on set keep_settings_over_reset flag

I experimented quite a bit with the settings and after numerous benchmarks, i found that these settings work best for me.

r3zzo
3rd April 2004, 06:15 PM
Thanks, it's work fine in my computer. :)

redhat71
4th April 2004, 01:33 AM
Originally posted by James
I experimented quite a bit with the settings and after numerous benchmarks, i found that these settings work best for me.

does the test result (hdparm -tT) beat the default one ?

i tried this before when i was still with redhat linux, but (on my linux box) it seems it's already "optimized" by default
the test results of whatever custom settings i played with hdparm, are less or equal to the default one

also, anyone happens to know if there are some "standard" benchmark data (of hdparm) that i can use to compare with my own

i mean like:
pata100/7200/2M: xx
pata100/7200/8M: xx
sata150/7200/8M: xx

Woogie
4th April 2004, 04:06 AM
FYI - These settings can also be placed in the file /etc/sysconfig/harddisks

wshawn
4th April 2004, 10:47 PM
[root@localhost root]# hdparm -tT /dev/hda

/dev/hda:
Timing buffer-cache reads: 1220 MB in 2.00 seconds = 610.00 MB/sec
Timing buffered disk reads: 46 MB in 3.07 seconds = 14.98 MB/sec
[root@localhost root]# hdparm -tT /dev/hdc

/dev/hdc:
Timing buffer-cache reads: 1216 MB in 2.00 seconds = 608.00 MB/sec
Timing buffered disk reads: 96 MB in 3.00 seconds = 32.00 MB/sec
[root@localhost root]# hdparm -c3 -u1 -a64 -k1 /dev/hda

/dev/hda:
setting fs readahead to 64
setting 32-bit IO_support flag to 3
setting unmaskirq to 1 (on)
setting keep_settings to 1 (on)
IO_support = 3 (32-bit w/sync)
unmaskirq = 1 (on)
keepsettings = 1 (on)
readahead = 64 (on)
[root@localhost root]# hdparm -tT /dev/hda

/dev/hda:
Timing buffer-cache reads: 1212 MB in 2.00 seconds = 606.00 MB/sec
Timing buffered disk reads: 60 MB in 3.07 seconds = 19.54 MB/sec
[root@localhost root]# hdparm -c3 -u1 -a64 -k1 /dev/hdc

/dev/hdc:
setting fs readahead to 64
setting 32-bit IO_support flag to 3
setting unmaskirq to 1 (on)
setting keep_settings to 1 (on)
IO_support = 3 (32-bit w/sync)
unmaskirq = 1 (on)
keepsettings = 1 (on)
readahead = 64 (on)
[root@localhost root]# hdparm -tT /dev/hdc

/dev/hdc:
Timing buffer-cache reads: 1076 MB in 2.00 seconds = 538.00 MB/sec
Timing buffered disk reads: 98 MB in 3.05 seconds = 32.13 MB/sec
[root@localhost root]#

gonzalo76
18th April 2004, 09:21 PM
Here's a good tutorial

http://ccrma.stanford.edu/planetccrma/software/tunesystem.html