Nicolas, > I have a problem and you may help me. I use amavisd-new with a postfix > to burn spam. I have 3 machines which do this task. Two of them are fine > but the third one does almost nothing. > > My cursed machine is a bi-xeon quad-core on freebsd 7.0. When I start > amavisd, all child go in 'lockf' state. Good. When I start postfix, the > machine process e-mail perfectly, CPUs are 0% idle. But, amavisd > children begin to be slow, time to process a mail grow from 500ms to 18s > and children are almost always in 'select' state. > > Here, PCUs are 90% idle, hard disks are playing poker and swap space is > not used. I think I have maybe something wrong this my network, but I test > without firewall and with a local dns server and I have the same result.
I wonder have you solved your mystery by now? I looked at your posting a couple of times but nothing clever came to my mind. > I give you a TIMING log exemple: > > Jun 5 14:52:02 sargeras amavis[66238]: (66238-01-2) > TIMING [total 12618 ms] - SMTP pre-DATA-flush: 3038 (24%)24, > SMTP DATA: 100 (1%)25, check_init: 4036 (32%)57, digest_hdr: 1 (0%)57, > digest_body: 1 (0%)57, gen_mail_id: 2 (0%)57, mime_decode: 16 (0%)57, > get-file-type3: 16 (0%)57, decompose_part: 1 (0%)57, > parts_decode: 0 (0%)57, check_header: 2 (0%)57, AV-scan-1: 8 (0%)57, > spam-wb-list: 2 (0%)57, DSPAM: 56 (0%)58, SA parse: 4 (0%)58, > SA check: 215 (2%)59, DSPAM learn: 5 (0%)59, update_cache: 1 (0%)59, > decide_mail_destiny: 2 (0%)59, open-mbx: 62 (0%)60, > write-header: 2 (0%)60, save-to-local-mailbox: 2 (0%)60, > prepare-dsn: 2 (0%)60, main_log_entry: 6 (0%)60, > update_snmp: 1 (0%)60, SMTP pre-response: 5037 (40%)100, > SMTP response: 0 (0%)100, unlink-3-files: 1 (0%)100, rundown: 1 (0%)100 Which version of amavisd-new is that? It is indeed unusual. Are there any custom hooks code attached (amavisd.conf)? > As you can see, amavisd spend time on: > - SMTP pre-DATA-flush > - check_init > - SMTP pre-response > I don't know that amavisd done in these 3 steps. So if someone can help > me in any manner, it will be great. The 'SMTP pre-DATA-flush' in the above case (in a multi-transactional SMTP session - for subsequent messages on a previously established session) would account for time between when a 'MAIL FROM' smtp command was received, up to the point when a "354 End data with <CR><LF>" is sent. That includes receiving all the RCPT TO commands and the DATA command. During that time amavisd would initialize data preparing for the new transaction, and register a process in a nanny database if that is enabled. The 'check_init' covers initializations before checking begins. It again involves nanny database update (if enabled). 'SMTP pre-response' covers the final cleanup after mail checking, and again includes the nanny database update. All three sections should be quite short normally. The nanny database may be a coincidence. To rule out this possibility, try setting $nanny_details_level to 0. Is there some application running (similar to amavisd-nanny) which is accessing the nanny.db database without a fine-granularity locking? Mark ------------------------------------------------------------------------- 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/
