[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Finding the Bottleneck



On Fri, Jun 08, 2001 at 09:59:50PM +0800, Jason Lim wrote:
> I have also thought about that... but if you have a look at Qmail's
> website (http://www.qmail.org) then you'll see that a number of
> extremely large mail companies (hotmail for one) uses qmail for... get
> this... outgoing mail. They could've easily chosen sendmail, postfix
> (maybe it wasn't around when they designed their systems), zmailer,
> etc. but those chose qmail.
>
> Why would that be?

probably because qmail was the only high-performance MTA readily
available at the time (not quite true - zmailer was around but it's not
well known and is considerably harder to configure and tune than qmail)

however for certain types of mailing lists, qmail's
one-smtp-connection-per-recipient can be a huge bottleneck in delivery
performance.

if you send personalised messages to each recipient, then it makes no
difference - and qmail's easy VERP support makes bounce-handling a
breeze.

OTOH, if you run a "normal" mailing list where a single message is BCC-ed
to thousands (or hundreds of thousands, or millions) of recipients then
an MTA that delivers to multiple recipients at the same domain within one
smtp session is MUCH faster.

e.g. say you have a mailing list with 200,000 subscribers. of these, say
5,000 are hotmail.com addresses.

with qmail, delivering the 5,000 messages to hotmail.com users would
take 5,000 separate successful smtp sessions - with all the latency and
overhead establishing a connection each time.

that's bad enough by itself, but hotmail's mail servers are often
overloaded and it can sometimes take several attempts to even get a
successful connection.


with postfix (or sendmail or exim - but i wouldn't seriously recommend
either of those as a high-performance MTA), delivering the same 5,000
messages to hotmail would take 100 successful smtp sessions with default
settings.

it could take more (or less), depending on what value you set for
$smtp_destination_recipient_limit (the postfix default is 50) - the limit
is there to work around the fact that many mail servers reject messages
with too many recipients....it's probably safe to increase it to a few
hundred before you notice any servers rejecting messages.

of course, you can still do personalised one-message-per-recipient style
lists with postfix if you want to. the difference is that with postfix
it is an option whereas with qmail it is mandatory.


hotmail's only an extreme example. yahoo.com is similar, and so are
many other "free mail" providers. with large mailing lists, it's not
uncommon to get dozens of recipients even to "normal" domains - e.g
company domains and ISP domains. 

the delays are cumulative. it would not be at all unusual to see a 10:1
or even 20:1 overall difference in the number of smtp sessions required
to deliver a large mailing list.




on a more general note:

i've used most of the available MTAs heavily over the last 8 years or
so, and i've at least dabbled with all of them. until postfix came along
i used qmail as my MTA of choice. now i use postfix exclusively (except
on a handful of "legacy" systems where it's not worth the bother of
converting them to postfix).  postfix has all the advantages of qmail,
without the disadvantages.

the only situation where i would now choose qmail over postfix is if
there was an absolute requirement to use ezmlm or some other mailing
list manager or mail-related tool that only works with qmail.


craig

-- 
craig sanders <cas@taz.net.au>

Fabricati Diem, PVNC.
 -- motto of the Ankh-Morpork City Watch



Reply to: