On Fri, Jul 30, 2010 at 11:56:08PM +0100, Martin Gregorie wrote: > On Fri, 2010-07-30 at 15:35 -0400, Bowie Bailey wrote: > > On 7/30/2010 3:26 PM, Bowie Bailey wrote: > > > On 7/30/2010 3:08 PM, Emin Akbulut wrote: > > >> Simply disable regular ruleset and test again. If it takes 6.93-5.78 > > >> seconds or > > >> something similar, you are right. > > > I'm actually having the same issue on my new home server. I set up SA > > > and got it working. Then I ran sa-compile, enabled the plugin in > > > v320.pre, and restarted. The logs show that it is using the compiled > > > rules, but there is no difference in scan speeds at all. > > > > > > How would I go about disabling the regular ruleset? > > > > Forgot to mention... My server is running under CentOS 5.5, so this is > > not just a Windows issue. > > > I'm confused now. I peeked inside spamd and found Perl source: its just > a script with > > #!/usr/bin/perl -T -w > > eval 'exec /usr/bin/perl -T -w -S $0 ${1+"$@"}' > > as the first three lines. So, the start up would appear to be: > (1) read and compile spamd Perl source, > (2) load the rules, > (3) convert them into Perl, > (4) compile them into executable form.
So you left the fourth logical line away: if 0; # not running under some shell This has nothing to do with anything we are discussing here, just google perl eval exec. > As I understand it Perl, unlike Python, can't separate out the process > of converting source into the P-code that the Perl interpreter runs, so > presumably all 'precompiling the rules' can do is step 3. I can see that > doing step 3 when the ruleset changes will speed up spamassasin start-up > time and so will make it a lot faster per message. It will also improve > spamd start-up times. But, does it have any effect at all on spamd scan > times? I suspect not. You are making strange and wrong speculations. Sa-compile is documented: http://spamassassin.apache.org/full/3.3.x/doc/sa-compile.html It parses applicable rules into "native C code regexes", instead of running them through Perl regex engine. It's known to speed up things 15% or so (look at sa-users archives). As a bonus, it saves some memory. As network rules are usually much more longer in duration, you might not notice that much difference in total scan time. Also depends on whether you have big rulesets like Sought.