virtual memory management

Dan Nelson dnelson at allantgroup.com
Sat Jan 20 19:51:40 UTC 2007


In the last episode (Jan 20), Zbigniew Szalbot said:
> >> I see lots of them; every one in that list is contributinig.  If
> >> you add up all those process sizes you'll see where the space is
> >> going.
> >
> > By which I mean the difference between size and res, which indicates
> > the amount of process memory allocated but not currently resident in
> > RAM.  This isn't a foolproof method (see e.g. the FAQ entry on
> > rpc.statd), but it's true in your case.
> >
> >> Basically you are just overloading your system by trying to run
> >> too much at once.  Reduce the load or add more RAM.
> 
> The problem is I cannot add more RAM (too old machine to do that) but
> I know what to do to decrease the load a bit. So thanks for the
> pointer! I appreciate it!

Also remember that swap usage itself is not a bad thing; it just means
the system has moved some unused process data to disk.  What /is/ bad
is when the system is so low on RAM that is it constantly shuffling
data to and from swap just to keep running.  This is called thrashing,
and you can track it by watching the "##Kb In, ##Kb Out" values on the
Swap: line in top, and the "pi" and "po" columns in vmstat output.  As
long as you don't see constant swapping activity, you're okay.

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-questions mailing list