mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-08-27 12:30:13 +03:00
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.
This commit is contained in:
parent
7dc66d4836
commit
3aa39a2da3
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user