Date: Mon, 2 Mar 2009 14:39:54 -0900 From: Mel <fbsd.questions@rachie.is-a-geek.net> To: freebsd-questions@freebsd.org Cc: Andrew Moran <sneepre@me.com> Subject: Re: SpamAssassin/Perl eating enormous amounts of memory? Message-ID: <200903021439.55092.fbsd.questions@rachie.is-a-geek.net> In-Reply-To: <8806A36E-A839-481A-8E59-9F79DEB6B51A@me.com> References: <8806A36E-A839-481A-8E59-9F79DEB6B51A@me.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903021439.55092.fbsd.questions>