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.
Ilya had some preliminary work here: https://github.com/igsilya/ovs/commit/8c09c108f7cf4702622b65580220527126d5cab4
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.