My commit hook capitalized 'c' in the 'condition'.  I can fix that
before applying.

Best regards, Ilya Maximets.

On 5/26/23 19:18, Ilya Maximets wrote:
> In most cases, after the condition change request, the new condition
> is the same as old one plus minus a few clauses.  Today, ovsdb-server
> will evaluate every database row against all the old clauses and then
> against all the new clauses in order to tell if an update should be
> generated.
> 
> For example, every time a new port is added, ovn-controller adds two
> new clauses to conditions for a Port_Binding table.  And this condition
> may grow significantly in size making addition of every new port
> heavier on the server side.
> 
> The difference between conditions is not larger and, likely,
> significantly smaller than old and new conditions combined.  And if
> the row doesn't match clauses that are different between old and new
> conditions, that row should not be part of the update. It either
> matches both old and new, or it doesn't match either of them.
> 
> If the row matches some clauses in the difference, then we need to
> perform a full match against old and new in order to tell if it
> should be added/removed/modified.  This is necessary because different
> clauses may select same rows.
> 
> Let's generate the condition difference and use it to avoid evaluation
> of all the clauses for rows not affected by the condition change.
> 
> Testing shows 70% reduction in total CPU time in ovn-heater's 120-node
> density-light test with conditional monitoring.  Average CPU usage
> during the test phase went down from frequent 100% spikes to just 6-8%.
> 
> Note: This will not help with new connections, or re-connections,
> or new monitor requests after database conversion.  ovsdb-server will
> still evaluate every database row against every clause in the condition
> in these cases.  So, it's still important to not have too many clauses
> in conditions for large tables.
> 
> Signed-off-by: Ilya Maximets <[email protected]>
> ---
> 
> Version 2;
>   - Minor style fixes: empty line, s/xzalloc/xcalloc/.
> 
>  ovsdb/condition.c | 56 +++++++++++++++++++++++++++++++++++++
>  ovsdb/condition.h |  9 ++++++
>  ovsdb/monitor.c   | 71 ++++++++++++++++++++++++++++++++---------------
>  3 files changed, 114 insertions(+), 22 deletions(-)

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

Reply via email to