mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-10-24 20:02:35 +03:00
Increase BATCH_MAX_WORKERS and Pool concurrency from 20 to 100
This commit is contained in:
parent
286b2407cd
commit
74192f454f
@ -31,7 +31,7 @@ from gns3server.services import auth_service
|
|||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
BATCH_MAX_WORKERS = 10
|
BATCH_MAX_WORKERS = 100
|
||||||
|
|
||||||
|
|
||||||
# ── Helper ─────────────────────────────────────────────────────────────────
|
# ── Helper ─────────────────────────────────────────────────────────────────
|
||||||
|
|||||||
@ -31,7 +31,7 @@ from gns3server.services import auth_service
|
|||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
BATCH_MAX_WORKERS = 10
|
BATCH_MAX_WORKERS = 100
|
||||||
|
|
||||||
# ── Constants ──────────────────────────────────────────────────────────────
|
# ── Constants ──────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
|||||||
@ -1296,7 +1296,7 @@ class Project:
|
|||||||
|
|
||||||
# Create nodes in parallel with limited concurrency
|
# Create nodes in parallel with limited concurrency
|
||||||
# to avoid overwhelming the system with too many simultaneous operations
|
# to avoid overwhelming the system with too many simultaneous operations
|
||||||
pool = Pool(concurrency=20)
|
pool = Pool(concurrency=100)
|
||||||
for compute, name, node_id, node_data in nodes_to_create:
|
for compute, name, node_id, node_data in nodes_to_create:
|
||||||
pool.append(self.add_node, compute, name, node_id, dump=False, **node_data)
|
pool.append(self.add_node, compute, name, node_id, dump=False, **node_data)
|
||||||
await pool.join()
|
await pool.join()
|
||||||
@ -1314,7 +1314,7 @@ class Project:
|
|||||||
if count > 0:
|
if count > 0:
|
||||||
await self.preallocate_udp_ports_for_compute(compute, count)
|
await self.preallocate_udp_ports_for_compute(compute, count)
|
||||||
# Create links in parallel for improved performance
|
# Create links in parallel for improved performance
|
||||||
pool = Pool(concurrency=20)
|
pool = Pool(concurrency=100)
|
||||||
for link_data in topology.get("links", []):
|
for link_data in topology.get("links", []):
|
||||||
if "link_id" not in link_data.keys():
|
if "link_id" not in link_data.keys():
|
||||||
continue
|
continue
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user