You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by sp...@saphirtech.fr on 2010/06/02 21:01:33 UTC

perf problems (was Re: SpamAssassin is a disaster for me

Hi,

> What can I do? Thanks for any suggestions....

This is what I do when I get performance issues, and long-running 
processes:

1) check for memory issues such as not enough "low" memory using "free -l" 
and monitor the machine with top and vmstat for a while to get a general 
feeling of what is actually eating up ressources.

2) check for network issues such as:
- badly configured iptables or selinux or whatever security "feature" that 
actually prevents the normal operations through sockets
- DNS response times and general connectivity to RBLs

3) try to reproduce manually:

- are you using spamd and a spamc client, or running spamassassin as 
command line on every mail ?

Excerpt from my .procmailrc

# Pipe the mail through spamassassin (replace 'spamassassin' with 'spamc'
# if you use the spamc/spamd combination)
# The lock file ensures that only 1 spamassassin invocation happens
# at 1 time, to keep the load down.

:0fw: spamassassin.lock
| spamc -f -s 900000
#| /usr/local/bin/spamassassin

- save any email locally say in mymail.txt and run it again using:
spamassassin -D -t < mymail.txt
and get a general feel about the speed, hangs, etc, then run it again and 
save the output for further debugging, read it slowly.

PS: agreed at "you might have picked up another title". As for GFI I guess
this is it: http://www.gfi.com/mes/

HTH,
John

--
... I've seen Sun monitors on fire off the side of the multimedia lab.
I've seen NTU lights glitter in the dark near the Mail Gate.
All these things will be lost in time, like the root partition last
week.

Re: perf problems (was Re: SpamAssassin is a disaster for me

Posted by Ted Mittelstaedt <te...@ipinc.net>.

On 6/2/2010 12:01 PM, spamassassinlist@saphirtech.fr wrote:
> Hi,
>
>> What can I do? Thanks for any suggestions....
>
> This is what I do when I get performance issues, and long-running
> processes:
>

Here is another performance hint.

When you first setup your server and it's running right, do the following:

  cd to wherever you built spamassassin

(in my case 
/usr/ports/mail/p5-Mail-SpamAssassin/work/Mail-SpamAssassin-3.3.1)

run the commands:

sh
time spamassassin -t < sample-nonspam.txt > nonspam.out
time spamassassin -t < sample-spam.txt > spam.out



Save this in your server build notes, this is your baseline
and in the future if you start having problems you can run
the same command to see if the slowdown in within SA itself,
or within your MTA.

Ted