[ovs-discuss] [OVN] Python IDL: handling modify operations in update2 notifications is slow

Daniel Alvarez Sanchez dalvarez at redhat.com
Tue Feb 27 14:56:40 UTC 2018


Hi all,

When working on the performance of the OVN OpenStack integration and
following up this thread [0].

I went a bit deeper trying to find out the root cause of the linear growth.
It happens that during the processing of the update2 messages, when there's
a 'modify' operation, the data is converted to JSON [1] and then we build a
Row from this JSON [2].

This seems pretty useless and, since the JSON document is not used anywhere
else, I just avoided that conversion. This conversion takes longer as the
number of elements in the row increases, which is the case of adding a new
address to the Address_Set table or adding new ACLs to the acl column in
Logical_Switch. This have a big impact at scale and it can be easily fixed.

After removing the extra conversions (I'll be submitting the patch in a
while), the time for creating ports from OpenStack remains almost constant
regardless of the amount of ports in the system as you can see in the
attached image and further in this blogpost [3] and it's cut down
considerably.

This would make the implementation of the Port_Set discussed at [0] less
urgent.

[0]
https://mail.openvswitch.org/pipermail/ovs-discuss/2018-February/046149.html
[1]
https://github.com/openvswitch/ovs/blob/f73d562fc0ee3ff43f65cc418f213a79a727cb19/python/ovs/db/idl.py#L604
[2]
https://github.com/openvswitch/ovs/blob/f73d562fc0ee3ff43f65cc418f213a79a727cb19/python/ovs/db/idl.py#L524
[3]
http://dani.foroselectronica.es/ovn-profiling-and-optimizing-ports-creation-434/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20180227/7e4b716d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ports_creation_optimizations.png
Type: image/png
Size: 152060 bytes
Desc: not available
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20180227/7e4b716d/attachment-0001.png>


More information about the discuss mailing list