Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] Memory leak?


On Wed, Jul 24, 2002 at 11:57:34AM +1000, Melinda Taylor wrote:
> 
> I just noticed after using dump that 100% of the memory in my system is
> now in use. I check this also on my linux laptop, after using
> 'dump' my 412 MB ram had only 12k free.
> 
> The command free shows:
> 
>              total       used       free     shared    buffers     cached
> Mem:        514328     502352      11976          0       4476     345684
> -/+ buffers/cache:     152192     362136
> Swap:       875500          0     875500

This is actually fine.

The line that matters in free is the "-/+ buffers/cache" line, which
shows how much memory is available to applications (by adjusting for how
much memory is used for the disk cache).  So looking at it again, we
see:

> -/+ buffers/cache:     152192     362136

So your apps are using about 150Mb, and you still have about 360Mb free.

If you look at the top line, you'll notice about 340Mb is used for
"cached", which make sense after running dump, because you've done lots
of disk activity.  Linux keeps as much of the disk in memory as
possible, because RAM is much faster than disk.  However, if more RAM is
needed for a program, Linux will discard parts of its cache to do so.

Another sign that you don't need to worry is the "Swap" line shows 0
bytes used, which means your system hasn't swapped anything out to disk,
which is only done when real physical RAM is running low.

I hope this makes it a little clearer.  There's a lack of good, clear,
non-technical documentation about what those numbers actually mean.

Regards,

-Andrew.