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 6:13 PM, Jos Backus <[email protected]> wrote: > I thought tinydns always reopens data.cdb on every query, and this patch > changes it to not do that as often. It makes sense to only reopen it if has > changed (by stat()ing it), and rate-limit that. So I'm curious if there are > cases where data.cdb is updated more than once per second - it doesn't seem > like a good fit for a 'constant' database. Maybe I misunderstand. The idea is to minimize the per query overhead. I don't know that trading a mmap/munmap per query for a stat per query would be that great of a trade. Reopening data.cdb only upon receipt of, say, a SIGHUP, would be even better, but that would *really* surprise people.