BIND 10 #1839: specialize BasicRRset::toWire() for higher performance
BIND 10 Development
do-not-reply at isc.org
Tue Mar 27 00:48:42 UTC 2012
#1839: specialize BasicRRset::toWire() for higher performance
-------------------------------------+-------------------------------------
Reporter: jinmei | Owner:
Type: task | UnAssigned
Priority: medium | Status: new
Component: libdns++ | Milestone: Next-
Sensitive: 0 | Sprint-Proposed
Sub-Project: DNS | Keywords:
Estimated Difficulty: 0 | Defect Severity: N/A
Total Hours: 0 | Feature Depending on Ticket: auth
| performance
| Add Hours to Ticket: 0
| Internal?: 0
-------------------------------------+-------------------------------------
According to the benchmark report fro Jeremy, there are still some
cases where BIND 10 is slower than BIND 9. I have an idea of a
relatively low-hanging fruit to make it a little bit faster:
specialize the BasicRRset::toWire() so it exploits the knowledge
of its specific implementation: storing Name/Type/Class/TTL in
the form of native object and storing RDATAs in a vector.
So the specialized version can avoid the overhead of calling toName()
etc (note that they are virtual so when used in the abstract class it
cannot be inlined), and avoid the overhead of `RdataIterator` related
overhead.
From a quick experiment it can improve qps of the ./SOA query for 8.4%
(without EDNS) and 13.8% (with EDNS + DO). I believe we can do this
without duplicating much of the code with the generic version.
This optimization may be moot for in-memory because in near future it
will change the internal representation of RRsets even more
customized. But it will still help some other data sources like
SQL-based ones, and the implementation cost should be relatively
cheaper, so I think it's still worth trying.
--
Ticket URL: <http://bind10.isc.org/ticket/1839>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list