Subject: Re: Kernel processes taking up all memory
To: lattera <lattera@gmail.com>
From: Sean Davis <erplefoo@gmail.com>
List: netbsd-users
Date: 04/09/2005 17:34:04
On Apr 9, 2005 5:06 PM, lattera <lattera@gmail.com> wrote:
> so that memory is being used, no other process, when calling mmap() or
> brk(), can re-use it? what happens, then, when all my swap is filled?
> do I have to reboot my machine every thirty days?
> 

No, because when an application needs memory, typically (depending on
your vm settings), the file cache will throw away pages to give that
application the memory it needs. For example; I've got 1GB of ram, and
have only seen this machine start swapping once, and that was when I
was intentionally stress-testing it. I run in KDE with OpenOffice,
Firefox, and tons of konsoles open at any given time, in addition to,
say, xmms, and a few Tk applications. This box doesn't swap under my
normal workload, ever. Right now top says:

Memory: 548M Act, 274M Inact, 4848K Wired, 91M Exec, 467M File, 424K Free
Swap: 1025M Total, 1025M Free

> On Apr 9, 2005 3:22 AM, Johnny Billquist <bqt@update.uu.se> wrote:
> > On Sat, 9 Apr 2005, lattera wrote:
> >
> > > I've noticed that after fifteen days of uptime, that all of my 2gig
> > > physical mem has been used up. I did a top sorted by residual size,
> > > which can be found at http://lattera.antitech.org/nbsd_top.txt, and
> > > saw that the kernel processes are each taking up 380mb.
> > >
> > > vmstat -m output: http://lattera.antitech.org/nbsd_vmstat.txt
> > >
> > > Any reasons why this is happening? Any way I can tone down the kernel
> > > to not gradually fill up mem?
> >
> > No. You are observing the correct behaviour. All memory (more or less)
> > will be filled up always. There is nothing you can do about it, and it
> > generally isn't a bad idea.
> > Better put that unused memory to some use instead of letting it sit
> > unused.
> > The disk cache takes advantage of it.
> >
> >         Johnny
> >
> > Johnny Billquist                  || "I'm on a bus
> >                                   ||  on a psychedelic trip
> > email: bqt@update.uu.se           ||  Reading murder books
> > pdp is alive!                     ||  tryin' to stay hip" - B. Idol
> >
> 
> --
> lattera
> http://lattera.antitech.org/
> 


-- 
Sean