When ovs is running with large topology (e.g. large number of
interfaces), the stats and status update to ovsdb become huge and
normally require multiple run of ovsdb jsonrpc message processing
loop to consume.  Also, this could cause jsonrpc messages backlogged
in ovs.

This commit adds a warning message to warn the excessive backlog
for jsonrpc.

Signed-off-by: Alex Wang <al...@nicira.com>
---
 lib/jsonrpc.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/jsonrpc.c b/lib/jsonrpc.c
index 0841ad8..c0f80bc 100644
--- a/lib/jsonrpc.c
+++ b/lib/jsonrpc.c
@@ -259,6 +259,12 @@ jsonrpc_send(struct jsonrpc *rpc, struct jsonrpc_msg *msg)
     list_push_back(&rpc->output, &buf->list_node);
     rpc->backlog += length;
 
+    if (list_size(&rpc->output) >= 50) {
+        VLOG_WARN("excessive sending backlog, jsonrpc: %s, num of msgs: "
+                  "%"PRIuSIZE", backlog: %"PRIuSIZE".", rpc->name,
+                  list_size(&rpc->output), rpc->backlog);
+    }
+
     if (rpc->backlog == length) {
         jsonrpc_run(rpc);
     }
-- 
1.7.9.5

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to