[Techtalk] hdparm ?

Akkana Peck akkana at shallowsky.com
Sun Apr 11 21:07:14 EST 2004


ed orphan writes:
> Somebody who claims to be an expert told
> me that using hdparm would significantly
> improve hard drive performance.

[several people respond NONONO, hdparm is dangerous!]

The main use I've had for hdparm is that some kernels, especially
the kernels that come with distros, are overly cautious and don't
use DMA on disk drives that can support DMA perfectly well.
Not using DMA will hurt your performance quite a lot.
Usually you'll get warnings during fsck that DMA is off, but not
always, so run hdparm -d /dev/hda (or whatever your disk is named)
to find out.  Using hdparm like this to check (rather than change)
parameters is harmless and useful.

If you have a kernel/drive combination like this, it's probably
best to build a new kernel and see if that cures the problem,
or do a web search on your disk drive name to see if there are
any known problems with DMA; but if you don't want to build a
kernel and can't find any known problems, then running hdparm -d1
will enable DMA.

And yes, it might be dangerous if there's some good reason DMA
was off, though I haven't had any problems on the few machines where
I've used it.  Of course, make backups first any time you start
fiddling with disk drives.  And run dmesg periodically in case
you start getting any disk-related warnings (running dmesg now
and then is a good idea anyway, since there might be warnings
about other problems which you wouldn't otherwise see).

If you do build a kernel, look at the other IDE parameters which
are tunable in the kernel configuration -- some IDE controllers
might benefit from changes in this section, though most of the
time you won't see much improvement.

	...Akkana


More information about the Techtalk mailing list