From 3aa39a2da34af322c98b096aa670eb49d37071eb Mon Sep 17 00:00:00 2001 From: YueGuobin Date: Tue, 11 Aug 2026 00:33:49 +0800 Subject: [PATCH] perf: raise start/stop/suspend/reset-console concurrency from 3 The historic concurrency=3 was far too conservative for 1000+ node topologies. Raise them based on operation weight: stop_all: 3 -> 100 (docker kill + permissions cleanup, light) suspend_all: 3 -> 50 (docker pause/unpause, light) start_all: 3 -> 20 (ubridge startup + docker start + network, heavy) reset_console: 3 -> 20 (terminal reset, light) Node creation (open) already uses concurrency=100 and approaches the container-create daemon limit (~20/s); stop/kill is substantially faster than create, so 100 is safe. --- gns3server/controller/project.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gns3server/controller/project.py b/gns3server/controller/project.py index 4e1f0d9f3..176b721e5 100644 --- a/gns3server/controller/project.py +++ b/gns3server/controller/project.py @@ -2072,7 +2072,7 @@ class Project: """ Start all nodes (except always-running types like Ethernet switch, Cloud, NAT, etc.) """ - pool = Pool(concurrency=3) + pool = Pool(concurrency=20) for node in self.nodes.values(): if not node.is_always_running(): pool.append(node.start) @@ -2083,7 +2083,7 @@ class Project: """ Stop all nodes (except always-running types like Ethernet switch, Cloud, NAT, etc.) """ - pool = Pool(concurrency=3) + pool = Pool(concurrency=100) for node in self.nodes.values(): if not node.is_always_running(): pool.append(node.stop) @@ -2094,7 +2094,7 @@ class Project: """ Suspend all nodes """ - pool = Pool(concurrency=3) + pool = Pool(concurrency=50) for node in self.nodes.values(): pool.append(node.suspend) await pool.join() @@ -2105,7 +2105,7 @@ class Project: Reset console for all nodes """ - pool = Pool(concurrency=3) + pool = Pool(concurrency=20) for node in self.nodes.values(): pool.append(node.reset_console) await pool.join()