Re: Benchmarked tcpserver dlopen() -> qmail_smtpd() VS tcpserver --> fork() --> exec qmail-smtpd
Charles Cazabon <[email protected]> Tue, 4 Apr 2017 11:39:36 -0600
| Newsgroups | gmane.mail.qmail.general |
|---|---|
| Message-ID | <[email protected]> |
Manvendra Bhangui <[email protected]> wrote: > > > > I *strongly* urge you to profile the performance of vanilla > > qmail/tcpserver before you decide to "fix" something and try to make it > > "look good". I would bet dollars to doughnuts that you will find you are > > trying to optimize something which is only responsible for 0.01% of the > > program's work in the first place. > > > > As djb himself says, measure, don't speculate. > > So finally I measured and now I have data, and it so consistent, that > I too am surprised. Using dlopen() to load the control files in > tcpserver gives a huge, huge gain Unexpected. Have you increased the size of the default buffer used for reading those files? IIRC it's 64 bytes, and many patches up it to some tens of K. I don't remember if we did that in netqmail. > qmail-smtpd. In the extreme case where I have loaded a 25 Mib > badmailfrom You're Holding It Wrong. qmail's control-file handling is absolutely, completely, and totally NOT designed for multi-megabyte files, and is completely unsuited to be used as such. Given that, your numbers are completely invalid; you're not using the correct tool for the job, so it isn't surprising that it doesn't work very well. If you need stupidly-large control files, you should be using one of the patches that replaces the simple in-memory arrays with a CDB lookup. Your "overhead" loading these control files will disappear. Charles -- -------------------------------------------------------------------------- Charles Cazabon GPL'ed software available at: http://pyropus.ca/software/ Read http://pyropus.ca/personal/writings/12-steps-to-qmail-list-bliss.html --------------------------------------------------------------------------