We're using SwiftMailer to deliver mail to Postfix via SMTP. If we try to fire up more than 3 parallel instances of a PHP script that sends via SwiftMailer, the load average goes to 3+ and the delivery speed goes way down. It's taking us almost a full day to send 500K messages. The remote mail servers are happily accepting our mail, and any that defer are passed off to a fallback relay.

And because we're using a fallback relay, the deferred queue on our main SMTP server is empty.

We're using a local recursive cacheing nameserver (Unbound), and have followed all the tuning tips in the Postfix Tuning README. But we're still scratching our heads as to where to look for the bottleneck as to why it takes all day to send 500K messages. I've read other Postfix optimization articles (including one on ServerFault) but the culprit there always seems to be IO. But our iostat output looks like the disks aren't busy as at all.

3 Answers
3

The problem here is the 66.1%us CPU usage. As you provide no information about the processes that consume this load, I would assume that they are not related to Postfix. They are either the DKIM signing process or the PHP processes.

You need to tune the processes that are responsible for the load and not the process that is responsible for mail delivery.