On Tue, Jul 26, 2011 at 05:17:49PM -0700, Steve Jenkins wrote:

> > http://www.postfix.org/TUNING_README.html#mailing_tips
> 
> QSHAPE is one tool we were already using, and the good news is that
> even during a send process (one of which is going on right now), the
> active queue is generally very small. Like so:
> 
>                      T  5 10 20 40 80 160 320 640 1280 1280+
>               TOTAL  9  9  0  0  0  0   0   0   0    0     0
>           yahoo.com  3  3  0  0  0  0   0   0   0    0     0
>           gmail.com  2  2  0  0  0  0   0   0   0    0     0
>           ymail.com  2  2  0  0  0  0   0   0   0    0     0
>            yahoo.in  1  1  0  0  0  0   0   0   0    0     0
>         hotmail.com  1  1  0  0  0  0   0   0   0    0     0

Is this the active queue only, or active + incoming. If the latter
(default qshape(1) output), then the output side of Postfix is not
saturated, and you can send more mail by giving Postfix more work
(increase the input concurrency, or decrease the input latency or both).

> And here's the qshape deferred output on our fallback relay:
> 
>                      T  5 10 20 40 80 160 320 640 1280 1280+
>               TOTAL 25  2  2  1  3  8   6   0   0    0     3

This also shows essentially no output pressure.

>    www.facebook.com  3  0  0  0  0  1   0   0   0    0     2

It seems unlikely that facebook has @www.facebook.com email addresses,
I'd expect those to be @facebook.com.

>           tmail.com  2  1  0  0  1  0   0   0   0    0     0

Likewise, this is a typo, "t" is one row up from "g" on the keyboard.

>              at.net  1  0  0  0  0  0   1   0   0    0     0

Almost certainly a typo of "att.net"

>         gotmail.com  1  0  0  0  0  0   1   0   0    0     0

Probably hotmail, ... Ideally these are part of the opt-in confirmation
traffic, rather than unverified junk addresses on the stable list.

> adjust the smtpd_recipient_limit parameter setting.
> 
> SwiftMail is submitting via SMTP.

It sure looks like the SwiftMail engine is either not very swift, or
is configured well below peak throughput. Postfix is input-starved,
not output saturated. Does SwiftMail implement SMTP PIPELINING, do
you have verbose logging enabled slowing down message input?

> As far as parallel submissions, we're only doing three at a time
> (three SwiftMail processes sending at a time). Our in_flow_delay
> parameter is set to 0.

This is almost certainly way too low. To get peak utilization your
input concurrency should be in the 10-20 range, assuming that no
silly latency incurred in slow DNS resolution of the PTR and A
records of the connecting client.

You need to look at the delay=a/b/c/d numbers of non-fallback mail and
determine the typical value of "a", this will give you the input engine
latency. To get throughput increase concurrency while making sure that
the output is keeping up and input latency is not spiking.

> We aren't receiving a lot of mail on this box,
> so I'm not sure that delay would even kick in if it were set to the 1s
> default. Beyond this, we're not sure how to check to see if the disk
> is being "overwhelmed with mail submissions."

Almost certainly not, if it were, your "incoming" queue would be large,
and active queue small.

> - Reduce the smtp_connect_timeout and smtp_helo_timeout values so that
> Postfix does not waste lots of time connecting to non-responding
> remote SMTP servers.
> 
> Our smtp_connect_timeout is 10s and our smtp_helo_timeout is 60s.

You're tuning the output, but you're input-starved. You can make the
output latency zero (magical instant delivery) and still see low
throughput if the input rate is low.

> - Use a dedicated mail delivery transport for problematic
> destinations, with reduced timeouts and with adjusted concurrency. See
> "Tuning the number of simultaneous deliveries" below.

More output tuning, you don't have an output problem.

-- 
        Viktor.

Reply via email to