spamassassin-users January 2012 archive
Main Archive Page > Month Archives  > spamassassin-users archives
spamassassin-users: Re: Identifying actual performance on rules

Re: Identifying actual performance on rules

From: John Hardin <jhardin_at_nospam>
Date: Mon Jan 23 2012 - 16:03:02 GMT
To: users@spamassassin.apache.org

On Sun, 22 Jan 2012, Munroe Sollog wrote:

> I am trying to locate reason for performance spikes. I have read the
> various wiki pages, and they suggest solutions but not a way to identify
> the bottleneck. Is there way to increase logging so that I can begin to
> identify or rule out the actual performance bottlenecks?

Sure. Put this into a .pre file:

   loadplugin HitFreqsRuleTiming ./HitFreqsRuleTiming.pm

(set the path appropriately for where the .pm file actually lives)

And then run your SpamAssassin in debug mode, for example:

   spamassassin -L -t --debug area=all,rules < "$testmsg"

You should then see logging output like:

   Jan 13 06:27:45.701 [30309] dbg: rules: [...] rulename ovl(s) max(s) #run %tot
   Jan 13 06:27:45.701 [30309] dbg: rules: [...] AWL 0.1862 0.1862 1 35.98%
   Jan 13 06:27:45.701 [30309] dbg: rules: [...] ALL_FULL 0.0485 0.0485 1 9.38%
   Jan 13 06:27:45.701 [30309] dbg: rules: [...] ALL_RAWBODY 0.0077 0.0077 1 1.48%
   Jan 13 06:27:45.701 [30309] dbg: rules: [...] T_LONG_HEADER_LINE_80 0.0052 0.0052 1 1.01%

-- John Hardin KA7OHZ http://www.impsec.org/~jhardin/ jhardin@impsec.org FALaholic #11174 pgpk -a jhardin@impsec.org key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79 ----------------------------------------------------------------------- Any time law enforcement becomes a revenue center, the system becomes corrupt. ----------------------------------------------------------------------- Today: John Moses Browning's 157th Birthday