You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Daniel Lemke <le...@jam-software.com> on 2010/08/02 14:53:46 UTC

Re: sa-compile has no effect (under Windows.......)


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 on regular spam
as network tests will take more time in general.

Daniel
-- 
View this message in context: http://old.nabble.com/sa-compile-has-no-effect-%28under-Windows.......%29-tp29304248p29324909.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.


Re: sa-compile has no effect

Posted by Karsten Bräckelmann <gu...@rudersport.de>.
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; }}}


Re: sa-compile has no effect (under Windows.......)

Posted by Daniel Lemke <le...@jam-software.com>.

Daniel McDonald-3 wrote:
> 
> The question is not how processing one mail compares, but how 10 per
> second
> compare in each scenario.  That's where the win is - lower total cpu
> utilization to accomplish the same work.
> 
Yes, that makes sense to me.


Daniel McDonald-3 wrote:
> 
> But your numbers are really wacked out for duration.  I grabbed a log of
> 16418 mailed processed since the log rolled over last.  Only a third of
> them
> took more than 1 second - 4749. Only a eighth of them took over 2 seconds
> -
> 2008, less than 2% took over 5 seconds - 301, and a very tiny fraction
> (less
> than a half percent) took over 10 seconds - just 74
> 
That was just for test purposes ;)
I took a message with a size of 2 MB that contains text only, so I had
something to see a noticeable difference in parsing of regexes.

Daniel
-- 
View this message in context: http://old.nabble.com/sa-compile-has-no-effect-%28under-Windows.......%29-tp29304248p29333839.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.


Re: sa-compile has no effect (under Windows.......)

Posted by Daniel McDonald <da...@austinenergy.com>.
On 8/2/10 7:53 AM, "Daniel Lemke" <le...@jam-software.com> 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 on regular spam
> as network tests will take more time in general.

The question is not how processing one mail compares, but how 10 per second
compare in each scenario.  That's where the win is - lower total cpu
utilization to accomplish the same work.

But your numbers are really wacked out for duration.  I grabbed a log of
16418 mailed processed since the log rolled over last.  Only a third of them
took more than 1 second - 4749. Only a eighth of them took over 2 seconds -
2008, less than 2% took over 5 seconds - 301, and a very tiny fraction (less
than a half percent) took over 10 seconds - just 74
 
-- 
Daniel J McDonald, CCIE # 2495, CISSP # 78281