From owner-freebsd-questions@FreeBSD.ORG Mon Mar 2 23:40:22 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2223710656C2 for ; Mon, 2 Mar 2009 23:40:22 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from mail.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id E5D6F8FC08 for ; Mon, 2 Mar 2009 23:40:21 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from localhost (mail.lan.rachie.is-a-geek.net [192.168.2.101]) by mail.rachie.is-a-geek.net (Postfix) with ESMTP id 3A234AFC1FE; Mon, 2 Mar 2009 14:40:21 -0900 (AKST) From: Mel To: freebsd-questions@freebsd.org Date: Mon, 2 Mar 2009 14:39:54 -0900 User-Agent: KMail/1.9.10 References: <8806A36E-A839-481A-8E59-9F79DEB6B51A@me.com> In-Reply-To: <8806A36E-A839-481A-8E59-9F79DEB6B51A@me.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200903021439.55092.fbsd.questions@rachie.is-a-geek.net> Cc: Andrew Moran Subject: Re: SpamAssassin/Perl eating enormous amounts of memory? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2009 23:40:22 -0000 On Sunday 01 March 2009 19:23:33 Andrew Moran wrote: > Hey guys, > > After having lots of problems with memory and 7.1/ZFS, I first > switched everything to 64-bit (amd64), and then I had a new problem, > so I eventually gave up and switched back to UFS (saying on amd64 > distro/ports), but I'm still having memory issues. > > My current one is that SpamAssassin seems to be periodically eating > up all my memory, causing the server to slow to a crawl until the > kernel kills the process and then I have enormous amounts of free > memory. Rinse, repeat. I thought maybe it had something to do with > the fact that I was using multithreaded perl (which I wasn't before I > jumped into 7.1/ZFS), but rebuilding perl (and all its' dependencies) > without threads didn't help. > > I have 8GB of physical memory and 16GB of swap memory. Here is a > line from top showing perl taking 21 gigs of memory: > > 6035 0 1 76 0 21190M 791M pfault 0 1:20 4.69% > perl5.8.9 This is hard to debug, but I'd first toggle the PERL_MALLOC option in the configuration dialog for the perl port. If this doesn't solve the problem, then you'd have to get a ktrace to get some indication of what is allocating the memory. What's even weirder is that the process gets that far. Did you play with kern.maxdsiz loader tuneable? If so, set it lower, so you can at least have the machine in a usable state at all times. 4G should be enough for any process and should give enough time for you to spot the leak and get a ktrace. -- Mel Problem with today's modular software: they start with the modules and never get to the software part.