You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Jean Deram <sp...@drakar.org> on 2005/02/01 16:11:50 UTC
Why SA is so slow with this rules?
Hi
I'm making bench with SA 3.0.2 running with perl 5.8.6
SA is launched by amavisd 2.2.1
It runs on a dual xeon 2.8 with 2GB of ram with a redhat 3
(2.4.21-15.0.4.ELsmp)
I run 2 instances of Postfix with different spool directory (no local
mailboxes)
Making test with postal give me :
Send : 920 msg send in 3 min, size between 1 to 250k.
I have this perfs in SA:
1.9 msg / sec : with default rules + 70_sare_adult.cf 70_sare_oem.cf
70_sare_random.cf
3.0 msg / sec : with default rules
4.5 msg / sec : default rules without 20_drugs.cf and 20_phrases.cf
What could I make to have best perfs with SA's default rules + this 3
sare's rules?
Why this 5 rules slow down SA?
I think that with 2 cpu and 2 GB of ram, the perfs should be better.
In amavisd the time taken by for processing 1 mail is very high. In logs
I see :SA check: 9365ms, SA check: 9706ms, SA check:
7256ms...
Like in http://wiki.apache.org/spamassassin/Utf8Performance I changed
/etc/sysconfig/i18n LANG to en_US and recompile SA. I've also tried with
LANG=C and LC_ALL=C by things are not better.
Thanks for helping.
Jean Deram
Re: Why SA is so slow with this rules?
Posted by Jean Deram <sp...@drakar.org>.
Robert Menschel wrote :
>Hello Jean,
>
>Tuesday, February 1, 2005, 7:11:50 AM, you wrote:
>
>JD> Hi
>
>JD> I'm making bench with SA 3.0.2 running with perl 5.8.6
>JD> SA is launched by amavisd 2.2.1
>JD> It runs on a dual xeon 2.8 with 2GB of ram with a redhat 3
>JD> (2.4.21-15.0.4.ELsmp)
>JD> I run 2 instances of Postfix with different spool directory (no local
>JD> mailboxes)
>
>JD> Making test with postal give me :
>JD> Send : 920 msg send in 3 min, size between 1 to 250k.
>
>JD> I have this perfs in SA:
>JD> 1.9 msg / sec : with default rules + 70_sare_adult.cf 70_sare_oem.cf
>JD> 70_sare_random.cf
>JD> 3.0 msg / sec : with default rules
>JD> 4.5 msg / sec : default rules without 20_drugs.cf and 20_phrases.cf
>
>JD> What could I make to have best perfs with SA's default rules + this 3
>JD> sare's rules?
>JD> Why this 5 rules slow down SA?
>
>70_sare_random.cf shouldn't have any significant impact. Those tests
>are real simple and efficient.
>
>70_sare_adult.cf contains a lot of obfuscation tests, but they're
>among the most efficient of that type.
>
>There's also a lot of obfuscation testing in 70_sare_oem.cf, some of
>it not quite so efficient (some testing of \s* between words), but
>nothing horrendous.
>
>There's nothing in those rules that should cause a 50% drop in
>efficiency.
>
>How may instances of SpamAssassin may be running at one time? What's
>your load average and your swap level?
>
>Bob Menschel
>
>
>
>
>
Actually 7 instance of spamassassing are running (infact 7 process
amavisd which are using SA API).
No swap is use. The load average is near 8-9.
Cpu use is near 100%, io wait < 1%
According to http://wiki.apache.org/spamassassin/Utf8Performance I've
tried to change LANG=en_US.UTF-8 to LANG=en_US. I've also tried LANG=C
and LC_ALL=C but things are always slow.
I've also change LANG to en_US in /etc/sysconfig/i18n and reboot
With all the tests I've done I think the problem is still the utf-8
encoding.
Do I have to convert all .cf rules to another charset with for example
iconv?
Launching amavisd & SA in debug mod show me that SA block when it parse
body mail with the rules.
In my local.cf I've got :
skip_rbl_checks 1
use_razor2 0
use_dcc 0
use_pyzor 0
use_bayes 1
bayes_auto_learn 0
bayes_auto_expire 0
bayes_journal_max_size 0
Bayes is in MySQL.
Jean Deram
Re: Why SA is so slow with this rules?
Posted by Robert Menschel <Ro...@Menschel.net>.
Hello Jean,
Tuesday, February 1, 2005, 7:11:50 AM, you wrote:
JD> Hi
JD> I'm making bench with SA 3.0.2 running with perl 5.8.6
JD> SA is launched by amavisd 2.2.1
JD> It runs on a dual xeon 2.8 with 2GB of ram with a redhat 3
JD> (2.4.21-15.0.4.ELsmp)
JD> I run 2 instances of Postfix with different spool directory (no local
JD> mailboxes)
JD> Making test with postal give me :
JD> Send : 920 msg send in 3 min, size between 1 to 250k.
JD> I have this perfs in SA:
JD> 1.9 msg / sec : with default rules + 70_sare_adult.cf 70_sare_oem.cf
JD> 70_sare_random.cf
JD> 3.0 msg / sec : with default rules
JD> 4.5 msg / sec : default rules without 20_drugs.cf and 20_phrases.cf
JD> What could I make to have best perfs with SA's default rules + this 3
JD> sare's rules?
JD> Why this 5 rules slow down SA?
70_sare_random.cf shouldn't have any significant impact. Those tests
are real simple and efficient.
70_sare_adult.cf contains a lot of obfuscation tests, but they're
among the most efficient of that type.
There's also a lot of obfuscation testing in 70_sare_oem.cf, some of
it not quite so efficient (some testing of \s* between words), but
nothing horrendous.
There's nothing in those rules that should cause a 50% drop in
efficiency.
How may instances of SpamAssassin may be running at one time? What's
your load average and your swap level?
Bob Menschel