Speeding up the filesystem
I''ve been running Gentoo with ReiserFS for a couple months here now, and this is really beginning to bug me (though admittedly I did occasionally have this problem under Slackware with ext2/3 before). Basically what is happening is that when there is major disk usage going on (e.g., untarring a large tar.gz file or occasionally when compiling programs), my system will kinda burp along. In other words, it sorta hangs for a split second, runs normally, hangs for a split second, etc. So for example, if I''m running XMMS, whatever song I''m playing will be choppy when I''m doing something that slows it down.
Is anyone aware of any ways to go about fixing this? I had initially heard it may be a problem with the kernel I was using, so I upgraded to the latest Gentoo kernel, and it did help a bit, but it still does it sometimes. Is there a specific kernel option or something that I should compile in?
Looks like you''re in luck. Look what was released today:
quote: After > 6 months of waiting, 2.4.21 is here. Lots of cleanups, and a patch which gives a MAJOR boost to the ''feel'' of the system under heavy disk IO, especially on IDE systems. As usual, available from your local kernel.org mirror or ftp.COUNTRYCODE.kernel.org/pub/linux/kernel/v2.4/!
w00t
Of course, I like running the Gentoo version of the kernel just because, so I''ll probably have to wait another couple of days.
Strange that I use it though, considering that I don''t use any of the Gentoo-specific features O_o
Of course, I like running the Gentoo version of the kernel just because, so I''ll probably have to wait another couple of days.
Strange that I use it though, considering that I don''t use any of the Gentoo-specific features O_o
Heh,
If you''re using IDE devices, make sure you have DMA properly tuned. Take a look at hdparm, etc.
Chances are, you''re poor disk I/O is due to an improperly tuned IDE subsystem.
.zfod
If you''re using IDE devices, make sure you have DMA properly tuned. Take a look at hdparm, etc.
Chances are, you''re poor disk I/O is due to an improperly tuned IDE subsystem.
.zfod
I have absolutely no idea what hdparm is.
Besides, I highly doubt it''s something like this, since I''ve had this problem on and off depending on what distro I use. I''m 99% it''s a kernel problem since when I upgraded last time, the hanging happened much less frequently.
Besides, I highly doubt it''s something like this, since I''ve had this problem on and off depending on what distro I use. I''m 99% it''s a kernel problem since when I upgraded last time, the hanging happened much less frequently.
Hmm,
Welp, if you have no idea what hdparm is then I suggest you do some research on it.
Chances are your problems are DMA-related, or other IDE configuration.
Download hdparm ( I'm sure this is in the Gentoo ports tree or whatever they use ) and test your devices ( example assumes /dev/hda as one of your drives, just substitute yours instead ):
# Get current configuration on /dev/hda
root@blah:~ # hdparm /dev/hda
# Do a device read test ( if DMA was turned off in the above output, this test could turn out some pretty horrid numbers.. and hence some of your problems.
root@blah:~ # hdparm -t /dev/hda
# Assuming DMA was off, enable DMA and retest
root@blah:~ # hdparm -d1 /dev/hda
root@blah:~ # hdparm -t /dev/hda
Numbers should be better from your read tests, but if they aren't then you need to know a bit more about your drive and possibly enabling DMA ( depending on your drive and/or chipset ) won't help ( or it will need the proper DMA transfer mode which you can enable with -X <transfer type> ).
The difference between a vanilla IDE subsystem and one that has been properly tuned by hdparm is huge in most cases ( a read test of anywhere between 1.5MB/sec -> 4MB/sec without DMA and getting what your drive manufacturer says the drive can do ( 35 -> 60, all depends on the hardware ), unless you have really shitty hardware ( or a hardware problem ).
Besides just performance you can tune power-saving features that your drive has, etc. Just be aware that using hdparm in some cases can halt your machine, but I've never had a problem with just rebooting and avoiding the setting that caused the halt ( usually something your drive doesn't support, etc ).
HTH,
.zfod
[edited by - zfod on June 15, 2003 9:45:37 PM]
[edited by - zfod on June 15, 2003 11:57:31 PM]
Welp, if you have no idea what hdparm is then I suggest you do some research on it.
Chances are your problems are DMA-related, or other IDE configuration.
Download hdparm ( I'm sure this is in the Gentoo ports tree or whatever they use ) and test your devices ( example assumes /dev/hda as one of your drives, just substitute yours instead ):
# Get current configuration on /dev/hda
root@blah:~ # hdparm /dev/hda
# Do a device read test ( if DMA was turned off in the above output, this test could turn out some pretty horrid numbers.. and hence some of your problems.
root@blah:~ # hdparm -t /dev/hda
# Assuming DMA was off, enable DMA and retest
root@blah:~ # hdparm -d1 /dev/hda
root@blah:~ # hdparm -t /dev/hda
Numbers should be better from your read tests, but if they aren't then you need to know a bit more about your drive and possibly enabling DMA ( depending on your drive and/or chipset ) won't help ( or it will need the proper DMA transfer mode which you can enable with -X <transfer type> ).
The difference between a vanilla IDE subsystem and one that has been properly tuned by hdparm is huge in most cases ( a read test of anywhere between 1.5MB/sec -> 4MB/sec without DMA and getting what your drive manufacturer says the drive can do ( 35 -> 60, all depends on the hardware ), unless you have really shitty hardware ( or a hardware problem ).
Besides just performance you can tune power-saving features that your drive has, etc. Just be aware that using hdparm in some cases can halt your machine, but I've never had a problem with just rebooting and avoiding the setting that caused the halt ( usually something your drive doesn't support, etc ).
HTH,
.zfod
[edited by - zfod on June 15, 2003 9:45:37 PM]
[edited by - zfod on June 15, 2003 11:57:31 PM]
Holy crapola, Batman!
I really appreciate this post, as I originally apparently had DMA off, and got this:
64 MB in 10.71 seconds = 5.97 MB/sec
With it on, I get this:
64 MB in 1.90 seconds = 33.68 MB/sec
One minor thing to note, however: You can''t do -d1 /dev/hdx1, but rather -d1 /dev/hdx. Doing it with the number didn''t work. Or, maybe that''s just because my partition is 2... But anyway, I''ve now done that and hopefully that''ll solve things.
Just out of curiosity though, I assume this keeps things like this for good? Or is this something I should have run at startup and such? Is there possible a command to give LILO that I am NOT giving it?
Anyway, thanks for the info.
I really appreciate this post, as I originally apparently had DMA off, and got this:
64 MB in 10.71 seconds = 5.97 MB/sec
With it on, I get this:
64 MB in 1.90 seconds = 33.68 MB/sec
One minor thing to note, however: You can''t do -d1 /dev/hdx1, but rather -d1 /dev/hdx. Doing it with the number didn''t work. Or, maybe that''s just because my partition is 2... But anyway, I''ve now done that and hopefully that''ll solve things.
Just out of curiosity though, I assume this keeps things like this for good? Or is this something I should have run at startup and such? Is there possible a command to give LILO that I am NOT giving it?
Anyway, thanks for the info.
Glad to see your problem is solved
Actually, I had it as /dev/hda in the example, then for some reason I went back and edited it out to be more specific.. which is dumb because you're not turning DMA on for just a specific partition but an entire device. I should've left it the way it was, and I'll edit it back to the original format right now.
I would advise keeping your settings in an init script ( or some distros have hard-drive setting files, YMMV ).
.zfod
[edited by - zfod on June 15, 2003 12:05:54 AM]
Another thing that really seems to speed up Gentoo is using the gaming-enhanced kernel sources. I just changed to them from the ACPI-sources, and my system seems to be much faster than before. I don''t know if this kernel is less stable than the vanilla sources, though.
Problems with Windows? Reboot! - Problems with Linux? Be root!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement