diff -Nru neutron-2014.1.5/debian/changelog neutron-2014.1.5/debian/changelog --- neutron-2014.1.5/debian/changelog 2016-02-29 06:21:59.000000000 -0700 +++ neutron-2014.1.5/debian/changelog 2016-07-05 15:09:50.000000000 -0700 @@ -1,3 +1,11 @@ +neutron (1:2014.1.5-0ubuntu5) trusty; urgency=medium + + * Backport performance fix by refactoring logging statements. (LP: #1414218): + - d/p/refactor-log-in-loop.patch: do not perform debug trace with each + iteration through the loop of ports, instead log it once at the end. + + -- Billy Olsen Tue, 05 Jul 2016 15:07:28 -0700 + neutron (1:2014.1.5-0ubuntu4) trusty; urgency=medium * neutron-openvswitch-agent stuck on 'q-agent-notifier-port-update_fanout-x' diff -Nru neutron-2014.1.5/debian/patches/refactor-log-in-loop.patch neutron-2014.1.5/debian/patches/refactor-log-in-loop.patch --- neutron-2014.1.5/debian/patches/refactor-log-in-loop.patch 1969-12-31 17:00:00.000000000 -0700 +++ neutron-2014.1.5/debian/patches/refactor-log-in-loop.patch 2016-07-05 15:07:24.000000000 -0700 @@ -0,0 +1,50 @@ +From 9919e559a006057984e8f091e8810ce8e2ccbea5 Mon Sep 17 00:00:00 2001 +From: Billy Olsen +Date: Fri, 23 Jan 2015 15:50:40 -0700 +Bug: https://bugs.launchpad.net/neutron/+bug/1414218 +Forwarded: https://review.openstack.org/#/c/149784 +Subject: [PATCH 1/1] Refactor logging in loop to only log debug messages once + +Logging entries in a loop to a file can be expensive for a large +number of objects (e.g. ports) in a loop. Rather than perform the +overhead of logging a debug entry for each line within the hosts +file, move the debug trace of the contents to after the loop to +bulk up the I/O operations. + +Conflicts: + neutron/agent/linux/dhcp.py + +(cherry-picked from d93e0098ebd5f333d6f496f10a663cd4351410ae) +Change-Id: I3ad7864eeb2f959549ed356a1e34fa18804395cc +Closes-Bug: #1414218 + +(cherry picked from commit 70786c65773ca4e4bc8875842e733a0bcabd4ed4) +--- + neutron/agent/linux/dhcp.py | 7 ++----- + 1 file changed, 2 insertions(+), 5 deletions(-) + +Index: new/neutron/agent/linux/dhcp.py +=================================================================== +--- orig/neutron/agent/linux/dhcp.py 2016-07-05 15:01:16.951158909 -0700 ++++ new/neutron/agent/linux/dhcp.py 2016-07-05 15:01:16.947158851 -0700 +@@ -507,10 +507,6 @@ + + ip_address = self._format_address_for_dnsmasq(alloc.ip_address) + +- LOG.debug(_('Adding %(mac)s : %(name)s : %(ip)s'), +- {"mac": port.mac_address, "name": name, +- "ip": ip_address}) +- + if getattr(port, 'extra_dhcp_opts', False): + if self.version >= self.MINIMUM_VERSION: + set_tag = 'set:' +@@ -523,7 +519,8 @@ + (port.mac_address, name, ip_address)) + + utils.replace_file(filename, buf.getvalue()) +- LOG.debug(_('Done building host file %s'), filename) ++ LOG.debug('Done building host file %s with contents:\n%s', filename, ++ buf.getvalue()) + return filename + + def _read_hosts_file_leases(self, filename): diff -Nru neutron-2014.1.5/debian/patches/series neutron-2014.1.5/debian/patches/series --- neutron-2014.1.5/debian/patches/series 2016-02-26 13:17:33.000000000 -0700 +++ neutron-2014.1.5/debian/patches/series 2016-07-05 15:01:12.000000000 -0700 @@ -6,3 +6,4 @@ fix-reconnect-race-condition-with-rabbitmq-cluster.patch ovs-restart.patch fix-neutron-agent-fanout-queue-not-found-loop.patch +refactor-log-in-loop.patch