Activity log for bug #1836095

Date Who What changed Old value New value Message
2019-07-10 17:52:29 Rodolfo Alonso bug added bug
2019-07-10 17:52:38 Rodolfo Alonso neutron: assignee Rodolfo Alonso (rodolfo-alonso-hernandez)
2019-07-10 18:58:39 OpenStack Infra neutron: status New In Progress
2019-07-10 18:59:55 Rodolfo Alonso description When "OVSFirewallDriver.process_trusted_ports" is called with many ports, "_initialize_egress_no_port_security" retrieves the VIF ports ("Interface" registers in OVS DB), one per iteration, based in the port_id. Instead of this procedure, if the DB is called only once to retrieve all the VIF ports, the performance increase is noticeable. E.g.: bridge with 1000 ports and interfaces. port_ids = ['id%s' % i for i in range(1, 1000)] ts1 = timeutils.utcnow_ts(microsecond=True) vifs = ovs.get_vifs_by_ids(port_ids) ts2 = timeutils.utcnow_ts(microsecond=True) print("Time lapsed: %s" % str(ts2 - ts1)) ts1 = timeutils.utcnow_ts(microsecond=True) for i in range(1, 1000): id = "id%s" % i vif = ovs.get_vif_port_by_id(id) ts2 = timeutils.utcnow_ts(microsecond=True) print("Time lapsed: %s" % str(ts2 - ts1)) Retrieving 100 ports: - Bulk operation: 0.08 secs - Loop operation: 5.6 secs Retrieving 300 ports: - Bulk operation: 0.08 secs - Loop operation: 16.44 secs Retrieving 300 ports: - Bulk operation: 0.08 secs - Loop operation: 59 secs [1]https://github.com/openstack/neutron/blob/06754907e241af76570f19301093c2abab97e627/neutron/agent/linux/openvswitch_firewall/firewall.py#L667 [2]https://github.com/openstack/neutron/blob/06754907e241af76570f19301093c2abab97e627/neutron/agent/linux/openvswitch_firewall/firewall.py#L747 When "OVSFirewallDriver.process_trusted_ports" is called with many ports, "_initialize_egress_no_port_security" retrieves the VIF ports ("Interface" registers in OVS DB), one per iteration, based in the port_id. Instead of this procedure, if the DB is called only once to retrieve all the VIF ports, the performance increase is noticeable. E.g.: bridge with 1000 ports and interfaces. port_ids = ['id%s' % i for i in range(1, 1000)] ts1 = timeutils.utcnow_ts(microsecond=True) vifs = ovs.get_vifs_by_ids(port_ids) ts2 = timeutils.utcnow_ts(microsecond=True) print("Time lapsed: %s" % str(ts2 - ts1)) ts1 = timeutils.utcnow_ts(microsecond=True) for i in range(1, 1000):     id = "id%s" % i     vif = ovs.get_vif_port_by_id(id) ts2 = timeutils.utcnow_ts(microsecond=True) print("Time lapsed: %s" % str(ts2 - ts1)) Retrieving 100 ports: - Bulk operation: 0.08 secs - Loop operation: 5.6 secs Retrieving 300 ports: - Bulk operation: 0.08 secs - Loop operation: 16.44 secs Retrieving 1000 ports: - Bulk operation: 0.08 secs - Loop operation: 59 secs [1]https://github.com/openstack/neutron/blob/06754907e241af76570f19301093c2abab97e627/neutron/agent/linux/openvswitch_firewall/firewall.py#L667 [2]https://github.com/openstack/neutron/blob/06754907e241af76570f19301093c2abab97e627/neutron/agent/linux/openvswitch_firewall/firewall.py#L747
2019-07-10 19:49:06 Slawek Kaplonski tags loadimpact ovs-fw
2019-07-10 19:49:41 Slawek Kaplonski neutron: importance Undecided High
2019-07-15 18:34:53 OpenStack Infra neutron: status In Progress Fix Released
2019-08-23 15:11:14 Bernard Cafarelli tags loadimpact ovs-fw loadimpact neutron-proactive-backport-potential ovs-fw
2020-01-31 10:36:51 Bernard Cafarelli tags loadimpact neutron-proactive-backport-potential ovs-fw loadimpact ovs-fw
2020-02-03 18:11:46 OpenStack Infra tags loadimpact ovs-fw in-stable-stein loadimpact ovs-fw
2020-02-19 03:08:21 OpenStack Infra tags in-stable-stein loadimpact ovs-fw in-stable-rocky in-stable-stein loadimpact ovs-fw
2020-02-26 17:59:00 OpenStack Infra tags in-stable-rocky in-stable-stein loadimpact ovs-fw in-stable-queens in-stable-rocky in-stable-stein loadimpact ovs-fw