On Fri, Apr 20, 2001 at 05:11:14PM +0200, Robert Voigt wrote: > > Unless everything slows to a crawl, swaps like mad or runs > > out of memory you should take it with a pinch of salt (and > > maybe wonder why the other 10% isn't made to do something > > useful too) > > In theory, this is fine. But on my system (512 MB RAM) it's not always like > that. After a few hours of work with a lot of opening apps and documents and > images, it dips into swap, and it does that even when I close most apps. So > before I can continue working I have to reboot. This shouldn't be necessary. > Is it because I have a 'pre' kernel? I wondered why they made the 2.2.18pre21 > the default kernel for potato when they otherwise put software in it that are > sometimes not usable because they're so ancient.
The thing is, just because some swap space is used, that doesn't mean that the pages aren't also in physical RAM. Linux is actually very good about keeping things efficient, and you certainly don't need to reboot to continue working. Pages that haven't been accessed in some time are swapped out, but they're still cached in RAM. So if those pages are needed, they're in RAM and you're all set. But if they're needed by another app, then they can just be re-allocated. They've already been swapped out, so when the new app needs to alocate memory, you don't have a lot of swapping going on, just a lot of paging. It's a good thing, and performance would suffer if it was done differently. If the pages weren't swapped out, then attempting to allocate more memory would involve swapping them out and then allocating physical RAM. noah -- _______________________________________________________ | Web: http://web.morgul.net/~frodo/ | PGP Public Key: http://web.morgul.net/~frodo/mail.html
pgpRDHiX5lrxB.pgp
Description: PGP signature