Leon,

> When I send some test mails I can see that most of processing time is spent
> on:
> SMTP DATA: 37 (34%)38
> fwd-connect: 17 (15%)77

> Is there a way to improve these timings or is it OK?

The figures are pretty much normal, as Gary and Mike noted.

The SMTP DATA transfer needs to deal with input, one line at a time
unfortunately, because SMTP protocol requires dot-destuffing, and
timer is supposed to be reset for each line (as decent MTA does it).

You could shave off a millisecond or two by the following change
(which is in my current code, to be in the next version):

--- amavisd.orig        2007-06-27 12:43:00.000000000 +0200
+++ amavisd     2007-11-04 23:39:30.000000000 +0100
@@ -13940,8 +13940,8 @@
             for ($! = 0; defined($ln=<$sock>); $! = 0) {  # optimized for speed
               alarm($smtpd_timeout);  # as fast as:  last if time>$tmax;
-              if ($ln =~ /^\./) {
+              if (substr($ln,0,1) eq '.') {  # faster than $ln=~/^\./
                 if ($ln eq ".\015\012")
                   { $complete = 1; $within_data_transfer = 0; last }
-                $ln =~ s/^\.(.+\015\012)\z/$1/s;   # dot de-stuffing, rfc2821
+                substr($ln,0,1) = '';  # dot de-stuffing, rfc2821
               }
               $size += length($ln);  # message size is defined in rfc1870

Also, you can relatively safely comment out the:  alarm($smtpd_timeout);
which is mostly useful when a feed is slow, which does not happen in a
normal post-queue setup with Postfix. This will cut a few milliseconds
more of a SMTP DATA section. And make sure the size limit in amavisd is
not enabled ($smtpd_message_size_limit and @message_size_limit_maps,
both are disabled by default).

The fwd-connect section is governed almost entirely by a Postfix time to respond
to a new SMTP session on port 10025. Things like smtpd_client_restrictions,
and DNS resolving of a loopback interface address may have some effect there.
But it is mostly an idle latency, CPU can be used meanwhile for some other task.

  Mark

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
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