At 11:15 PM 09/08/00 +0200, Stas Bekman wrote:
>On Fri, 8 Sep 2000, Bill Moseley wrote:
>> I just looked at my old mail sending module a few days ago that uses
>> sendmail and would fallback to Net::SMTP if sendmail wasn't available (it
>> was running on Win at one point, argh!). I just removed the Net::SMTP
>> part. Are you saying that I removed the wrong code?
>> At 10:31 AM 09/08/00 +0200, Stas Bekman wrote:
>
>As Perrin has suggested, benchmark it an see what's faster. It's so
>simple.
<somewhat joking>
Benchmark: timing 1 iterations of SMTP, Sendmail...
SMTP: 60 wallclock secs ( 0.03 usr + 0.00 sys = 0.03 CPU) @ 33.33/s
(n=1)
(warning: too few iterations for a reliable count)
Sendmail: 0 wallclock secs ( 0.00 usr 0.00 sys + 0.01 cusr 0.01 csys =
0.02 CPU)
(warning: too few iterations for a reliable count)
I guess it isn't a fair test ;) I had my DNS servers unplugged and used
-odd with sendmail. And I guess if I set a timeout of 60 seconds on
Net::SMTP I better be ready to wait that long.
</somewhat joking>
Seriously, though, I can't imagine how to benchmark such a complicated
thing as sending mail. I can do it on my machine, I guess, but that
doesn't tell me how it will work on the live machine that's also sending
out a mailing list or running a faulty nscd on Solaris that hangs DNS
requests, or mailing to [EMAIL PROTECTED] and DNS is hopping from DNS to
DNS to do the lookup.
The nscd thing is the reason I moved from using Net::SMTP; SMTP worked
great most of the time, but really messed things up when the DNS was not
working. Forking may or may not be slower, but it like more of a sure bet.
Have fun,
Bill Moseley
mailto:[EMAIL PROTECTED]