> On Apr 21, 2017, at 4:11 AM, A. Schulze <[email protected]> wrote: > > A script generates 10k message files, same sender, different receiver. > They are injected using "sendmail -t -f sender < messagefile" in the local MTA > The MTA is configured to forward all messages to a central MSA.
Message injection via sendmail(1) is much less efficient than injection via SMTP. The message is synced to disk twice, and the pickup(8) service can only process one message at a time, while SMTP inject can handle multiple messages in parallel. > This MSA require authentication and STARTTLS > All works fine, except speed. You've provided no information on where the performance bottleneck lies. What are the averages of the delays=a/b/c/d log values? > The MTA uses one SMTP-Session per message. I think the reason is documented: > http://www.postfix.org/CONNECTION_CACHE_README.html#limitations, first bullet Sure, and connection re-use is mainly helpful when some of the IP addresses of the SMTP servers for the nexthop domain are non-responsive and connections are timing out. Otherwise, connection caching offers only marginal gains. (If PTR records for your client's IP address are registered at a non-responsive DNS server, that could be another source of per-connection overhead). > as expected, even "smtp_connection_cache_destinations = static:all" doesn't > help. > > So what may be the strategy to speed up? First identify the origin of the delays. Lack of connection reuse is rarely the problem. See: http://www.postfix.org/TUNING_README.html http://www.postfix.org/QSHAPE_README.html -- Viktor.
