On Wed, Sep 19, 2012 at 02:57:15PM -0700, Ethan Jackson wrote:
> The during a typical run loop, the refresh_instant_stats() function
> creates a transaction, populates it with writes that do nothing,
> and destroys it.  This turns out to be fairly expensive causing
> ovs-vswitchd to show higher than expected cpu usage.  This patch
> remedies the issue by rate limiting refresh_instant_stats() to once
> every 50 milliseconds.
> 
> Signed-off-by: Ethan Jackson <et...@nicira.com>

The code looks OK, although I'd use LLONG_MIN as the initial value for
instant_stats_timer to ensure that even buggy systems (with a negative
time) get their stats updated.

One high-level issue worries me a bit.  I don't think that, before
this patch, OVS necessarily wakes up at all (at least, not more than
once every second or so) if everything is idle.  After this patch,
though, OVS will wake up 20 times per second on an idle system.  Is my
analysis correct and, if so, can we do anything about that?
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to