Performance Enhancements

Julian Field mailscanner at ecs.soton.ac.uk
Fri Jan 31 22:56:06 GMT 2003


At 21:53 31/01/2003, you wrote:
>Julian Field wrote:
> >
>
> > >Another thought is with Spam Assassin.  I know it has the capability
> to run
> > >in daemon mode (spamd).  Does MailScanner even support this?  Does running
> > >spamd in daemon mode give you any performance advantage at all?
> >
> > The spamd daemon merely provides a (narrow) route to the SpamAssassin code,
> > which is all written in perl. MailScanner talks to the perl code directly,
> > which is considerably faster than having to poke all the files down a
> > socket to it. Using spamd would be slower.
> >
>
>Have you done any load testing of the two approaches?  In my own (brief)
>tests, "time spamc < msg" is _much_ faster than "time spamassassin -t <
>msg".  This would seem to contract the assertion about poking all the
>files down a socket.

Yes, using the "spamassassin" script is far slower, which is why I don't
use it. SpamAssassin is a big function library. You can do 1 of 3 things:
1) call it via the spamassassin script, which requires recompiling all the
perl for each message. This is the slowest.
2) call it via the spamd daemon. This saves recompiling the perl for each
message, but requires you to push the entire message down a socket.
3) call the function library directly. This saves recompiling the perl for
each message, and also has no bandwidth constraint for getting the message
into SpamAssassin. This is by far the fastest method.

MailScanner uses approach number 3.


>Though, it's my impression that what spamd gets you is not having to
>re-start spam assassin for each message (ie. avoiding the perl start up
>overhead), whereas mailscanner gets around this by being a persistant
>perl program.  So I can see where spamc/spamd might be better than
>running the spamassassin cli tool, but not better than what mailscanner
>already does.  But I don't know for sure, and was hoping to find some
>detailed answers.

Hopefully the explanation above answers your question.
--
Julian Field
www.MailScanner.info
MailScanner thanks transtec Computers for their support



More information about the MailScanner mailing list