You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Devilish Entity <de...@gmail.com> on 2007/06/08 00:06:01 UTC

Spamassassin is very slow...

Well, before all, here is my config :

nowhere:~# linuxinfo
Linux nowhere 2.6.18-4-k7 #1 SMP Wed May 9 23:42:01 UTC 2007
One AMD Unknown 1300MHz processor, 2601.92 total bogomips, 95M RAM
System library 2.3.6
OS : Debian Etch


I use qmail + jms patch (lastest version (on 2007/06/07))
and as frontend simscan 1.3.1 using ClamaV & Spamassassin (spamd &
spamc scanning)

Scans take about 15~20secs for each mails, i used to be fastest with
qmail-scanner (with the same hardware (i know i don't have lots of
ram)) and Debian Sarge.

Here is a sample of a Received header :

Received: by simscan 1.3.1 ppid: 19116, pid: 19117, t: 14.4822s
         scanners: clamav: 0.90.2/m:43 spam: 3.2.0

Here is my SA conf (local.cf) :

rewrite_header Subject *****SPAM*****
required_score 5.0
use_bayes 1
bayes_auto_learn 1

Here is the init.pre file :

loadplugin Mail::SpamAssassin::Plugin::URIDNSBL
loadplugin Mail::SpamAssassin::Plugin::Hashcash
loadplugin Mail::SpamAssassin::Plugin::SPF

Then a mix of my v3*.pre files :

loadplugin Mail::SpamAssassin::Plugin::Pyzor
loadplugin Mail::SpamAssassin::Plugin::Razor2
loadplugin Mail::SpamAssassin::Plugin::SpamCop
loadplugin Mail::SpamAssassin::Plugin::AWL
loadplugin Mail::SpamAssassin::Plugin::AutoLearnThreshold
loadplugin Mail::SpamAssassin::Plugin::WhiteListSubject
loadplugin Mail::SpamAssassin::Plugin::MIMEHeader
loadplugin Mail::SpamAssassin::Plugin::ReplaceTags
loadplugin Mail::SpamAssassin::Plugin::Check
loadplugin Mail::SpamAssassin::Plugin::URIDetail
loadplugin Mail::SpamAssassin::Plugin::Bayes
loadplugin Mail::SpamAssassin::Plugin::BodyEval
loadplugin Mail::SpamAssassin::Plugin::DNSEval
loadplugin Mail::SpamAssassin::Plugin::HTMLEval
loadplugin Mail::SpamAssassin::Plugin::HeaderEval
loadplugin Mail::SpamAssassin::Plugin::MIMEEval
loadplugin Mail::SpamAssassin::Plugin::RelayEval
loadplugin Mail::SpamAssassin::Plugin::URIEval
loadplugin Mail::SpamAssassin::Plugin::WLBLEval
loadplugin Mail::SpamAssassin::Plugin::VBounce
loadplugin Mail::SpamAssassin::Plugin::ImageInfo

Any help should be usefull...
It's not really a critical problems from now since i'm not using this
server as a production one but it could be really annoying if i do
one, and even if my ram is low it looks like to be really slow...
Maybe it takes time when fetching informations from some modules, i dunno..

Thx

Re: Spamassassin is very slow...

Posted by Matt Kettler <mk...@verizon.net>.
Devilish Entity wrote:
> Well, before all, here is my config :
>
> nowhere:~# linuxinfo
> Linux nowhere 2.6.18-4-k7 #1 SMP Wed May 9 23:42:01 UTC 2007
> One AMD Unknown 1300MHz processor, 2601.92 total bogomips, 95M RAM
> System library 2.3.6
> OS : Debian Etch
>
>
> I use qmail + jms patch (lastest version (on 2007/06/07))
> and as frontend simscan 1.3.1 using ClamaV & Spamassassin (spamd &
> spamc scanning) 
As theo suggested, you need to get more ram to get SA to run well.

In the meantime, you might want to consider these measures to cut down
your memory loading:

1) reduce the number of spamd children in spamd's -m parameter.
2) disable the AWL and bayes. While powerful, these two features are
memory hungry.
3) if you've got any add-on rulesets, make sure you get rid of any "big"
rulesets. In your case, keep it to a very minimal set. Maybe 80k total
of add-on .cf files.
4) dig around your system and disable any daemons you're not actually
using. ie: if you don't run a website, make sure httpd isn't running.

>From there, check your memory load with the "free" command. Ideally you
want swap used to be much less than "mem +buffers/cache" free.

For example on my test box:

             total       used       free     shared    buffers     cached
Mem:        492152     390900     101252          0      83896     125092
-/+ buffers/cache:     181912     310240
Swap:      1015800      30484     985316

I've got 30,484 K of swap used. However, I've got 310,240k of memory
free when you count buffers and cache, over 10 times as much memory. I
try to keep it at least doubled.

Swap usage itself isn't bad, as the OS will tend to swap out rarely used
things to make a larger disk cache. However, if there's a lot of swap,
and not a lot of cache, you're probably overloaded and wasting a lot of
time thrashing pages in and out of the swap.



>
>