A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 14, 05:30 UTC
[Bugfix][P/D] Reduce num_threads used by nixl ucx backend (#27196)
Signed-off-by: David Whyte-Gray <40244437+dagrayvid@users.noreply.github.com>
David Whyte-Gray committed
Oct 21, 2025 at 13:41 UTC
ddeec11ba9d39ee72bb3337f810c6197c96b10e1
1 file changed
+11
-1
vllm/distributed/kv_transfer/kv_connector/v1/nixl_connector.py
+11
-1
@@ -607,15 +607,25 @@ class NixlConnectorWorker:
607
# TODO temporary, once nixl allows for telemetry flag in config
608
# (next release), we can remove this env var.
609
os.environ["NIXL_TELEMETRY_ENABLE"] = "1"
610
+
611
# Agent.
612
non_ucx_backends = [b for b in self.nixl_backends if b != "UCX"]
613
+ # Configure NIXL num_threads to avoid UAR exhaustion on Mellanox NICs.
614
+ # Each UCX thread allocates UARs (doorbell pages) via DevX, and
615
+ # excessive NIXL UAR usage can exhaust NIC UAR space. This can cause
616
+ # components like NVSHMEM (used by DeepEP kernels) to fail during RDMA
617
+ # initialization with "mlx5dv_devx_alloc_uar" errors.
618
+ # Ref: https://network.nvidia.com/files/doc-2020/ethernet-adapters-programming-manual.pdf#page=63
619
+ num_threads = vllm_config.kv_transfer_config.get_from_extra_config(
620
+ "num_threads", 4
621
+ )
622
if nixl_agent_config is None:
623
config = None
624
else:
625
config = (
626
nixl_agent_config(backends=self.nixl_backends)
627
if len(non_ucx_backends) > 0
618
- else nixl_agent_config(num_threads=8)
628
+ else nixl_agent_config(num_threads=num_threads)
629
)
630
631
self.nixl_wrapper = NixlWrapper(str(uuid.uuid4()), config)