[ovs-dev] [PATCH 1/4] logging: Lower loggging level for coverage messages due to slow poll loops
jpettit at nicira.com
Sat Sep 12 10:32:26 UTC 2009
On Sep 11, 2009, at 6:05 PM, Ben Pfaff wrote:
> Justin Pettit <jpettit at nicira.com> writes:
>> Subject: [PATCH 1/4] logging: Lower loggging level for coverage
>> messages due to slow poll loops
>> By default, many OVS processes keep track of their time through a
>> loop. If it takes an unusually long time (measured as some distance
>> from the mean), the processes will log stats its been keeping about
> its => "it's" or "it has"
>> coverage. It was doing this at level WARN.
>> On Xen systems, syslog messages written at level INFO and higher are
>> written to /var/log/messages synchronously.
> Is there really a difference in syslog behavior depending on log
> level? Should this say something more like: "On Xen systems,
> syslog messages are written to /var/log/messages synchronously.
> vswitchd sends messages at level INFO and higher to
Well, it is configurable whether syslog writes synchronously or not (a
hyphen in front of the file name in syslog.conf indicates that it
should not be). I would argue that Xen (and I'm guessing this really
came from RedHat) should not be writing INFO level messages
synchronously...that should be limited to WARN and higher. But,
surprisingly, I wasn't consulted.
I left the message how it was originally written, because I actually
found your suggestion more confusing. It's really not ovs-vswitchd
that determines whether it goes to /var/log/messages, but the
configuration of syslog.
>> This commit lowers the default log level for those coverage
>> messages to
>> INFO. On Xen systems, it raises the default level at which
>> messages are
>> written to syslog to WARN.
> I think that we should add a comment in coverage.c next to the
> vlog call that explains why it's at that level. Otherwise I'd be
> tempted to raise the level at some point.
Okay, I added a warning to the function that prints the coverage
messages in coverage.c that care should be taken in the log level
chosen by the caller. I also added a comment to log_poll_interval,
which calls the coverage function to indicate why the value of INFO
> I'm really tempted to say that we shouldn't log to syslog at all
> on XenServer. ovs-vswitchd could get stuck behind another
> process that is logging a lot of stuff, for example. The
> interface-reconfigure and vif scripts do a lot of logging to
> syslog, for example, and that could delay ovs-vswitchd too.
> Logging to our own file doesn't have the same issue.
I actually think having some synchronously written messages is useful
when things are going terribly wrong. I've set the default value for
logging to syslog to WARN. Hopefully, we're only logging at that
level when something isn't right (and not in a tight loop).
Thanks for the feedback. I've pushed the changes.
More information about the dev