Re: Performance of KVS in dnsdist
labs--- via Pdns-dev <[email protected]> Mon, 18 May 2020 18:06:23 +0200
| Newsgroups | gmane.network.dns.powerdns.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello Remi, Am 15.05.20 um 16:10 schrieb Remi Gacogne via Pdns-dev: > Hi Oliver, > > In itself, opening the CDB file is not an expensive operation, it mostly > consists of one stat() call to see if the file exists, one open() call > to open it then one mmap() call to map the content of the file into the > memory of the process. Doing that once per minute should not be too bad, > it might be perceptible on the latency on the request triggering the > reload but that should not kill your performance since dnsdist does not > parse the whole file at once. Note however that the content of the new > file might not be in the file system cache, so there might a noticeable > cost when subsequent queries trigger a cache miss, asking the content of > the file to be loaded from the disk into memory. Whether that cost will > make a noticeable impact mostly depends on the size of your file and the > memory pressure of your system, a small file (~a few MBytes) will likely > still have its content loaded in cache if it was very recently generated > or copied. thanks, this assessment helps me to understand the CDB format and its internal working. > Is there any reason you are not considering KVS with LMDB instead? For a > database whose content changes that often, that might be a better option. Yes, but just my little knowledge about LMDB and my wrong thinking. I thought that this would be a "static" file which is read by dnsdist only once on startup. But after a closer look, this seems to be exactly what we need. Thanks for your hints! I think we will try LMDB. Wish you all the best, Oliver