arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.06113cs.DC
收藏

解决大规模LLM服务中的数据并行负载均衡瓶颈:大规模下的实用在线路由

Tackling the Data-Parallel Load Balancing Bottleneck in LLM Serving: Practical Online Routing at Scale

HKUST(香港科技大学);Theory Laboratory, Central Research Institute, 2012 Laboratories, Huawei(华为中央研究院理论实验室)

Tianci Bu, Yuan Lyu, Zixi Chen, Chendong Song, Hong Liang, Tsepten Gurung, Yuwei Fan, Yinyu Ye, Zijie Zhou

AI总结:

本文提出BalanceRoute算法,通过在线路由减少LLM服务中的数据并行负载不均衡,提升端到端服务吞吐量。

摘要:

数据并行(DP)负载均衡已成为大规模LLM服务中的首要瓶颈。当模型通过张量并行(TP)或专家并行(EP)拆分到设备上,并在多个DP工作者中复制时,每次解码步骤都会遇到同步障碍,其延迟由最重负载的工作者决定;即使DP工作者之间存在轻微的持续不均衡,这种不均衡也会逐步累积,成为大量浪费计算的组成部分。问题的难度源于LLM解码的特定原因:分配具有粘性(迁移KV缓存成本高)、每个请求的负载随时间增长、到达请求非平稳,且路由器必须在数百个等待请求和数十个工作节点内子100毫秒的解码预算内做出决策。我们提出了BalanceRoute,一组实用的在线路由算法,旨在解决此瓶颈。第一个,BR-0,不需要预测基础设施,使用分段线性F分数,捕捉了填充安全边缘和溢出到边缘之间的尖锐不对称性;两阶段分解使每一步的成本与毫秒级调度兼容。第二个,BR-H,通过短且常数的前瞻H和轻量终止分类器接口扩展BR-0,将F分数扩展为时间折扣形式。我们部署BalanceRoute在一个144-NPU集群上,并在专有生产跟踪和公开Azure-2024跟踪上评估与vLLM基准线。在两个工作负载中,BalanceRoute显著减少了平均DP不均衡并提高了端到端服务吞吐量。

英文摘要:

Data-parallel (DP) load balancing has emerged as a first-order bottleneck in large-scale LLM serving. When a model is sharded across devices via tensor parallelism (TP) or expert parallelism (EP) and replicated across many DP workers, every decode step ends in a synchronization barrier whose latency is set by the most heavily loaded worker; even modest persistent imbalance across DP workers compounds, step after step, into a substantial fraction of wasted compute. The problem is hard for reasons specific to LLM decoding: assignments are sticky (migrating KV caches has a high cost), per-request loads grow over time, arrivals are non-stationary, and the router must decide within a sub-100\,ms decode budget over hundreds of waiting requests and tens of workers. We present \textbf{BalanceRoute}, a family of practical online routing algorithms that target this bottleneck. The first, \textbf{BR-0}, requires no prediction infrastructure and uses a piecewise-linear F-score that captures the sharp asymmetry between admissions that fill safe margin and those that overflow into the envelope; a two-stage decomposition keeps per-step cost compatible with millisecond-scale scheduling. The second, \textbf{BR-H}, generalizes BR-0 with a short, constant lookahead $H$ and a lightweight termination-classifier interface, extending the F-score to a horizon-discounted form. We deploy BalanceRoute on a 144-NPU cluster and evaluate against vLLM baselines on both a proprietary production trace and the public Azure-2024 trace. Across both workloads, BalanceRoute substantially reduces average DP imbalance and improves end-to-end serving throughput.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑