[bind10-dev] Losing startup logs
JINMEI Tatuya / 神明達哉
jinmei at isc.org
Fri Mar 30 17:09:47 UTC 2012
At Tue, 27 Mar 2012 12:09:55 +0200,
Michal 'vorner' Vaner <michal.vaner at nic.cz> wrote:
> Do you think it would work? Do you think the two features (not losing startup
> messages and the emergency-case output if the buffer is enabled) is worth the
> work?
It seems to make sense to keep initial logs om a (perhaps temporary)
memory storage and dumping them once logging configuration is
completed. I also think not losing startup messages (and not being
too noisy by dumping all of them to the console) is worthwhile.
One concern is the log level for the stored messages. The highest log
level is actually pretty noisy (e.g., it dumps all RRs loaded into
the in-memory data source, although, regarding this particular
example, we should probably reconsider whether it really makes sense),
and they may not fit in a reasonably limited size of buffer. I guess
we'd introduce some reasonable default log level for this, possibly
customizable via a command line option or something.
I'd also note that the dump overhead at the highest log level may
be an issue. On startup it may not matter much, but if, e.g., it
doubles startup time we probably don't want to do that.
This also leads to the usage of emergency-case. Since we cannot
predict when (or even whether) that happens, we'd need to keep logging
(while discarding older ones) in the buffer all the time at the
highest log level. I suspect it's too heavy for busier servers. By
"if the buffer is enabled" do you mean it's off by default? But then
the feature would be less useful because it would be most helpful for
things like unpredictable crash.
Regardless of when to enable it, one possibility of mitigating
overhead would be to just log message IDs, instead of all textual
messages including textual representation of parameter objects. Of
course it will lose a substantial amount of information, but it will
also be much more efficient, and at least give a more detailed hint
(than, e.g, a stack trace) that what program did before the bad thing
happened.
Regarding whether the emergency-case logging is worthwhile, I'm not
yet so sure. I see the potential of its usefulness, but I have many
questions about the feasibility as stated above, too.
---
JINMEI, Tatuya
Internet Systems Consortium, Inc.
More information about the bind10-dev
mailing list