Memory usage

Kevin Darcy kcd at daimlerchrysler.com
Sat Jul 27 02:43:25 UTC 2002


"Georgeson, Evan [NCSUS Non J&J]" wrote:

>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
>         Token stupid question...running Solaris 2.6 to 8 and BIND 8.2.5 to
> 9.1.3 is there a way that I can determine how much memory my named
> and cache is consuming? I assume named and cache have different
> memory allocations. So if I do a top on my 2.6 box you see named
> consumes 61MB
>
> last pid:  7622;  load averages:  0.01,  0.06,  0.08
>                                                      15:19:39
> 34 processes:  32 sleeping, 1 zombie, 1 on cpu
> CPU states: 98.4% idle,  0.8% user,  0.4% kernel,  0.4% iowait,  0.0%
> swap
> Memory: 256M real, 7032K free, 169M swap in use, 1879M swap free
>
>   PID USERNAME THR PRI NICE  SIZE   RES STATE   TIME    CPU COMMAND
> 26403 root                 1  48    0     61M   55M sleep  45:16
> 0.47% named
>
> And this process map confirms how named is allocating:
>
> 26403:  /usr/local/sbin/named
> 00010000    640K read/exec         /usr/local/sbin/named
> 000BE000     16K read/write/exec   /usr/local/sbin/named
> 000C2000  60040K read/write/exec     [ heap ]
> EF5E0000     16K read/exec
> /usr/platform/sun4u/lib/libc_psr.so.1
> EF5F0000      8K read/write/exec     [ anon ]
> EF600000    592K read/exec         /usr/lib/libc.so.1
> EF6A2000     32K read/write/exec   /usr/lib/libc.so.1
> EF6AA000      8K read/write/exec     [ anon ]
> EF6C0000     16K read/exec         /usr/lib/libmp.so.2
> EF6D2000      8K read/write/exec   /usr/lib/libmp.so.2
> EF6E0000     32K read/exec         /usr/lib/libsocket.so.1
> EF6F6000      8K read/write/exec   /usr/lib/libsocket.so.1
> EF6F8000      8K read/write/exec     [ anon ]
> EF700000    456K read/exec         /usr/lib/libnsl.so.1
> EF780000     40K read/write/exec   /usr/lib/libnsl.so.1
> EF78A000     16K read/write/exec     [ anon ]
> EF7B0000      8K read/exec         /usr/lib/libdl.so.1
> EF7C0000    128K read/exec         /usr/lib/ld.so.1
> EF7EE000     16K read/write/exec   /usr/lib/ld.so.1
> EFFF0000     64K read/write/exec     [ stack ]
>  total    62152K
>
> Am I missing where the named cache is consuming memory?

It's included in "heap space". Unless you're running a large number of
authoritative zones, the vast majority of that amount will consist of memory
that named has allocated for cache entries.

> Does it take
> up purely physical or virtual or a combination?

The question doesn't really make sense. Physical and virtual aren't two
separate and distinct "pools" of memory allocated to the system; physical
memory is just what happens to be in your RAM at any given time, whereas
virtual memory is a bigger pool consisting of your physical memory plus your
swap space allocation. Thus, everything that is in physical memory is
perforce in virtual memory, but whether something that is in virtual memory
is also in physical memory depends on whether it happens to be paged or
swapped in or out at the time.

No offense intended, but how did you come to be tasked with administering a
Unix system, in the absence of understanding fundamental virtual memory
concepts?

> Sorry for the
> platform specific questions but I'm running into possible resource
> issues and have very little concrete explaination.

256Mb is a little light for a heavily-used, Internet-connected caching
nameserver, especially if it is sharing that memory with other applications.


- Kevin




More information about the bind-users mailing list