hdparm /dev/hda (or whatever harddrive you have linux on)
My output looks like this:
/dev/hda:
multcount = 16 (on)
IO_support = 1 (32-bit)
unmaskirq = 1 (on)
using_dma = 1 (on)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 8 (on)
geometry = 14593/255/63, sectors = 234441648, start = 0
The important one to look at is the 'using_dma' one. If that is
not on, then it explains your problem. You can set this by
issuing this command:
# hdparm -d1 /dev/hda
复制内容到剪贴板
代码:
I think this is all done for you if you have hdparm run on boot via
rc-update add hdparm default
Or run "/etc/init.d/hdparm start", at least on my systemYou can check the performance difference by issuing this command
before and after you make that modification.
# hdparm -Tt /dev/hda
复制内容到剪贴板
代码:
Bob> I had this exact problem before. This has much to do with the fact that
Bob> other distros enable DMA and put harddrive optimizations in for you.
Bob> With gentoo, you're going to have to do this yourself.
[...]
Bob> The important one to look at is the 'using_dma' one. If that is not on,
Bob> then it explains your problem. You can set this by issuing this
Bob> command:
I got the DMA flag on (the -d1 in my /etc/conf.d/hdparm); but thanks with the
-Tt flag, I didn't know it ;)
I play with the two flags I didn't have (-uX and -cX), and both seems to make
a BIG difference in the hard drive responsiveness. Besides, with the "-j1"
flag for make in /etc/make.conf, the compilation jerkiness are reduced a lot
too. The system is again usable emerging nautilus :)
Problem solved. The solution (in my laptop, at least, I'm in the office right
now), is to set this parameters for hdX (the hard drive):
hdparm -u1 -d1 -c1 -X66 /dev/hdX
-u1 set the interrupt unmask flag for the drive... whatever, it's faster :)
-c1 set the IO support for the drive to 32 bits
-d1 set the DMA flag for the drive (this is a must)
-X66 set the IDE transfer mode (watch out, the manual says that it could be
dangerous)
To set all this automagically, I put this line in /etc/conf.d/hdparm
disc0_args="-u1 -c1 -d1 -X66"
(my CD is a burner, so I use ide-scsi and hdparm can't work on those :) )
Don't forget to "rc-update add hdparm boot" :)
Besides, using "-j1" in the make options helps the compilation jerkiness (it
stops parallel buildings), so this goes in /etc/make.conf:
The difference is HUGE, so if anyone it's having problems with disk
performance, I greatly recommend it (just keep an eye in the -X66 flag).
Thanks everyone; it only took like two hours to have my problem solved.