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
::ImageInf
o 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