You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. I have searched related issues but cannot get the expected help.
2. The bug has not been fixed in the latest version.
3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.
5. Please use English, otherwise it will be closed.
Describe the bug
In order to achieve maximum throughput, we had to increase the number of request connections being sent. However, while the sglang server could initially reach the expected concurrency level during the early stages of establishing the connection with the program, it would later drop to single digits.
Reproduction
To better reproduce this scenario, I have abstracted the logic into three code files: server, client, and main. The server simulates the sglang responding to requests, the client simulates a single user making requests to OpenAI, and the main is used to create users in bulk.
I replaced the sglang response with a simple fake response server, which always returns after a 1s delay to simulate the generation latency of sglang.
I preset the concurrency level to 1024 and used the program to track the server's response acceptance under the aforementioned requests. Based on the following statistics, we can see that on the mock server, the concurrency level while completing 100,000 tasks almost reaches the preset value of 1024.
However, when I used the same logic to request the sglang-hosted OpenAI server, I could only achieve a concurrency level of around a dozen requests, which was close to serial processing. This confused me. After ruling out issues in other parts of the system through simple logic checks, I believe the problem might lie with sglang.
Environment
Python: 3.11.8 | packaged by conda-forge | (main, Feb 16 2024, 20:53:32) [GCC 12.3.0]
CUDA available: True
GPU 0,1,2,3,4,5,6,7: NVIDIA GeForce RTX 3090
GPU 0,1,2,3,4,5,6,7 Compute Capability: 8.6
CUDA_HOME: /data/ruanjh/cuda/cuda12.2
NVCC: Cuda compilation tools, release 12.2, V12.2.140
CUDA Driver Version: 550.54.14
PyTorch: 2.4.0+cu121
sglang: 0.3.1
flashinfer: 0.1.6+cu121torch2.3
triton: 3.0.0
transformers: 4.43.3
requests: 2.32.3
tqdm: 4.66.4
numpy: 1.26.4
aiohttp: 3.9.5
fastapi: 0.111.0
hf_transfer: 0.1.6
huggingface_hub: 0.24.3
interegular: 0.3.3
packaging: 23.2
PIL: 10.3.0
psutil: 6.0.0
pydantic: 2.7.4
uvicorn: 0.30.1
uvloop: 0.19.0
zmq: 26.2.0
vllm: 0.6.0
multipart: 0.0.9
openai: 1.44.1
anthropic: Module Not Found
NVIDIA Topology:
GPU0 GPU1 GPU2 GPU3 GPU4 GPU5 GPU6 GPU7 CPU Affinity NUMA Affinity GPU NUMA ID
GPU0 X PIX PXB PXB SYS SYS SYS SYS 0-23,48-71 0 N/A
GPU1 PIX X PXB PXB SYS SYS SYS SYS 0-23,48-71 0 N/A
GPU2 PXB PXB X PXB SYS SYS SYS SYS 0-23,48-71 0 N/A
GPU3 PXB PXB PXB X SYS SYS SYS SYS 0-23,48-71 0 N/A
GPU4 SYS SYS SYS SYS X PIX PXB PXB 24-47,72-95 1 N/A
GPU5 SYS SYS SYS SYS PIX X PXB PXB 24-47,72-95 1 N/A
GPU6 SYS SYS SYS SYS PXB PXB X PXB 24-47,72-95 1 N/A
GPU7 SYS SYS SYS SYS PXB PXB PXB X 24-47,72-95 1 N/A
Legend:
X = Self
SYS = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
PHB = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
PXB = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
PIX = Connection traversing at most a single PCIe bridge
NV# = Connection traversing a bonded set of # NVLinksulimit soft: 100002
The text was updated successfully, but these errors were encountered:
Checklist
Describe the bug
In order to achieve maximum throughput, we had to increase the number of request connections being sent. However, while the sglang server could initially reach the expected concurrency level during the early stages of establishing the connection with the program, it would later drop to single digits.
Reproduction
To better reproduce this scenario, I have abstracted the logic into three code files:
server
,client
, andmain
. Theserver
simulates the sglang responding to requests, theclient
simulates a single user making requests to OpenAI, and themain
is used to create users in bulk.I replaced the sglang response with a simple fake response server, which always returns after a 1s delay to simulate the generation latency of sglang.
server.py
client.py
main.py
I preset the concurrency level to 1024 and used the program to track the server's response acceptance under the aforementioned requests. Based on the following statistics, we can see that on the mock server, the concurrency level while completing 100,000 tasks almost reaches the preset value of 1024.
However, when I used the same logic to request the sglang-hosted OpenAI server, I could only achieve a concurrency level of around a dozen requests, which was close to serial processing. This confused me. After ruling out issues in other parts of the system through simple logic checks, I believe the problem might lie with sglang.
Environment
The text was updated successfully, but these errors were encountered: