Re: Benchmarked tcpserver dlopen() -> qmail_smtpd() VS tcpserver --> fork() --> exec qmail-smtpd
Erwin Hoffmann <[email protected]> Tue, 4 Apr 2017 21:09:04 +0200
| Newsgroups | gmane.mail.qmail.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Manvendra, > Am 04.04.2017 um 19:39 schrieb Charles Cazabon <[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. > Absolutely ACK. And -- according to your list of control files -- at least some of them can be replaced by environment variables and can be merged into one control file (badmail*). This is the way Spamcontrol did it and s/qmail does it. See: http://fehcom.de/sqmail/man/qmail-smtpd.html regards. --eh. PS: Apart from that: a 25K badmail file is ridiculous. Something is wrong with your mail architecture. Dr. Erwin Hoffmann | FEHCom | http://www.fehcom.de | PGP Key-Id: EE00CF65
signature.asc
(application/pgp-signature, 842 B)
-----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJY4+9RAAoJEIP8+SDuAM9lfJcP/3iiB4kAILMWT+O5s+XPXL0G j/o4l7l4LEPdbw3jYos5Mq+Yn0uGceoTIAAjuyMAqxOMI9QiWgQtysVnRv0Z7bv9 v2px7in23A8g3Lzhs/gLCIHFPsYTlybncbqTkr7aXT029WQvLCJPQaadawHDXA+T TZSurY8cLA6Pq17eCmJQEBCzSA0sg97rVDHOGvkbfyAsnSBwMgyQuDLlBJg5CmAc 4h0FDkvlHXpvz38eI3m9zmpt0mL19lFPngwFhlfpcl7hWy8SAWHV6EeH8y+Tu47J rpGkylFcrnrUtJwbLmYUypSyDBcY7rE8sGiJDATQO0UerYYoRIJDiZI+XOfzV2va wW+KkOrnF3fk58jckg6P6BoPOO7jIljPZ8mf+pDqNWC2P+X/l+EVfjZK/kiUHfct jrfWdLVWjC43EYEyickJbHkU3EM8K0C5k6v95nAghg6x6xK0jJOCNuWePIWh/M/x W1a/GLdN2n6N5mIA+PEfBkDGrG1gnQt0UfavfdkmEbcXaSRran6R+mOohFFNYSvt 5hLPj0fVmluF/G2Ls1LeDtYsdf9bSVu27DwnUfdfV6XTZQ5WwKmyIb0fqAbY7hXw 4aYMWNvemwx4pyAXA2wjBlhFrRhJni9bkf3ltGKxWyysNBsd/ShPF1OxyDp+lESj uMr281bPTTIeiUX0cvP3 =Fovz -----END PGP SIGNATURE-----