[bind10-dev] comments on the statistics design

JINMEI Tatuya / 神明達哉 jinmei at isc.org
Sun Jul 29 04:20:49 UTC 2012


At Fri, 27 Jul 2012 14:06:09 +0900 (JST),
Naoki Kambe <kambe at jprs.co.jp> wrote:

> > - is each module expected to reset their statistics to 0 (if that's
> >   resettable) every time it responds to a request from the stats?  I
> >   guess so because otherwise the accumulated data at stats won't make
> >   sense, but it's not clear from the document.  What if it's not
> >   "resettable" (such as number of RRs of some zone/cache, etc,
> >   assuming we consider it "statistics" and want to maintain it)?
> 
> To be honest, I think the stats module just keeps a copy of statistics
> data in each module. If the target module say "the new value is 100",
> the stats replaces the old value with the new value.

But how does (e.g.) b10-auth maintain per-zone statistics on millions
of zones (and some/many of which may not be in-memory)?  And how can
it reasonably send the statistics data upon request?

My understanding of our discussion at the f2f meeting is that b10-auth
will keep a limited-size buffered statistics in-memory (but the limit
won't normally be reached unless it has a huge number of zones) and
flushes the in-memory statistics every time it responds to a request
from stats or it spontaneously sends it to stats due to a buffer-full
condition.

> > - I guess we need to revisit the representation of statistic
> >   (counters), especially in terms of the spec.   Things like per
> >   RR-type counter aren't easily represented in this style.
> 
> I think JSON format isn't basically friendly to represent varying
> statistics data. :(

I'm afraid not either, and so I suspect we need to redesign it.

> > - Now that we switch to the "request model", I think it also makes
> >   sense to consider more synchronized update upon user request (via
> >   bindctl or http).
> 
> Do you mean a new command for the stats module to collect statistics
> data is needed? e.g a "collect-immediate" command. That makes sense
> for me if so. But if a administrator sets 'poll-interval' to 1,
> statistics data would be refreshed after a second. But I didn't make
> such a command because of preventing a high load in system.

What I envisioned is a revision of the "show" command; the new version
basically immediately invokes the "send statistics" request from stats
to the module(s).  We probably want to rate-limit this, e.g., at most
1 request per second though.  The stats daemon wait for the
response(s), and sends the result back to cmdctl.

---
JINMEI, Tatuya
Internet Systems Consortium, Inc.


More information about the bind10-dev mailing list