Re: Advice Required - for avoiding conflict betwen qmail-smtpd, rblsmtpd loaded as shared objects in tcpserver

Charles Cazabon <[email protected]> Sun, 2 Apr 2017 09:17:16 -0600
Newsgroups gmane.mail.qmail.general
Message-ID <[email protected]>
Manvendra Bhangui <[email protected]> wrote:
> On 1 April 2017 at 22:36, Charles Cazabon wrote:
>
> > reasonable operating systems and even vaguely-modern hardware.  Do you
> > actually have data showing that this minimal overhead is a bottleneck in
> > your situation?  If not, why are you trying to eliminate it?
>
> I do have a situation where I open around 23 control files in the
> qmail-smtpd process. I want to move this to the main() of the
> tcpserver process and avoid loading it again and again.
[...]
> No I do not have any data. It is definitely not a bottleneck. It's
> just that the idea of loading the control files just once does look
> good.

I'm afraid you're fooling yourself.  Any control files that are opened and
read regularly - i.e. if you're getting at least a few SMTP connections every
minute - will be satisfied from the cache.  And qmail's reading of those files
doesn't use a lot of CPU time or other resources.

So you aren't really saving CPU, or anything else for that matter.   You've
just introduced complexity, and probably security problems, for no real
benefit.

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.

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
--------------------------------------------------------------------------