From 23b9077df53d2d61a3749ea8631ce4c7fe277b35 Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Fri, 19 Jul 2024 18:25:39 +0000 Subject: [PATCH] Reduce to 1 thread the processing of ``IpConntrackManager`` events The multithread processing does not add any speed improvement to the event processing. The aim of this patch is to reduce to 1 the number of threads processing the ``IpConntrackManager`` events. Closes-Bug: #2073745 Change-Id: I190d842349a86868578d6b6ee2ff53cfcd6fb1cc --- neutron/agent/linux/ip_conntrack.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/neutron/agent/linux/ip_conntrack.py b/neutron/agent/linux/ip_conntrack.py index 34bd5f97c99..04dd42a976f 100644 --- a/neutron/agent/linux/ip_conntrack.py +++ b/neutron/agent/linux/ip_conntrack.py @@ -27,8 +27,6 @@ CONTRACK_MGRS = {} MAX_CONNTRACK_ZONES = 65535 ZONE_START = 4097 -WORKERS = 8 - class IpConntrackUpdate(object): """Encapsulates a conntrack update @@ -74,13 +72,8 @@ class IpConntrackManager(object): self.zone_per_port = zone_per_port # zone per port vs per network self._populate_initial_zone_map() self._queue = eventlet.queue.LightQueue() - self._start_process_queue() - - def _start_process_queue(self): - LOG.debug("Starting ip_conntrack _process_queue_worker() threads") - pool = eventlet.GreenPool(size=WORKERS) - for i in range(WORKERS): - pool.spawn_n(self._process_queue_worker) + LOG.debug('Starting the ip_conntrack _process_queue_worker() thread') + eventlet.spawn_n(self._process_queue_worker) def _process_queue_worker(self): # While it's technically not necessary to have this method, the