Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Jun 2004 09:16:06 -0400
From:      Bill Moran <wmoran@potentialtech.com>
To:        <stefan@swebase.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: finding ram eating process
Message-ID:  <20040612091606.27807355.wmoran@potentialtech.com>
In-Reply-To: <002d01c45071$ec07d7c0$082450d5@swebasestefan>
References:  <002d01c45071$ec07d7c0$082450d5@swebasestefan>

next in thread | previous in thread | raw e-mail | index | archive | help
<stefan@swebase.com> wrote:

> Hey
> 
> I have a process thats eating up all my ram, in my case it's actually child
> processes of apache who are doing it and i tried joining the apache mailing
> list but got no reply from the list. The server in question has about a gig of
> ram and after less then work day of running it has 150MB left, has not touched
> it's swap and tons of httpd processes in sbwait mode. I would like to track
> down the source of this ram stealer but i don't know how.

How do you know that RAM is leaking?  Does it hit swap eventually?

Free RAM is wasted RAM.  FreeBSD doesn't free ram until it needs it.  When no
long used, it's moved to the buffer or the cache.  It's not unusual for a
machine that's been running for a while to show very, very little free RAM.
This is by design.  Ram in the buffer or cache can be converted to free RAM
with very little effort, and if the buffer or cache RAM can be reused instead
of freed, it improves performance greatly.

Make sure there's an actual process or processes and there really is a memory
leak before wasting time chasing this around.  Run "top -osize" and watch to
see what processes at the top are using.  Look at the "active" RAM in top and
see if that fills up without end.  And leave the system running for a few
days.  If there's a true leak, it'll need to use swap sooner or later.

-- 
Bill Moran
Potential Technologies
http://www.potentialtech.com



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