On 9/23/21 12:03 PM, Mark Gray wrote:
> On 23/09/2021 10:47, Mark Gray wrote:
>> On 16/09/2021 16:37, Dumitru Ceara wrote:
>>> Add a new command, 'ovsdb-server/log-db-ops 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.
>>>
>>> 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.
>>>
>>> V2:
>>> - rebased (fixed conflicts in NEWS).
>> Generally ok and I also did a quick test but I have a few comments on
>> the UI which wouldn't block an ACK and one small comment below in the code:
>>
>> * My personal preference would be that the syntax somewhat followed the
>> vlog/set one that seperates terms by ':'. Also a more memorable name.
>> For example tlog/set DB:TABLE:on or something like that but feel free to
>> choose to completely ignore me :) I just find it can sometimes be
>> difficult to remember syntax so I prefer some consistency.
>>
>> * One limititation is that I don't think we can add a log before a table
>> is created (i.e. to see the first entry). For example, let's say I want
>> to log the very first creation of a bridge using `ovs-vsctl add-br br0`.
>> Is there any way around it? I couldn't think of one.
>>
>> * Could you make the table and database names case-insensitive. For
>> example, I can do `ovs-vsctl list open` even though the table name is
>> actually Open_vSwitch? However, with this I need to specify the actual
>> table name.
>>
>> * There is no way to list the tables that are currently 'on'. Something
>> like vlog/list.
>>
>> * Would it be useful to be able to specify which level to log to?: e.g.
>>
>> tlog/set DB:TABLE:info
>>
>> * Would it be useful to have a non-verbose mode that only states that an
>> insert/delete/update happened?
>>
> 
> Also, do we need to document this somewhere? I am not sure.
> 

I'm not sure where though..  I couldn't find documentation (apart from
occasional mentions in the NEWS file) for the other "ovsdb-server/..."
appctl commands.

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to