Stas wrote:
> On Fri, 8 Sep 2000, Perrin Harkins wrote:
> > Nevertheless, in benchmarks we ran we found forking qmail-inject to be
> > quite a bit faster than Net::SMTP. I'd say that at least from a
> > command-line script qmail-inject is a more scalable approach.
>
> Quite possible, I was talking about the fat sendmail binaries :)
Yes, quite possible.
Using SMTP and qmail-inject both have the overhead of a fork, because the SMTP
tcpserver will fork off a copy of qmail-smtpd to handle the request.
Additionally, the SMTP tcpserver is probably doing a reverse DNS lookup and
probably an ident lookup which would probably cause another fork for identd.
(Both reverse DNS and ident lookup are enabled by default in ucspi-tcp-0.84.)
This network activity and possibly another fork will cause delay.
The overhead of forking directly off from mod_perl does not seem so bad when
you look at copy-on-write memory managers. The fork: (a) does not cause copying
of the big mod_perl process at fork thanks to copy-on-write, and (b) there will
be virtually no dirtying of pages and copying because a exec() will be
immediately done. A possible problem is qmail-inject inheriting a bunch of
filehandles from mod_perl, but they should all be marked close-on-exec.
David Harris
President, DRH Internet Inc.
[EMAIL PROTECTED]
http://www.drh.net/