PecSched:面向 LLM 推理的抢占式高效集群调度
PecSched: Preemptive and Efficient Cluster Scheduling for LLM Inference
AI总结:
针对 LLM 推理输入长度高度异构导致的队头阻塞和长请求饥饿问题,提出 PecSched 抢占式集群调度系统,结合 prefill-decode 协同与快速 SP,显著降低短请求尾延迟并提升吞吐。
摘要:
基于 transformer 的大语言模型(LLM)在规模上的扩展显著增加了其上下文长度,使输入超过 100K token 的应用成为可能。我们对近期一份 Azure LLM 推理轨迹的分析表明,输入长度呈现高度偏斜的长尾分布:约 80% 的输入短于 2K token,长输入仅占很小一部分。现有集群级 LLM 调度策略(包括先进先出(FIFO)、基于预留和基于优先级的方法)主要针对长度低于 2K 的短输入请求,无法应对这种异构性,从而导致队头阻塞、资源利用率不足以及长输入请求饥饿等低效问题。我们提出 PecSched,这是一个用于 LLM 推理的抢占式高效集群调度系统。PecSched 引入以下关键技术:1)抢占式调度,优先处理短输入请求以提升其性能;2)协调式 prefill-decode 共置与分离,减少抢占的持续时间和频率;3)快速序列并行(SP),最大限度缩短长输入请求的 prefill 时间,进一步降低抢占的可能性和频率。基于 Azure LLM 推理轨迹的评估表明,与最先进的集群级 LLM 推理调度器相比,PecSched 将短输入请求的第 99 百分位排队延迟最高降低 92%,并将其吞吐量最高提升 595%,同时不会显著影响长输入请求的作业完成时间(JCT)。我们已开源代码。
英文摘要:
The scaling of transformer-based Large Language Models (LLMs) has significantly expanded their context lengths, enabling applications where inputs exceed 100K tokens. Our analysis of a recent Azure LLM inference trace reveals a highly skewed long-tail distribution of input lengths, with approximately 80% of inputs shorter than 2K tokens. Long inputs constitute only a small fraction. Existing cluster-level LLM scheduling strategies, including First-In-First-Out (FIFO), reservation-based, and priority-based approaches, primarily target short-input requests with lengths below 2K and fail to address this heterogeneity, leading to inefficiencies such as head-of-line blocking, resource underutilization, and starvation of long-input requests. We propose PecSched, a Preemptive and Efficient Cluster SCHEDuling system for LLM inference. PecSched introduces the following key techniques: 1) preemptive scheduling that prioritizes short-input requests for their performance; 2) coordinated prefill-decode colocation and disaggregation, which reduces both the duration and frequency of preemptions; 3) fast Sequence Parallelism (SP) that minimizes the prefill time of long-input requests to further reduce the likelihood and frequency of preemptions. Evaluations based on Azure LLM inference trace show that, compared to state-of-the-art cluster-level LLM inference schedulers, PecSched reduces the 99th percentile queueing delay of short-input requests by up to 92% and improves their throughput by up to 595%, without significantly affecting the Job Completion Time (JCT) of long-input requests. We open-sourced our code.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。