From owner-freebsd-questions@FreeBSD.ORG Sat Jun 12 13:16:39 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E8A7F16A4CE for ; Sat, 12 Jun 2004 13:16:39 +0000 (GMT) Received: from internet.potentialtech.com (h-66-167-251-6.phlapafg.covad.net [66.167.251.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id ABFA443D1F for ; Sat, 12 Jun 2004 13:16:39 +0000 (GMT) (envelope-from wmoran@potentialtech.com) Received: from working.potentialtech.com (pa-plum1c-102.pit.adelphia.net [24.53.179.102]) by internet.potentialtech.com (Postfix) with ESMTP id 986D169A71; Sat, 12 Jun 2004 09:16:07 -0400 (EDT) Date: Sat, 12 Jun 2004 09:16:06 -0400 From: Bill Moran To: Message-Id: <20040612091606.27807355.wmoran@potentialtech.com> In-Reply-To: <002d01c45071$ec07d7c0$082450d5@swebasestefan> References: <002d01c45071$ec07d7c0$082450d5@swebasestefan> Organization: Potential Technologies X-Mailer: Sylpheed version 0.9.10 (GTK+ 1.2.10; i386-portbld-freebsd4.9) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: finding ram eating process X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jun 2004 13:16:40 -0000 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