[ovs-dev] [ovsdb 0/7] combine ovsdb updates when connections become backed up

Ben Pfaff blp at nicira.com
Wed Apr 2 21:27:44 UTC 2014


Connections that queue up too much data, because they are monitoring a
table that is changing quickly and failing to keep up with the updates,
cause problems with buffer management.  Since commit 60533a405b2e
(jsonrpc-server: Disconnect connections that queue too much data.),
ovsdb-server has dealt with them by disconnecting the connection and
letting them start up again with a fresh copy of the database.  However,
this is not ideal because of situations where disconnection happens
repeatedly.  For example:

     - A manager toggles a column back and forth between two or more values
       quickly (in which case the data transmitted over the monitoring
       connections always increases quickly, without bound).

     - A manager repeatedly extends the contents of some column in some row
       (in which case the data transmitted over the monitoring connection
       grows with O(n**2) in the length of the string).

A better way to deal with this problem is to combine updates when they are
sent to the monitoring connection, if that connection is not keeping up.
In both the above cases, this reduces the data that must be sent to a
manageable amount.  This series implements this new way.

Ben Pfaff (7):
  ovsdb-server: Send update for _version for changes due to weak ref
    removal.
  Revert "jsonrpc-server: Add test for disconnecting connections with
    too long queues."
  Revert "jsonrpc-server: Disconnect connections that queue too much
    data."
  Revert "ovsdb-data: New functions for predicting serialized length of
    data."
  Revert "json: New function json_serialized_length()."
  jsonrpc-server: Track monitor updates separately from sending them.
  jsonrpc-server: Combine notifications when connection becomes
    backlogged.

 lib/json.c             |  115 +----------
 lib/json.h             |    4 +-
 lib/ovsdb-data.c       |   93 +--------
 lib/ovsdb-data.h       |    6 +-
 ovsdb/jsonrpc-server.c |  497 ++++++++++++++++++++++++++++++------------------
 ovsdb/transaction.c    |    1 +
 tests/ovsdb-monitor.at |    2 +-
 tests/ovsdb-server.at  |   99 ++++++----
 tests/test-json.c      |    3 +-
 tests/test-ovsdb.c     |   14 +-
 10 files changed, 388 insertions(+), 446 deletions(-)

-- 
1.7.10.4




More information about the dev mailing list