ovsdb: generate update notifications for monitor_cond session
authorLiran Schour <lirans@il.ibm.com>
Mon, 18 Jul 2016 08:45:52 +0000 (11:45 +0300)
committerBen Pfaff <blp@ovn.org>
Tue, 19 Jul 2016 05:58:36 +0000 (22:58 -0700)
commit71cdf7cd1f6cf4e318083ee7a764b83fbfa66dfd
tree6e29fe0820a0935defd873e492c1141ad8f34ec9
parent6150a75ff8f5a131194e07eab7b94341530a0b67
ovsdb: generate update notifications for monitor_cond session

Hold session's conditions in ovsdb_monitor_session_condition. Pass it
to ovsdb_monitor for generating "update2" notifications.
Add functions that can generate "update2" notification for a
"monitor_cond" session.
JSON cache is enabled only for session's with true condition only.
"monitor_cond" and "monitor_cond_change" are RFC 7047 extensions
described by ovsdb-server(1) manpage.

Performance evaluation:
OVN is the main candidate for conditional monitoring usage. It is clear that
conditional monitoring reduces computation on the ovn-controller (client) side
due to the reduced size of flow tables and update messages. Performance
evaluation shows up to 75% computation reduction.
However, performance evaluation shows also a reduction in computation on the SB
ovsdb-server side proportional to the degree that each logical network is
spread over physical hosts in the DC. Evaluation shows that in a realistic
scenarios there is a computation reduction also in the server side.

Evaluation on simulated environment of 50 hosts and 1000 logical ports shows
the following results (cycles #):

LN spread over # hosts|    master    | patch        | change
-------------------------------------------------------------
            1         | 24597200127  | 24339235374  |  1.0%
            6         | 23788521572  | 19145229352  | 19.5%
           12         | 23886405758  | 17913143176  | 25.0%
           18         | 25812686279  | 23675094540  |  8.2%
           24         | 28414671499  | 24770202308  | 12.8%
           30         | 31487218890  | 28397543436  |  9.8%
           36         | 36116993930  | 34105388739  |  5.5%
           42         | 37898342465  | 38647139083  | -1.9%
           48         | 41637996229  | 41846616306  | -0.5%
           50         | 41679995357  | 43455565977  | -4.2%

Signed-off-by: Liran Schour <lirans@il.ibm.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
ovsdb/jsonrpc-server.c
ovsdb/monitor.c
ovsdb/monitor.h
ovsdb/ovsdb-server.1.in