Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Oct 1997 13:55:54 +0100 (BST)
From:      Gordon Henderson <gordon@drogon.net>
To:        hackers@freebsd.org
Subject:   Wheres all my memory going?
Message-ID:  <Pine.LNX.3.95.971008132127.26875P-100000@unicorn>

next in thread | raw e-mail | index | archive | help

I'm trying to run a top-level-domain nameserver with FreeBSD and every day
or so it just runs out of memory. The machine has 512MB of RAM. It's
running 2.2-STABLE with DG's patches to i386/conf/Makefile.i386,
i386/include/pmap.h and i386/include/vmparam.h to change the kernel
virtual address space.

Startup messages look like:

Oct  7 14:58:37 gtld-b /kernel: CPU: Pentium (132.96-MHz 586-class CPU)
Oct  7 14:58:37 gtld-b /kernel:   Origin = "GenuineIntel"  Id = 0x52c Stepping=12
Oct  7 14:58:37 gtld-b /kernel: Features=0x3bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8,APIC>
Oct  7 14:58:38 gtld-b /kernel: real memory  = 536870912 (524288K bytes)
Oct  7 14:58:38 gtld-b /kernel: avail memory = 524984320 (512680K bytes)

etc.

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:

last pid:  5653;  load averages:  0.00,  0.00,  0.16    13:42:49
13 processes:  1 running, 12 sleeping

Mem: 242M Active, 50M Inact, 26M Wired, 34M Cache, 1726K Buf, 152M Free
Swap: 64M Total, 53M Used, 11M Free, 83% Inuse


  PID USERNAME PRI NICE SIZE    RES STATE    TIME   WCPU    CPU COMMAND
 5653 root     29   0   584K   820K RUN      0:00  0.00%  0.00% top
 5426 root     18   0   452K   268K pause    0:00  0.00%  0.00% csh
  101 root     18   0   332K   336K pause    0:01  0.00%  0.00% cron
 5416 gordon   18   0   444K   128K pause    0:00  0.00%  0.00% csh
    1 root     10   0   408K    92K wait     0:00  0.00%  0.00% init
  148 root      3   0   180K   224K ttyin    0:00  0.00%  0.00% getty
  144 root      3   0   180K   224K ttyin    0:00  0.00%  0.00% getty
  287 root      2   0   283M   856K select 237:25  0.00%  0.00% named
  457 root      2 -12   416K   444K select   0:10  0.00%  0.00% xntpd
   70 root      2   0   204K   336K select   8:13  0.00%  0.00% syslogd
 5415 root      2   0   168K   320K select   0:00  0.00%  0.00% rlogind
   99 root      2   0   192K   240K select   0:00  0.00%  0.00% inetd
  104 root      2   0   208K   228K select   0:00  0.00%  0.00% lpd

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)

I really really want this machine to work so I'm willing to give just
about anything a try. (And if if works, then we can have another serious
machine to add to the gallery...) 

Gordon




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.3.95.971008132127.26875P-100000>