The FDP team is no longer accepting new bugs in Bugzilla. Please report your issues under FDP project in Jira. Thanks.
Bug 1806468 - [OVN SCALE][ovsdb-server] Explore possible optimizations for ovsdb_datum_equals()
Summary: [OVN SCALE][ovsdb-server] Explore possible optimizations for ovsdb_datum_equa...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux Fast Datapath
Classification: Red Hat
Component: ovsdb
Version: RHEL 8.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Ilya Maximets
QA Contact: Jianlin Shi
URL:
Whiteboard:
Depends On: 1806460
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-24 09:44 UTC by Ilya Maximets
Modified: 2022-12-09 14:08 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-12-09 14:07:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FD-475 0 None None None 2022-12-09 14:08:17 UTC

Description Ilya Maximets 2020-02-24 09:44:55 UTC
SB DB is a hot point in a OVN cluster, especially if conditional monitoring is enabled.  ovsdb_datum/atom_equals() functions are heavily used in this process and eats ~30% of the whole processing time.  We might check possible optimizations of these functions in order to speed up processing.
Ideas:
- implementing specific function that tests for equality instead of 'strcmp'-like 'lexicographical' comparison that does a lot of unnecessary work.
- ovsdb-server performs a lot of string comparisons. It might make sense to store string hashes and compare hashes first while checking for equality before calling strcmp.

Comment 1 Dan Williams 2021-05-25 20:19:26 UTC
Ilya had some preliminary work here: https://github.com/igsilya/ovs/commit/8c09c108f7cf4702622b65580220527126d5cab4

Comment 2 Ilya Maximets 2022-12-09 14:07:04 UTC
I think we can close this one now after the following commits:

 * dec429168 2021-11-22 | ovsdb-data: Consolidate ovsdb atom and json strings.
 * 485ac63d1 2022-07-01 | ovsdb: Add lazy-copy support for ovsdb_datum objects.

Both changes - especially the last one - make comparison of
datum objects trivial in most cases, just because most of
the time ovsdb-server compares for equality, it compares copies
of the same object.  And this operation degrades to just a
pointer comparison.


Note You need to log in before you can comment on or make changes to this bug.