Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 08 Oct 1997 23:01:16 +0930
From:      Mike Smith <mike@smith.net.au>
To:        Gordon Henderson <gordon@drogon.net>
Cc:        hackers@freebsd.org
Subject:   Re: Wheres all my memory going? 
Message-ID:  <199710081331.XAA04444@word.smith.net.au>
In-Reply-To: Your message of "Wed, 08 Oct 1997 13:55:54 %2B0100." <Pine.LNX.3.95.971008132127.26875P-100000@unicorn> 

next in thread | previous 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.
...
> 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:

Running out of memory != running out of swap.  You should *always* have 
more swap than memory.  Stuff will be paged out as it becomes 
very-unused, and eventually you will get to the point where there is 
stuff that could be pushed out because it's not been used for ages but 
you have nowhere to put it, and thus you're out of swap.

> 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)

Yes it does: 242 + 50 + 26 + 34 + 1.762 + 152 ~= 512.

The issue is that "inactive" memory will eventually be paged out so 
that there are more free pages available in case they're needed in a 
hurry.

> 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...) 

Add more swap!  Given your concern about this above, I can't understand 
why you haven't tried it already?

mike





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