> On Apr 24, 2017, at 6:34 AM, A. Schulze <[email protected]> wrote:
> 
> Today I send 5k messages and /measure/ the times.

Look closely at the delays=a/b/c/d times.

>  time for i in `seq 1 5000`; do sendmail -f $sender $recipient < msgfile; done
>  real    3m34.281s
>  user    0m13.120s
>  sys     0m9.764s

That's 214 seconds, or 23 msgs/sec.  Are you writing straight through to disk,
or do you have a RAID controller with a battery-backed cache?  How big is the
"msgfile"?  What iostat tell you about your disk while this is happening?

> first message
> Apr 24 10:45:22 submitter postfix/pickup[14884]: 3wBKfp0Q7MzDYR: uid=12345 
> from=<$sender>
> Apr 24 10:45:23 submitter postfix/smtp[17141]: 3wBKfp0Q7MzDYR: 
> to=<$recipient>, relay=$MSA:25, delay=1.5, delays=0.05/0.01/0.49/1, 
> dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 3wBKfp49pbz3h1D)

The c/d numbers are very high for communication to a presumably nearby MSA.
What might be the cause of 400ms of latency setting up the connection?  What
might be the cause of 1000ms of latency to transfer the message?

At 1.5 seconds per delivery, and a concurrency of 20, your maximum throughput
is ~13.3 msgs/sec, which for 5000 msgs is ~375s or 6m15s.

> last message
> Apr 24 10:48:56 submitter postfix/pickup[29155]: 3wBKkw1tlJzGNV: uid=12345 
> from=<$sender>
> Apr 24 10:51:43 submitter postfix/smtp[30768]: 3wBKkw1tlJzGNV: 
> to=<$recipient>, relay=$MSA:25, delay=167, delays=0.03/165/0.41/1.2, 
> dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 3wBKp60c9kzXN9)

This message had a similar "c+d" of 1.6s.  The total time was 6m20s!  Which 
suggests that
the bottleneck is a high-latency MSA.  If the MSA has more capacity to offer 
and is willing
to accept more messages in parallel, you can raise the concurrency limit to 
compensate, but
it is generally more productive to see if you can reduce the latency first.

        Throughput = Concurrency / Latency

-- 
        Viktor.

Reply via email to