[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Where did my memory go?



On Sat, Dec 29, 2001 at 01:20:31AM -0500, P Prince wrote:
> 
> Linux does preemptive swapping.  AFAIK, you can't turn it off, and if you
> could, you probably shouldn't.
> 
> It will swap out dormant parts of memory, just in case you start up something
> big, like X, or Netscape, or Emacs.  (he he)
> 
> Under, say, 128MB of RAM, this makes a lot of sense, but when you go to half
> and gig and beyond, it becomes less useful.

However, under such situations there is no penalty for swapping.  The
swapped pages are cached in RAM.  The idea is that the kernel is getting
a head start just in case it actually *needs* to swap later.  If it
does, all it has to do is re-allocate memory, rather than swap pages out
to disk and then re-allocate memory.  If it had to do that, then a
situation in which some program suddenly tried to allocate memory would
cause the system to grind to a halt as pages are swapped out.

noah

-- 
 _______________________________________________________
| Web: http://web.morgul.net/~frodo/
| PGP Public Key: http://web.morgul.net/~frodo/mail.html 

Attachment: pgprn7riDU6pG.pgp
Description: PGP signature


Reply to: