[NTLUG:Discuss] where's the memory?

brian@pongonova.net brian at pongonova.net
Fri Mar 22 19:15:17 CST 2002


On Fri, Mar 22, 2002 at 04:55:27PM -0600, kbrannen at gte.net wrote:
> I understand caching and buffers (which is why I asked about the 283M number 
> instead of the 352M number. :-)  But when "ps" reports that I'm only using 50M
> instead of the 283M reports by free, xosview, and top, I start to wonder where
> that other 223M went.  I mean, it could be very useful if I start to do
> development work here. :-)  So I'd like to know why there's an inconsistency
> between ps and the others.

That's because ps shows memory actually allocated to processes running on your
machine.  top/free/etc. show memory being used by the kernel for all caching and
allocation requests.  The kernel will dynamically alter its memory management as
demand for memory allocations change.  Even though the memory appears to be "used,"
it's simply being managed by the kernel.  If you want to determine the amount of
memory used by the running processes, you'll have to add up the memory allocated to
each process.

The other 223M didn't go anywhere -- it's still there, being actively managed by
the kernel.  You'll know when the kernel runs out of physical memory, because
you'll begin to swap.  Prior to that point, I wouldn't worry about it.  

It's much more useful to monitor your *swap* memory than your physical memory.
This will be a sure indicator that it's time to start killing off some processes!

  --Brian




More information about the Discuss mailing list