]> git.proxmox.com Git - ovs.git/commit
bridge: Rate-limit updates to "instant stats".
authorBen Pfaff <blp@nicira.com>
Tue, 19 Mar 2013 21:02:48 +0000 (14:02 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 19 Mar 2013 23:29:12 +0000 (16:29 -0700)
commitb40dcae74fb2c1e58d48a38b5da178a78f9bf8a6
tree2d8784f987074f1129f4641ae64822c24ad75ef1
parent52a23d929a8ac1381455df323aba3fd014276960
bridge: Rate-limit updates to "instant stats".

Some information in the database must be kept as up-to-date as
possible to allow controllers to respond rapidly to network outages.
We call these statistics "instant" stats.

Until now, the instant stats have been updated on every trip through
the main loop.  This work scales with the number of interfaces that
ovs-vswitchd manages.  With CFM enabled on 5000 interfaces, even with
a low transmission rate, we see ovs-vswitchd using 100% CPU just to
maintain statistics, even with no actual changes.

This commit rate-limits updates to instant stats to at most 10 times
per second.  Earlier tests I did with similar patches showed a major
reduction in CPU usage.  I have not rerun those tests with this patch,
but I expect that the CPU usage should similarly decline.

CC: Ram Jothikumar <rjothikumar@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
vswitchd/bridge.c