Open ahupowerdns opened 5 years ago
Quoting @Habbie on a very insightful comment:
<Habbie> so writing to them is slow, but that means this does not suddenly hurt operations when you start looking at them
Aren't we much more likely to write to them than to read from them, though?
Summary of some FD:
Result: deferring the string work to printing will likely have very little operational impact at print time, and would save a ton of work when writing.
Related discoveries: the current code always does a by-string lookup to find the same three ringbuffers. That should also go away.
Mostly fixed by #7503, except perhaps that last discovery:
the current code always does a by-string lookup to find the same three ringbuffers. That should also go away.
In the Authoritative Server, we store queries and responses in several ringbuffers. These ringbuffers are templatized and could contain anything we want. As it stands, they contain strings. This means that every query goes through several DNSName::toLogString() conversions.
Under high load, this represents around 5%-10% of what we are doing. Ringbuffers with DNSNames are updated from several places:
To fix, templataize these ringbuffers to they contain pair<DNSName,QType> & adjust API and webserver so they do the conversion if needed.