On 3/29/22 11:40, Dumitru Ceara wrote:
> OVS commit 1cc618c32524 ("ovsdb-idl: Fix atomicity of writes that
> don't change a column's value.") [0] explains why writes that don't
> change a column's value cannot be optimized out early if the column is
> read/write.
> 
> In northd, most tables have change tracking enabled, making all their
> columns read/write.  That means that a write to a column (even if it
> doesn't change the value) will add the row to the current transaction.
> Validation is eventually performed before sending the transaction to the
> server but if there are lots of such records this becomes costly.
> 
> Profiling what happens in northd when running with a NB database taken
> from an ovn-k8s-like scale test (16K load balancers applied to 120
> logical switches and routers) we notice that ovn-northd was always
> writing to the SB.Load_Balancer columns even if nothing changed.
> 
> This commit changes that behavior and only writes to the
> SB.Load_Balancer columns if needed.
> 
> Without this change, in our test server, with ovn-northd running
> against NB database mentioned above, processing loop intervals were
> ~13 seconds.
> 
> With this change applied, loop intervals go down to ~7 seconds.
> 
> [0] https://github.com/openvswitch/ovs/commit/1cc618c32524
> 
> Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=2069623
> Signed-off-by: Dumitru Ceara <[email protected]>
> ---

Please disregard this patch.

A more generic solution is proposed at the IDL layer:

https://patchwork.ozlabs.org/project/openvswitch/list/?series=293071&state=*

Once that is accepted we can instead just change ovn-northd to call:

ovsdb_idl_track_changes_noalert(sb_idl);

Regards,
Dumitru

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

Reply via email to