This is greatly improved by this patch [0]. Patch got merged in master and I asked for the backport upstream to branch 2.9 (ie OSP13). Link to the upstream discussion at [1]. [0] https://github.com/openvswitch/ovs/commit/eab138764e3aaa9f98a725a4636dd30e2a41a896 [1] https://mail.openvswitch.org/pipermail/ovs-discuss/2018-February/046149.html
If you want to measure the times for creating a port in OVN: diff --git a/networking_ovn/ml2/mech_driver.py b/networking_ovn/ml2/mech_driver.py index 2fb7d35..0ebbc0e 100644 --- a/networking_ovn/ml2/mech_driver.py +++ b/networking_ovn/ml2/mech_driver.py @@ -27,6 +27,7 @@ from neutron_lib.services.qos import constants as qos_consts from oslo_config import cfg from oslo_db import exception as os_db_exc from oslo_log import log +from oslo_utils import timeutils from neutron.common import utils as n_utils from neutron.db import provisioning_blocks @@ -471,7 +472,11 @@ class OVNMechanismDriver(api.MechanismDriver): result in the deletion of the resource. """ port = context.current + _timer = timeutils.StopWatch() + _timer.restart() self._ovn_client.create_port(port) + _timer.stop() + LOG.debug('[*] create_port = %.2f seconds', _timer.elapsed()) self._notify_dhcp_updated(port['id']) And then parse the logs: import sys import re PATTERN = re.compile(r'create_port\ =\ (\d+\.\d+)\ seconds') with open(sys.argv[1]) as logf: for line in logf: match = PATTERN.findall(line) if match: print(match[0])
This bug is marked for inclusion in the errata but does not currently contain draft documentation text. To ensure the timely release of this advisory please provide draft documentation text for this bug as soon as possible. If you do not think this bug requires errata documentation, set the requires_doc_text flag to "-". To add draft documentation text: * Select the documentation type from the "Doc Type" drop down field. * A template will be provided in the "Doc Text" field based on the "Doc Type" value selected. Enter draft text in the "Doc Text" field.
I only backported the patch, so I think the original creator of the feature should add the doctext
fix verified on OSP13 2018-08-08.2 openvswitch-2.9.0-54.el7fdp.x86_64 The average time of creation port 0.425 added to the neutron server code: diff --git a/networking_ovn/ml2/mech_driver.py b/networking_ovn/ml2/mech_driver.py index 2fb7d35..0ebbc0e 100644 --- a/networking_ovn/ml2/mech_driver.py +++ b/networking_ovn/ml2/mech_driver.py @@ -27,6 +27,7 @@ from neutron_lib.services.qos import constants as qos_consts from oslo_config import cfg from oslo_db import exception as os_db_exc from oslo_log import log +from oslo_utils import timeutils from neutron.common import utils as n_utils from neutron.db import provisioning_blocks @@ -471,7 +472,11 @@ class OVNMechanismDriver(api.MechanismDriver): result in the deletion of the resource. """ port = context.current + _timer = timeutils.StopWatch() + _timer.restart() self._ovn_client.create_port(port) + _timer.stop() + LOG.debug('[*] create_port = %.2f seconds', _timer.elapsed()) self._notify_dhcp_updated(port['id']) collected the logs from all controller node and ran the script: import sys import re PATTERN = re.compile(r'create_port\ =\ (\d+\.\d+)\ seconds') with open(sys.argv[1]) as logf: for line in logf: match = PATTERN.findall(line) if match: print(match[0])
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:2573