On 6/24/22 11:55, Dumitru Ceara wrote: > Add a new command, 'ovsdb-server/tlog-set DB:TABLE on|off', which > allows the user to enable/disable transaction logging for specific > databases and tables. > > By default, logging is disabled. Once enabled, logs are generated > with level INFO and are also rate limited. > > If used with care, this command can be useful in analyzing production > deployment performance issues, allowing the user to pin point > bottlenecks without the need to enable wider debug logs, e.g., jsonrpc. > > A command to inspect the logging state is also added: > 'ovsdb-server/tlog-list'. > > Signed-off-by: Dumitru Ceara <[email protected]> > --- > A sample use case is an ovn-kubernetes scaled deployment in which > we're interesting in reducing time to bring up PODs (represented by > OVN logical switch ports). In order to determine exactly where the > bottleneck is when provisioning PODs (CMS/ovn-nbctl/client > IDLs/ovsdb-server/ovn-controller/etc) we need timestamps of when > operations happen at various places in the stack. > > Without this patch the only option for tracking when transactions > happen in the Northbound database is to enable jsonrpc debug logs in > ovsdb-server. This generates a rather large amount of data. > > Instead, now, users would be able to just enable logging for the > Logical_Switch_Port table getting more relevant and precise > information. > > V4: > - Fixed usage string of ovsdb-server/tlog-list (it was hiding the > command). > - addressed Ilya's comments: > - case insensitive on/off check > - ds_put_cstr()/_char() where applicable > - renamed some of the functions > - simplified log rate limit check > V3: > - rebased > - addressed Mark Gray's comments > V2: > - rebased (fixed conflicts in NEWS). > --- > NEWS | 3 ++ > ovsdb/ovsdb-server.1.in | 7 ++++ > ovsdb/ovsdb-server.c | 87 +++++++++++++++++++++++++++++++++++++++++ > ovsdb/row.c | 17 ++++++++ > ovsdb/row.h | 1 + > ovsdb/table.c | 13 ++++++ > ovsdb/table.h | 4 ++ > ovsdb/transaction.c | 43 ++++++++++++++++++++ > 8 files changed, 175 insertions(+) >
Applied. Thanks! Best regards, Ilya Maximets. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
