On Thu, 2011-07-07 at 08:27 +0000, Kārlis Repsons wrote:

> as per my current SA setup it takes quite a while until all tests are
> over and the mail is delivered.
>
How are you running SA? If you're explicitly running 'spamassassin' ,
whether from a script, a procmail recipe or as a Postfix service or
equivalent, it will be loaded, initialised and shut down for every
message it handles. Doing that gives approximately half the throughput
you'd get by running it as a server (spamc/spamd) or via amavis-new
(where SA is loaded as part of amavis).

> still DNS lookups are done, hashes
> are computed and so it takes just about the same time as before...
>
You can get a large speed-up by simply running a local copy of BIND or
some other DNS cache (I run BIND).

I see the performance hit from using spamassassin instead of spamc/spamd
despite though I'm running a local caching DNSserver. 

In terms of increased performance vs. effort needed, the following list
shows the low-hanging fruit first, at least this is my personal ranking:

1) use spamc/spamd in place of the spamassassin executable
2) introduce a local DNScache
3) tune spamd, i.e. adjust its max and min child processes to
   match your workload, CPU power and available RAM
4) consider using amavis-new
5) tune your ruleset 

Do (1) and (2) before even starting to think about the remaining items. 

Martin



Reply via email to