Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 08 Oct 1997 06:56:13 -0700
From:      David Greenman <dg@root.com>
To:        Gordon Henderson <gordon@drogon.net>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: Wheres all my memory going? 
Message-ID:  <199710081356.GAA19466@implode.root.com>
In-Reply-To: Your message of "Wed, 08 Oct 1997 13:55:54 BST." <Pine.LNX.3.95.971008132127.26875P-100000@unicorn> 

next in thread | previous in thread | raw e-mail | index | archive | help
>Machine boots OK. I start named (8.1.1) and it initialises. However, after
>some time (a day or so) the machine start to run out of swap space. I only
>allocated 64M of swap. (Is this the problem?) What I can't figure out is
>where the memory is going. Output of 'top -b' shows:

   Yes, you need more swap than you have RAM...this is very important to
avoid problems.

>Mem: 242M Active, 50M Inact, 26M Wired, 34M Cache, 1726K Buf, 152M Free
>Swap: 64M Total, 53M Used, 11M Free, 83% Inuse
...
>And that just does now add up!!! (Yes, named is supposed to be that large,
>but it's no-where near the total memory of the machine)

   Sure it does, but the numbers mean something different from how you're
interpreting them. "Active" and "Inact" pages are pages that are either part
of processes _or_ cached files. "Wired" memory is memory that the kernel has
allocated internally, most of which is probably for networking buffers (you
apparantly have or had a large number of active TCP connections?). "Cache"
pages are second-chance cached file data; "Buf" is memory allocated to
filesystem buffers; and "Free" is completely unused memory.
   The bottom line is that it really isn't possible to determine precisely
how much memory processes are using without carefully analyzing the output
of 'ps' and adding up the RSS.

-DG

David Greenman
Core-team/Principal Architect, The FreeBSD Project



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199710081356.GAA19466>