Re: Advice Required - for avoiding conflict betwen qmail-smtpd, rblsmtpd loaded as shared objects in tcpserver
Manvendra Bhangui <[email protected]> Sun, 2 Apr 2017 21:09:26 +0530
| Newsgroups | gmane.mail.qmail.general |
|---|---|
| Message-ID | <CAOqj+1N875n_vkAJiELuREvaAb8dRtS6mifb+zkEq5LsR-p9kA@mail.gmail.com> |
On 2 April 2017 at 20:47, Charles Cazabon <[email protected]> wrote: > 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. Would want to try this. I have heard about smtp-source and smtp-sink but never used them. Any recommendations?