Re: email questions

From: Matthew Schumacher <schu@schu.net>
Date: Fri Jul 01 2005 - 11:26:07 AKDT

Adam bultman wrote:
>
> (FWIW: My sendmail servers at my last job could crank out maybe 60,000
> pieces of mail an hour, full tilt - while a similar qmail server can
> crank out about 250,000)
>
> And finally: Don't use mbox format, use maildirs. Much easier to manage.
>

It all depends on what your doing, in a box stock config, yes qmail is
faster. But then who uses a box stock qmail?

If you use qmail-scanner as recommended by the website Tim posted
http://www.jms1.net/qmail/ then your qmail program calls a perl script
on every single email during the smtp transaction. This perl program
gets parsed, compiled, and ran on every single email. This will kill
performance.

Here is an example on just how much performance it will kill:

The freeradius project uses a perl script to query for simultaneous
logins. This perl script scan be slow, so I wrote it into a daemon then
wrote a small compiled c program to pass the query over a socket.

# time ./checkradc as5300 xx.xx.xx.xx 17 user 1

real 0m0.094s
user 0m0.010s
sys 0m0.010s

# time ./checkrad as5300 xx.xx.xx.xx 17 user 1

real 0m0.333s
user 0m0.230s
sys 0m0.040s

As you can see leaving the perl part compiled and passing your request
to it over a tcp socket built by a small compiled program is a LOT
faster. Remember this is only one run, this gets worse when you are
running the same perl program several times on different messages.

This is why sendmail is so efficient when it filters. This is also why
the spamd/spamc and clamdscan/clamd programs are so much faster. All
filtering is sent to a daemon that is all ready to go over a socket.

Another performance problem with qmail is the maildir format. Yes,
bringing back an entire message is very fast, but reading all of the
headers in a mailbox is MUCH slower because every file needs to be
opened and closed. If you are using sendmail you can use the cyrus imap
LDA.

Cyrus buys you a couple of good performance benefits:

1. The mailer is a daemon so sendmail doesn't call a LDA like procmail,
instead it passes the message into a socket and it's done. On my
sendmail/mimedefang/cyrus systems the disk isn't even touched until the
message is being written to the mailbox.

2. Cyrus stores each message in a file like maildir, but it puts
caching and indexing information in Berkeley DB format. This makes it
every bit as fast as maildir for each message, but much faster than mbox
for streaming headers.

Because of these reasons, by the time you had any reasonable filtering
functionality, and an imap server to check the email I think you will
find the sendmail/cyrus is every bit as fast if not faster than qmail.

I have 81300 messages in my trash box, and I can open that mailbox in my
webmail in about 20 seconds using cyrus on modest hardware. I seriously
doubt qmail could do that.

Anyway, that's how I skin this cat and why....
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Fri Jul 1 11:26:05 2005

This archive was generated by hypermail 2.1.8 : Fri Jul 01 2005 - 11:26:05 AKDT