BIND 10 #404: serialize RDATA for in memory data source
BIND 10 Development
do-not-reply at isc.org
Thu Nov 4 13:16:13 UTC 2010
#404: serialize RDATA for in memory data source
------------------------------+---------------------------------------------
Reporter: jinmei | Owner: UnAssigned
Type: task | Status: reviewing
Priority: major | Milestone: y2 12 month milestone
Component: data source | Resolution:
Keywords: | Sensitive: 0
Estimatedhours: 0.0 | Hours: 0
Billable: 1 | Totalhours: 0
Internal: 0 |
------------------------------+---------------------------------------------
Comment(by jinmei):
Additional pre-review comment:
I've added a benchmark test to measure rendering performance of basic
Rdata and !RdataFields.
Surprisingly to me, !RdataFields was much slower than Rdata. I first
thought it was due to the inefficient logic for rendering name fields, but
it was also the case for test data that only contained A and AAAA RDATA.
I've pasted some results at the end of this note.
Chasing it a little deeper, I've found that if I omit the "else" part of
!RdataFields::toWire() the !RdataFields version ran much faster (of
course, for data that doesn't contain names).
{{{
} else {
InputBuffer buffer(data_ + offset, fields_[i].len);
renderer.writeName(Name(buffer),
fields_[i].type == COMPRESSIBLE_NAME ?
true : false);
}
}}}
So, compiling this part made it much slower even if it was not used run
time. Maybe this is related to the code size and whether it fits in a
cache.
Anyway, rendering performance is not the primary target of this work, so I
think it's okay for now. We should revisit this issue when we are in
performance improvement phase.
Test results (g++)
{{{
Input File: benchmarkdata/rdatarender_data_com
Benchmark for rendering with standard Rdata
Performed 280000 iterations in 0.099544s (2812826.49ips)
Benchmark for rendering with RdataFields
Performed 280000 iterations in 0.403323s (694232.66ips)
Input File: benchmarkdata/rdatarender_data_org
Benchmark for rendering with standard Rdata
Performed 180000 iterations in 0.073044s (2464268.11ips)
Benchmark for rendering with RdataFields
Performed 180000 iterations in 0.213702s (842294.41ips)
Input File: benchmarkdata/rdatarender_data_nxdomain
Benchmark for rendering with standard Rdata
Performed 60000 iterations in 0.046006s (1304177.72ips)
Benchmark for rendering with RdataFields
Performed 60000 iterations in 0.127334s (471201.72ips)
}}}
Test results (clang++)
{{{
Input File: benchmarkdata/rdatarender_data_com
Benchmark for rendering with standard Rdata
Performed 280000 iterations in 0.090705s (3086930.16ips)
Benchmark for rendering with RdataFields
Performed 280000 iterations in 0.406702s (688464.77ips)
Input File: benchmarkdata/rdatarender_data_org
Benchmark for rendering with standard Rdata
Performed 180000 iterations in 0.063396s (2839295.85ips)
Benchmark for rendering with RdataFields
Performed 180000 iterations in 0.201228s (894507.72ips)
Input File: benchmarkdata/rdatarender_data_nxdomain
Benchmark for rendering with standard Rdata
Performed 60000 iterations in 0.044533s (1347315.47ips)
Benchmark for rendering with RdataFields
Performed 60000 iterations in 0.135239s (443659.00ips)
}}}
--
Ticket URL: <http://bind10.isc.org/ticket/404#comment:2>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list