[Dovecot] Configuration advices for a 50000 mailboxes server(s)

Stan Hoeppner stan at hardwarefreak.com
Fri Apr 20 03:31:13 EEST 2012


On 4/17/2012 3:08 PM, Jan-Frode Myklebust wrote:
> Our struggle is the number of
> iops we're able to get from the backend storage (IBM DS4800), mostly
> a problem when we have storms of incoming marketing messages in addition
> to the pop/imap traffic.

This issue has come up twice on the Postfix list in less than a month.
You can fix this specific problem very easily.  Only marketing servers
and busy/misconfigured list servers make many parallel connections to
your MX hosts.  Allowing them to blast all those messages over parallel
connections is what bogs down your spool storage.  The fix is simple:
limit all SMTP clients to a small number of parallel connections.  This
will slow down marketing and list server blasts without affecting normal
sending MTAs.  To do so, add this to /etc/postfix/main.cf:

smtpd_client_connection_count_limit = 4*

The default Postfix process limit is 100.  The concurrent connection
limit is 1/2 the process limit, so 50 parallel connections per client IP
are allowed by default.  If remote hosts also do connection caching,
they can force feed your MTA many hundreds of messages/sec.  Limiting
concurrent connections will decrease their mail rate to a small fraction
of what you're seeing now, reducing IOPS load on your spool storage
significantly.

* This is a good starting point.  You may need to tweak it up a little
bit.  Some list servers (such as XFS) will unsub members if their
multiple connections keep getting refused, so tweak this value until you
find your sweet spot.

-- 
Stan



More information about the dovecot mailing list