Re: Memory Leaking. Help!

David Schwartz (davids@webmaster.com)
Mon, 15 Apr 2002 17:36:01 -0700


On Mon, 15 Apr 2002 11:59:40 -0400, Kervin Pierre wrote:
>Eugenio Mastroviti wrote:
>>much data as it can in memory. The actual memory in use (check with
>>'free') is total-(buffers+cache)= 2.2-(0.37+1.51)GB=about 320 MB, which
>
>This is interesting. What exactly is buffers and cache used for?

It is used to keep information that the kernel might otherwise throw away in
case it is needed later. It is also used to accumulate writes so that they
can be made at a time where they can be done more efficiently.

>I had the same issue with the original poster with a new server. A
>fresh install with nothing significant running ( no bind nor sendmail,
>etc. ) reported that over 450 out of 512 MB was used, but looking at the
>process usage on top I barely got 5% memory usage by process. If the
>above calculation ( memory use = total - buffers - cache ) is correct
>then the memory use drops to ~100 MB.

So you now have a ton of information. You have 512Mb of physical RAM, 450 of
that is being used. 100Mb of that is process memory, 350Mb of that is buffers
and cache.

>I guess what's confusing is that total memory usuage is including
>buffers and cache. If that memory is available to applications,
>shouldn't it be removed from the "total used" figure?

Are you arguing that you shouldn't have all the information the kernel is
providing you? That some of it should be hidden from you and memory should be
said to be free when it really isn't?

All of your physical memory, less what is used by the kernel itself, is
always available to applications. That memory is being used. Really.

If you don't want your memory to be used, take it out of your computer. You
paid good money for it. The kernel is using it. You should be happy.

DS

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/