From owner-freebsd-ports@FreeBSD.ORG Wed Jan 24 15:24:19 2007 Return-Path: X-Original-To: ports@freebsd.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BDF2516A404 for ; Wed, 24 Jan 2007 15:24:19 +0000 (UTC) (envelope-from forrie@forrie.com) Received: from rwcrmhc11.comcast.net (rwcrmhc11.comcast.net [204.127.192.81]) by mx1.freebsd.org (Postfix) with ESMTP id A861313C465 for ; Wed, 24 Jan 2007 15:24:19 +0000 (UTC) (envelope-from forrie@forrie.com) Received: from forrie.com ([24.62.224.60]) by comcast.net (rwcrmhc11) with ESMTP id <20070124152418m1100rgn8le>; Wed, 24 Jan 2007 15:24:18 +0000 Received: from [127.0.0.1] (dce.harvard.edu [140.247.198.6]) (authenticated bits=0) by forrie.com (8.13.8/8.13.8) with ESMTP id l0OFO84i063746 for ; Wed, 24 Jan 2007 10:24:14 -0500 (EST) (envelope-from forrie@forrie.com) Message-ID: <45B77A17.70800@forrie.com> Date: Wed, 24 Jan 2007 10:24:07 -0500 From: Forrest Aldrich User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: ports@freebsd.org References: <45B6DA5A.9080704@forrie.com> <20070124151552.GA8825@icarus.home.lan> In-Reply-To: <20070124151552.GA8825@icarus.home.lan> X-Virus-Scanned: ClamAV 0.88.6/2483/Wed Jan 24 04:45:20 2007 on mail.forrie.com X-Virus-Status: Clean Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: SpamAssassin (spamd) eating a lot of CPU.... X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jan 2007 15:24:19 -0000 (see below) Jeremy Chadwick wrote: > On Tue, Jan 23, 2007 at 11:02:34PM -0500, Forrest Aldrich wrote: > >> Since a recent update of Spamassassin to: >> >> PORTVERSION= 3.1.7 >> PORTREVISION= 3 >> >> I've noticed that each email that gets scanned causes the process to eat >> up 80+% of the CPU time, and it's slow... >> >> I'm not really sure what changed. >> >> Likewise, when I start it up for the first time, I see: >> >> [ top output ] >> 49106 root 1 106 0 290M 267M RUN 0 0:17 *98.52%* >> perl5.8.8 >> >> I have a Dell system here, and it cranks up the fan every time a message >> comes in now, with the recent spamd. >> >> Curious if anyone else has had these issues, etc. >> >> The system is not otherwise active, so I'm certain it's not a resource >> issue (or constraint thereof). >> > > I've seen this happen before, although with older SpamAssassin > releases (though I have no proof the problem got fixed at all). > At that time, we were using mail/spamass-rules as well. > > Since, we've removed using mail/spamass-rules, and haven't seen > this problem. Possibly there's some SpamAssassin rule which causes > the daemon to spin when certain regexs are matched. Not sure. > Ours (note the much smaller memory footprint): > > root 58179 2.2 5.2 28088 27084 ?? S 3:58am 1:44.79 spamd child (perl5.8.8) > root 65228 0.0 5.0 27172 26128 ?? S 5:58am 0:23.17 spamd child (perl5.8.8) > root 313 0.0 4.3 23812 22176 ?? Ss 2Jan07 11:40.79 /usr/local/bin/spamd -c -d -r /var/run/spamd/spamd.pid (perl5.8.8) > > It may be worth truss'ing the perl process and opening a Bug with > the SpamAssassin team. > > Thanks for the replies. I did clean up the extra rules (dujor and others) and that seems to have resolved the problem... for now. It's worth noting that I've had these extra rules in there for a while, and only recently has this caused the high CPU consumption. So I would tend to wonder if there's a bug somewhere. Might be more resource friendly if this were in C, but I don't want to go there ;-) Thanks, Forrest