HOWTO: hdparm - A Guide to Hard Disk Tweaking

Permabanned
Joined
18 Oct 2002
Posts
2,010
Location
Huddersfield / Antartica
HOWTO: hdparm - A Guide to Hard Disk Tweaking


When you run the "hdparm -tT" command you can see the current I/Os from your hard drive benchmarked.

First run hdparm -tT as root and see what scores you get, preferably post them so I can see how much difference it makes!

There are ways to improve these scores, the best being:

  • 32bit accessing (c)
  • DMA (d)
  • Multiple sector count (m)
To enable these:
[/code]hdparm -c 1 -d 1 -m 16 /dev/xxx[/code]

Where /dev/xxx is your hard drive

Another important option is the enabling of UDMA 33/66/100.

Add the -X option, and then this number i.e. (-X 69)

  • X 33 = Multiword DMA
  • X 66 = ATA-33 (UDMA2)
  • X 68 = ATA-66 (UDMA4)
  • X 69 = ATA-100 (UDMA 5)

People have asked me about ATA-133, Im afraid I dont know how to enable this!

Now, enable the -k 1 option, to allow the settings to be kept over a reboot.

add the whole line to your /etc/rc.local/local.start (in gentoo) to allow these tweaks on bootup.

Happy tweaking!

Shak
 
Before (hdparm -d 1 /dev/hdb):

Code:
/dev/hdb:
 Timing buffer-cache reads:   128 MB in  2.07 seconds = 61.84 MB/sec
 Timing buffered disk reads:  64 MB in  2.69 seconds = 23.79 MB/sec

After (hdparm -c 1 -d 1 -m 16 -X 66 /dev/hdb):
Code:
/dev/hdb:
 Timing buffer-cache reads:   128 MB in  2.04 seconds = 62.75 MB/sec
 Timing buffered disk reads:  64 MB in  2.72 seconds = 23.53 MB/sec

Should I be expecting better than that?
 
I get very slow speeds on my older machines, I've always got around 130MB/sec on my Xeons.

[root@flash incoming]# hdparm -tT /dev/hdg

/dev/hdg:
Timing buffer-cache reads: 128 MB in 0.87 seconds =147.13 MB/sec
Timing buffered disk reads: 64 MB in 45.66 seconds = 1.40 MB/sec

What awful buffer speeds, that's a Seagate Barracuda IV.
 
Last edited:
Sorry guys I have to do it :)

hdparm.jpg


In your /etc/rc.local/local.start (in gentoo) or other startup scripts if you use
Code:
hdparm -qc1 -qd1 -qm16 /dev/xxx
You'll get it in quite mode so no splurge or hdparm info on your screen at boot.
 
Back
Top Bottom