SpamAssassin/Perl eating enormous amounts of memory?
fbsd.questions at rachie.is-a-geek.net
Mon Mar 2 15:40:22 PST 2009
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%
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
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.
Problem with today's modular software: they start with the modules
and never get to the software part.
More information about the freebsd-questions