You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Karsten Bräckelmann <gu...@rudersport.de> on 2010/08/02 15:53:28 UTC

Re: sa-compile has no effect

On Mon, 2010-08-02 at 05:53 -0700, Daniel Lemke wrote:
> Yet Another Ninja wrote:
> > compiled rules only affects body & rawbody rules.
> > Network tests won't be affected and are probably the reason for the lack 
> > of a massive difference.
> 
> Good advice, I disabled all the other plugins and ran spamassassin in local
> test mode, processing a huge text mail. 
> Without Rule2XSBody, 188 seconds.
> With Rule2XSBody activated, 86 seconds.
> 
> So this is a huge improvement, but has little to no effect
WRT overall scan times
> on regular spam
> as network tests will take more time in general.

There, fixed it for you. ;)

The point is, and your numbers clearly show it, that compiled rules *do*
have quite a noticeable effect on the CPU load.

It does not have any impact on the overall scanning time, if there are
other sub-systems not hogging the CPU, but taking longer to finish than
the CPU intensive RE rules.

By using compiled rules, you can increase the *throughput*, since your
CPU now can handle more spam per time-interval, and even slightly less
memory is used. It does not necessarily have an impact on the total
processing time with an idle CPU.


-- 
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}