Re: [Zinq-general] Patch to open data.cdb no more than once per second
Mark Johnson <[email protected]>
| Newsgroups | gmane.network.djbdns |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Mar 26, 2009 at 4:53 PM, Jos Backus <[email protected]> wrote: > On Thu, Mar 26, 2009 at 04:43:02PM -0500, Mark Johnson wrote: >> Any opposition to this patch? >> >> http://marc.info/?l=djbdns&m=108229203212517&w=3 > > It seems to violate POLA. And are there really cases where people update > data.cdb multiple times per second and want this behavior? Principle of least astonishment? It's a performance tweak to avoid mmap / munmap overhead. It's actually munmap that's the killer. Without the patch, data.cdb is opened and mmap'd with every query (and closed and munmap'd). With the patch, it won't be opened and mmap'd more than once per second. I doubt most people will notice that tinydns and friends don't see changes to data.cdb for up to a second. It'll be noted in CHANGES. Suggestions for additional scary sounding warnings appreciated. Dan didn't seem terribly opposed to the idea in general, although he thought every 100 queries and 1/100th of a second was the way to go: http://marc.info/?l=djbdns&m=108291830815651&w=2