[bind10-dev] micro benchmark results on the built-in RRset optimization
JINMEI Tatuya / 神明達哉
jinmei at isc.org
Thu Jan 28 09:25:27 UTC 2010
As I was asked in today's meeting, I've quickly cooked a micro
benchmark test to see how the "pre-formatted RRset" is effective.
The test program simply renders an RRset of BIND10's authors.bind
CH/TXT RRset, containing 11 TXT RRs into a buffer in wire format
(compressing names when possible). The test targets are:
A. the built-in optimized RRset
B. the default RRset available in the DNS message library. construct
a single object, and reuse it throughout the test
C. same as B, but construct/destruct a new object for every rendering
attempt. the TXT rdata is created from string.
D. Like C, but the TXT rdata is created from wire-format data instead
of text.
I've run this test on my laptop (MacOS X 10.6.2, 1.83GHz core 2 duo)
with 100,000 iterations. The results in #iteration/sec are:
A. 291449
B. 13502
C. 6296
D. 8409
As shown clearly the optimization is very effective (or the default
implementation performs very poorly). Another interesting point from
this result is that if we construct the RRset from text data every
time it will make the entire process twice as slow. On the other
hand, C vs D shows that even if we construct the RRset every time,
it's 33% faster if we construct each RDATA from wire-format data.
So, while performance is not in our major goals of year one, using
text data as data source representation may not be a good idea,
depending on whether we can accept the 33% of additional overhead.
---
JINMEI, Tatuya
More information about the bind10-dev
mailing list