First, to see how you've got things configured for, say the primary master IDE drive, type...
hdparm /dev/hda
...or...
hdparm -I /dev/hda
...for really detailed info, or....
hdparm -i /dev/hda
...for some terse info.
Note you do NOT specify the partition number as we're just looking at the drive.
Among other things, you'll see an entry that says 'using_dma', indicating whether this drive has DMA on or off. (CAVEAT: messing with hdparm is not something you would do on a live, production system! Although I have never experienced it, messing with the settings could corrupt your disk!)
To turn DMA off, type...
hdparm -d0 /dev/hda
...or to turn it back on...
hdparm -d1 /dev/hda
OK, maybe you think I'm making this up - how do I tell if it really turned on or off? Well, turns out hdparm can run a benchmark test for you. To do so, type...
hdparm -tT /dev/hda
You will get a report after a bit. At least on my system here I saw an improvement of 9X on my buffered disk reads.
The optimal combo I got on my
L440GX+ mobo with an
WD1800JB hard drive was...
hdparm -c3 -d1 -a16 -p4 -X udma2 -M128 /dev/hda
With these results:
Timing buffer-cache reads: 128 MB in 0.83 seconds =154.22 MB/sec
Timing buffered disk reads: 64 MB in 2.58 seconds = 25.10 MB/sec
...with the caveat that UDMA2 is the fastest mode it will take. The
-M128 puts it in accoustically quiet mode, but I can't tell a difference.
Lastly, you can read this nice article for more info, esp on getting DMA to turn on for fussy motherboards.
http://linux.oreillynet.com/pub/a/linux/2000/06/29/hdparm.html
--
MattWalsh - 22 Oct 2002