[bind10-dev] auth statistics

Yoshitaka Aharen aharen at jprs.co.jp
Fri Sep 7 10:52:25 UTC 2012


Hello,

I've summarized my opinion for the points of discussion. Your comments
and suggestions are welcome by Sept. 19th.

* representation of counters
Statistics counters in auth are split into these 4 parts:
  - Generic counters
      protocols carrying the query, header flags, TSIG, ...
  - Opcode counters
  - RRType counters
  - Rcode counters

For RRType and Rcode counters, I think it's not a good idea to implement
them as a sort of array which is 64K size. Besides most of them are
never used, all of them must be initialized with 0 at initialization. It
causes page allocation. At the point of implementing per-zone statistics
counter, it will be a problem. I'd like to limit the types (as in
trac2157). As DSC displays only very limited set of the types, I think
most of operators are especially interested in well-known types.


* updating counters
The implementation in trac2157 is divided into two parts; collecting
attributes inside query processing and updating counters at the end of
query processing. The approach has 9% of overhead and may be less
efficient than updating counters directly inside query processing.
However, thinking about per-zone counter, it is hard to implement in the
approach. For per-zone counter, it is required to lookup a zone which
the qname belongs to. It is impossible to update some per-zone query
attribute counters as the lookup is done in the middle of query
processing.
I'd like to keep the approach and do some optimization. I think making
some functions inline reduces overhead. I'll update the code and will
take a benchmark.


* exchanging counters with external modules
To send statistics counters to Stats module we need id-to-name
conversion of code types for building item name. There is a small set of
tables of RRType, Opcode, and Rcode in lib/dns/. However, some types
defined in wiki:StatisticsItems are not in the table. I think it is
quite a big task with some design consideration to define the items in
the table with id-to-name and name-to-id functionality. I'd like to
define tables of the types which contains all of the codes in the wiki
page for statistics for a workaround.


Thanks,

-- 
Yoshitaka Aharen <aharen at jprs.co.jp>
Japan Registry Services Co., Ltd.




More information about the bind10-dev mailing list