On Mon, Jun 23, 2008 at 04:45:16PM +1000, Christian Purnomo wrote:
...
> We were hit with 65k spam messages between the 6 hours between 00:00am
> 06:00am this morning, by the time business starts, the mail queue was
> already soaring up to around 19k around 9am.  I was watching the mail
> queue growth, the throughput of incoming mail -> postfix -> amavis
> (spamassassin only) -> postfix -> relay to internal hosts, was only 1-2
> messages per second.
> 
> Our configuration in postfix and amavisd are as follow, the server has
> 1.5G memory with SCSI disks (Raid 5) and 2 x 2.x Xeon processor - we
> feel the server has a decent profile and *should* cope with the
> requirement. 

Yes, this should be pretty adequate.
 
> We fiddled with the max proc for smtp-amavis below from 25, 50, 100 (and
> also change max_servers variable in amavisd.conf accordingly) but the
> rate/second throughput hardly changed during these periods.  

Increasing it beyond some number (25 sounds reasonable) will be
counterproductive, as it may force the amavisd processes to be
alternately swapped out.

 
> Would anyone be able to share some lights on our issue? please let us
> know if you require more information from our settings.  
> 
> Thanks
> 
> CP
> 
> 
> master.cf
> ---------
> smtp      inet  n       -       -       -       100     smtpd
> 
> smtp-amavis unix -      -       y     -       25  lmtp
>     -o smtp_data_done_timeout=1200
>     -o disable_dns_lookups=yes
> 
> 127.0.0.1:10025 inet n  -       y     -       200  smtpd
>     -o content_filter=
>     -o local_recipient_maps=
>     -o relay_recipient_maps=
>     -o smtpd_restriction_classes=
>     -o smtpd_client_restrictions=
>     -o smtpd_helo_restrictions=
>     -o smtpd_sender_restrictions=
>     -o smtpd_recipient_restrictions=permit_mynetworks,reject
>     -o mynetworks=127.0.0.0/8
>     -o strict_rfc821_envelopes=yes

Should ideally use "disable_dns_lookups=yes" here too, I think, but
that's not a huge problem.  Otherwise what you've posted so far looks
very reasonable.

*Probably* you have something in the SpamAssassin or ClamAV processing
phase causing the processes to bog down.  (Assuming you're using
ClamAV.)

A couple thoughts:

  * Verify that your amavisd process is connecting to and using the
ClamAV daemon; if it is failing to connect and falling back to clamscan
each time, that will dramatically hurt throughput.

  * If you are using SpamAssassin Bayes rules, try disabling them and
see if that brings performance back to a reasonable level.  If so, you
can run without it temporarily while you try to uncover the problem.  A
corrupted DB file could cause a big performance hit.

  * Look for SpamAssassin rules which may reference dead or otherwise
non-responsive RBLs.  Waiting for DNS timeouts on every message can
slow things dramatically.  If, for instance, you are querying the
SpamHaus Zen list and your usage grew to where they block your queries
without a license, this would cause an abrupt drop in your performance. 
(Not saying that is the problem, just citing it as an example of such
reasons.)

  * Run a caching DNS server, so that lookups on slow RBL servers (or
other DNS servers which are slow to respond) are cached.  I strongly
recommend dnscache from the djbdns suite, as consuming less resources
than Bind.

  Hope this helps,

  -- Clifton

-- 
    Clifton Royston  --  [EMAIL PROTECTED] / [EMAIL PROTECTED]
       President  - I and I Computing * http://www.iandicomputing.com/
 Custom programming, network design, systems and network consulting services

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to