2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00
Files
ovs/include/openvswitch
Ilya Maximets f5819e699e json: Store short arrays in-place.
Similarly to strings, 24 bytes that we have in 'struct json' can fit
up to 3 JSON_ARRAY elements.  And we can use separate storage types
to count them.

There are many small arrays in typical databases, for example, every
UUID is a 2-element array.  So, the change does have a noticeable
performance impact.

With 350MB OVN Northbound database with 12M atoms:

                         Before        After       Improvement
 ovsdb-client dump      16.6 sec      14.9 sec       10.2 %
 Compaction             13.4 sec      11.0 sec       17.9 %
 Memory usage (RSS)     2.05 GB       1.90 GB         7.3 %

With 615MB OVN Southbound database with 23M atoms:

                         Before        After       Improvement
 ovsdb-client dump      43.7 sec      40.5 sec        7.3 %
 Compaction             32.5 sec      29.4 sec        9.5 %
 Memory usage (RSS)     4.80 GB       4.46 GB         7.1 %

In the results above, 'ovsdb-client dump' is measuring how log it
takes for the server to prepare and send a reply, 'Memory usage (RSS)'
reflects the RSS of the ovsdb-server after loading the full database.
ovn-heater tests report similar reduction in CPU and memory usage
on heavy operations like compaction.

Acked-by: Mike Pattrick <mkp@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
2025-06-30 16:53:56 +02:00
..
2025-06-30 16:53:56 +02:00
2020-03-25 20:26:51 -07:00
2019-07-05 13:35:07 -07:00