You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Quanah Gibson-Mount <qu...@zimbra.com> on 2014/05/02 21:28:36 UTC
some questions on sa-compile
I'm looking at compiling the SA rules to get a measurement of the
difference in SA timing to reduce delivery times for our email. I had a
couple of questions first though:
a) I assume that there's no issue uncommenting loadplugin
Mail::SpamAssassin::Plugin::Rule2XSBody even if I'm not using compiled
rules.
b) This statement is very vague, so I don't really know what the practical
implications are: "re2c can match strings much faster than perl code, by
constructing a DFA to match many simple strings in parallel, and compiling
that to native object code. Not all SpamAssassin rules are amenable to this
conversion, however."
Does this mean that:
1) The non-amenable rules are never processed?
2) The non-amenable rules are processed, but may be slower than if they
weren't compiled?
3) ?
Thanks!
--Quanah
--
Quanah Gibson-Mount
Server Architect
Zimbra, Inc
--------------------
Zimbra :: the leader in open source messaging and collaboration
Re: some questions on sa-compile
Posted by Axb <ax...@gmail.com>.
On 05/03/2014 01:18 PM, RW wrote:
> On Fri, 02 May 2014 21:51:02 +0200
> Axb wrote:
>
>
>>> 2) The non-amenable rules are processed, but may be slower than if
>>> they weren't compiled?
>>
>> yep
>
> It means they get processed as normal in perl, so they don't get
> speeded-up, but they aren't slowed-down.
>
correct - what I meant: standard non compiled speed - the question
confused me...
Re: some questions on sa-compile
Posted by Dave Funk <db...@engineering.uiowa.edu>.
On Sat, 3 May 2014, RW wrote:
> On Fri, 02 May 2014 21:51:02 +0200
> Axb wrote:
>
>
>>> 2) The non-amenable rules are processed, but may be slower than if
>>> they weren't compiled?
>>
>> yep
>
> It means they get processed as normal in perl, so they don't get
> speeded-up, but they aren't slowed-down.
>
One thing, rules which cannot be compiled are often rules (such as ones that
use negative look-ahead/look-behind ) that are potential major CPU hogs.
If used in limited scope they aren't usually a problem but if not carefully
written can be CPU sucks. Not to say that they shouldn't be used at all but
just with care.
So if you see that warning about uncompileable rules, take a second look
at those specific rules.
--
Dave Funk University of Iowa
<dbfunk (at) engineering.uiowa.edu> College of Engineering
319/335-5751 FAX: 319/384-0549 1256 Seamans Center
Sys_admin/Postmaster/cell_admin Iowa City, IA 52242-1527
#include <std_disclaimer.h>
Better is not better, 'standard' is better. B{
Re: some questions on sa-compile
Posted by RW <rw...@googlemail.com>.
On Fri, 02 May 2014 21:51:02 +0200
Axb wrote:
> > 2) The non-amenable rules are processed, but may be slower than if
> > they weren't compiled?
>
> yep
It means they get processed as normal in perl, so they don't get
speeded-up, but they aren't slowed-down.
Re: some questions on sa-compile
Posted by Axb <ax...@gmail.com>.
On 05/02/2014 09:28 PM, Quanah Gibson-Mount wrote:
> I'm looking at compiling the SA rules to get a measurement of the
> difference in SA timing to reduce delivery times for our email. I had a
> couple of questions first though:
>
> a) I assume that there's no issue uncommenting loadplugin
> Mail::SpamAssassin::Plugin::Rule2XSBody even if I'm not using compiled
> rules.
>
> b) This statement is very vague, so I don't really know what the
> practical implications are: "re2c can match strings much faster than
> perl code, by constructing a DFA to match many simple strings in
> parallel, and compiling that to native object code. Not all SpamAssassin
> rules are amenable to this conversion, however."
>
> Does this mean that:
> 1) The non-amenable rules are never processed?
nope - they'll run anyway, goto 2)
> 2) The non-amenable rules are processed, but may be slower than if they
> weren't compiled?
yep
> 3) ?
3) only body/rawbody rules are compiled - IMO, unless you have a huge
amount of custom bod/rawbody rules it's hardly worth it.
If you have processing lag, first I'd look into
- slow network checks (PYZOR/RAZOR)
- large file based Bayes DB
- frequent Bayes auto expiration
- slow I/= - lack of RAM
Depends where you're connected, certain network tests can be extremely
slow.
Re: some questions on sa-compile
Posted by Quanah Gibson-Mount <qu...@zimbra.com>.
--On May 2, 2014 at 3:47:22 PM -0400 "Kevin A. McGrail" <KM...@PCCC.com>
wrote:
>> Does this mean that:
>> 1) The non-amenable rules are never processed?
> It more means they won't be compiled and you might not be able to compile
> them is more my understanding. I remember seeing the issue with sought
> rules where we couldn't compile them at which point I believe you run
> with nothing compiled.
Perfect, thanks!
--Quanah
--
Quanah Gibson-Mount
Server Architect
Zimbra, Inc
--------------------
Zimbra :: the leader in open source messaging and collaboration
Re: some questions on sa-compile
Posted by "Kevin A. McGrail" <KM...@PCCC.com>.
On 5/2/2014 3:28 PM, Quanah Gibson-Mount wrote:
> I'm looking at compiling the SA rules to get a measurement of the
> difference in SA timing to reduce delivery times for our email. I had
> a couple of questions first though:
>
> a) I assume that there's no issue uncommenting loadplugin
> Mail::SpamAssassin::Plugin::Rule2XSBody even if I'm not using compiled
> rules.
Shouldn't be an issue.
> b) This statement is very vague, so I don't really know what the
> practical implications are: "re2c can match strings much faster than
> perl code, by constructing a DFA to match many simple strings in
> parallel, and compiling that to native object code. Not all
> SpamAssassin rules are amenable to this conversion, however."
It's not vague as much as very technical. DFA is a deterministic finite
automaton. You can see more at
http://en.wikipedia.org/wiki/Deterministic_finite_automaton
> Does this mean that:
> 1) The non-amenable rules are never processed?
It more means they won't be compiled and you might not be able to
compile them is more my understanding. I remember seeing the issue with
sought rules where we couldn't compile them at which point I believe you
run with nothing compiled.
Regards,
KAM