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 7:10 PM, Jos Backus <[email protected]> wrote: > On Thu, Mar 26, 2009 at 06:55:39PM -0500, Mark Johnson wrote: >> 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. > > I'm no VM expert but I would imagine that a stat() would be cheaper unless it > has to hit the disk. Assuming the data.cdb doesn't change often, most of the > time the data would be cached. Send me a patch with attached benchmarks showing as good or better qps, I'll apply it. I'm lazy. Lennert did all the benchmarking for his patch years ago, and nobody has since produced contrary results. 8)