EPv2: get_rdma_gbs() get half bandwidth in LACP bonding environments
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- python
- Domain
- networking, performance
Research direction
Start in deep_ep/utils/envs.py:246 at get_rdma_gbs() and inspect how ibstat output feeds the bandwidth and SM calculation. Verify the EP_RDMA_GBS override path, including its conversion, and confirm that setting it bypasses ibstat detection and produces the correct bandwidth for LACP environments.
Written by the indexing model from the issue text.
Description
Hi,
We found the get_rdma_gbs() function in #605 deep_ep/utils/envs.py:246 uses ibstat to detect the RDMA NIC bandwidth, which is then used to calculate the number of SMs.
However, in LACP bonding environments, ibstat reports only half of the actual bandwidth, leading to incorrect SM calculation.
To avoid this problem, we can set the environment variable (such as EP_RDMA_GBS ) to manually specify the correct bandwidth, bypassing ibstat detection.
diff --git a/deep_ep/utils/envs.py b/deep_ep/utils/envs.py
index f6e34d9..1710c36 100644
--- a/deep_ep/utils/envs.py
+++ b/deep_ep/utils/envs.py
@@ -255,6 +255,10 @@ def get_rdma_gbs(nic_name: str = _DEFAULT_NIC_NAME) -> float:
"""
# noinspection PyBroadException
try:
+ rate = int(os.getenv('EP_RDMA_GBS', 0))
+ if rate != 0:
+ return rate / 8
+
result = subprocess.run(['ibstat'], capture_output=True, text=True, check=True)
output = result.stdout
Thank you.
- Dominant language
- Cuda
- Stars
- 10.2k
- Forks
- 1.4k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 3
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from deepseek-ai/DeepEP
-
`EP_BUFFER_DEBUG=0` enables Python-side debug output because the env var is tested as a raw string Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
deepseek-ai/DeepEP#718 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
deepseek-ai/DeepEP#675 ·
-
official dockerfile Open
Difficulty 2/5 1-2 days Newbie friendliness 66/100
deepseek-ai/DeepEP#615 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
deepseek-ai/DeepEP#518 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
deepseek-ai/DeepEP#759 ·
All issues in deepseek-ai/DeepEP
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
TheManticoreProject/Manticore#1380 ·
-
P3 sonic-vpp
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
sonic-net/sonic-buildimage#29662 ·
-
support
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100