Advertisement

07.03.2008 at 01:55AM PDT, ID: 23536162
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.4

Spamassassin very slow and using too much resources

Asked by DrBrainiac in Spam Assassin

Tags: ,

Hello all,

I just builded a new amavisd-new server to add in our network, but I am having performance issues with the system. Our other two mail-servers run slightly older versions of amavisnew and spamassassin. As far as I can tell the setup is exactly the same.

When starting amavis, it goes well untill it has to startup spamassassin:

Jul  3 09:57:36 ms90 amavis[18462]: SpamControl: initializing Mail::SpamAssassin
Jul  3 09:59:08 ms90 amavis[18462]: SpamControl: init_pre_fork on SpamAssassin done
Jul  3 09:59:08 ms90 amavis[18553]: SpamControl: init_child on SpamAssassin done
Jul  3 09:59:08 ms90 amavis[18554]: SpamControl: init_child on SpamAssassin done

The first line sits there for almost 2 minutes before going on. I experience the same problems when scanning a test spam email with these commands:

# su - amavis      // amavis runs onder user amavis
# time spamassassin -D < /tmp/testmessage > /tmp/speedtest.txt 2>&1

It will result in the attached file "speedtest.txt". I notice it hangs for a while on the following two parts of the process:

Line 114: [19017] dbg: plugin: loading Mail::SpamAssassin::Plugin::ImageInfo from @INC
Line 314: [19017] dbg: rules: running uri tests; score so far=14.091

Other then these two lines, the script runs within acceptable time range.

I also attached all configuration files from postfix, amavis, spamassassin, clamav in case that might be helpfull.

At the moment the server gets around 10 message per minute, but the active queue of postfix is increasing because it cannot handle the scanning.

The CPU load is abnormally high when running with even 1 child amavis process: (from top)

last pid: 19316;  load averages:  0.70,  0.21,  0.14                                                                                 up 0+18:22:27  10:50:49
54 processes:  2 running, 52 sleeping
CPU states:  100% user,  0.0% nice,  0.0% system,  0.0% interrupt,  0.0% idle
Mem: 625M Active, 95M Inact, 194M Wired, 25M Cache, 110M Buf, 44M Free
Swap: 5120M Total, 317M Used, 4803M Free, 6% Inuse

  PID USERNAME  THR PRI NICE   SIZE    RES STATE    TIME   WCPU COMMAND
19285 amavis      1 125    0   468M   415M RUN      1:02 98.53% perl5.8.8
18462 amavis      1  96    0   513M  2324K select   1:26  0.00% perl5.8.8
15385 amavis      1   4    0 56712K 53144K accept   0:26  0.00% clamd

If I enable 5 child processes for amavis (the default), I get a load in 1 minute of 5, where the 5 processes will each use 20% CPU power.

Does anyone have experience with this? Where should I start looking? I have enabled full debugging in amavis to find out that it is spamassassing that is slowing down things, but now im stuck :(Start Free Trial
Attachments:
 
/usr/local/etc/amavisd.conf
 
 
/usr/local/etc/clamd.conf
 
 
/usr/local/etc/mail/spamassassin/local.cf
 
 
/etc/postfix/main.cf
 
 
/etc/postfix/master.cf
 
 
su - amavis & time spamassassin -D < /tmp/testmessage > /tmp/speed.txt 2>&1
 
[+][-]07.03.2008 at 07:10AM PDT, ID: 21925603

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Spam Assassin
Tags: spamassassin, 3.2.5
Sign Up Now!
Solution Provided By: DrBrainiac
Participating Experts: 0
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628