
mbhangui at gmail
Feb 5, 2010, 7:48 PM
Post #2 of 2
(855 views)
Permalink
|
On Wed, 2010-02-03 at 01:06 +0200, Ibrahim Harrani wrote: > Postfix accepts mails in smtp level very fast. It can accept more than > 1000 connections without increasing server load. > (the reason:it is because of single processes with multi-threaded > support and it uses FreeBSD kqueue and Linux epoll to > handle sockets) > But when the numbers of mail in postfix queue increase delivery of > mail is getting slow. > > In qmail case, it the concurrent connection is more than 400, the > server load increases dramatically(more than 50) > (the reason: it forks a qmail-smtpd binary of the every connection. > the qmail-smtpd read many control files. tcpserver uses traditional > select() for the sockets ) > > But qmail deliverys mail in the queue very fast. > > If my assumtions are correct, designing postfix style smtpd and qmail > style mail delivery mechanism will boost the performance of mail > system. OpenBSD's smtpd might be good start? > > Any comment? I have used a different approach to increase qmail's throughput. In fact, I have replaced all my email marketing servers which were earlier running postfix with qmail. The trick I use is to create multiple queues using queue-fix and running qmail-send / qmail-todo on each of the queues. A qmail-queue wrapper called qmail-multi evenly distributes incoming mails across each of the queues http://en.wikipedia.org/wiki/File:Indimail_queue.png Patch for qmail which incorporates the above architecture is in the Patches subdirectory at https://sourceforge.net/projects/indimail/files/ The patch removes all hard coded directories like /var/qmail, /var/qmail/queue, etc and uses environment variables like QMAILDIR, QUEUEDIR, etc. I am toying with the idea of moving all stuff (in qmail-smtpd) like loading all the control files to a separate process so that qmail-smtpd does only SMTP. All other stuff like badmailfrom, rcpt checks, etc move out to a daemon. However, I am not sure of the performance gain that i will get and also the fact that there will be some penalty due to the added interprocess communication between qmail-smtpd and the daemon.
|