Spamassassin is slow - any tips or good commercial alternative?

Ronny T. Lampert telecaadmin at gmail.com
Mon Jun 16 15:55:39 IST 2008


> # cat /proc/meminfo
> MemTotal:      1028576 kB
> MemFree:        182964 kB
> Buffers:        116612 kB
> Cached:         263300 kB
> SwapCached:       3028 kB
> Active:         624508 kB

Your server details seem OK - you're not too short on mem, however 
you're running at 630 of 1024 MB constantly allocated which for my taste 
is a bit much; that doesn't leave to much room for filesystem/... 
caching etc.
Also the 24MB on swap tell me that there was memory pressure at one 
time. Add some RAM.

You forgot the output for nscd - as Julian said, DNS requests make a 
HUGE difference for spamassassin speedwise if they are cached or not.

You won't get away without doing some work, though, if you want a speedup:

0) add RAM
1) run nscd and a caching name server
2) "mount -o noatime" your filesystems, esp. your spool directory
3) tune the # of MS children
4) lower batch sizes, this decreases individual mail delay, but may 
decrease overall thruput:

MailScanner.conf:
Max Unscanned Messages Per Scan = 10
Max Unsafe Messages Per Scan = 10

5) check if you use spamassassin cache!
6) use RBLs at SMTP level


To put this into perspective: my AVERAGE overall processing time is at 
2.4 seconds. No cheating allowed.

Cheers,
Ronny



More information about the MailScanner mailing list