让大模型服务同时高效处理实时请求和批量任务,提升资源利用率。
Echo: Efficient Co-Scheduling of Hybrid Online-Offline Tasks for Large Language Model Serving
- 通过协同调度与缓存管理,动态分配在线与离线任务资源。
- 离线任务吞吐量最高提升3.3倍,且不影响在线任务延迟达标。
- 适合需要高资源利用率的大模型部署场景,如云服务或企业AI平台。
大型语言模型广泛应用于交互式在线任务和批处理离线任务。由于在线任务具有突发性和低延迟敏感性,通常过度配置资源。在在线负载较低时,可插入延迟不敏感的离线任务以提高资源利用率。然而,依赖抢占机制的调度方式未能充分挖掘离线任务的灵活性,且存在KV缓存重计算和工作负载不规则的问题。本文提出Echo系统,包含调度器、KV缓存管理器和估计工具包。调度器与缓存管理器协同优化离线任务吞吐量,估计工具包预测执行时间、未来内存占用和离线任务吞吐量,确保在线任务服务等级协议(SLO)。调度器利用上一轮批处理信息缩小搜索空间,缓存管理器根据任务类型和前缀共享机会设定缓存优先级以减少重计算。基于真实工作负载的评估表明,Echo可使离线任务吞吐量最高提升3.3倍,同时满足在线任务SLO要求。
原文摘要 · Abstract (English)
Large language models have been widely deployed in various applications, encompassing both interactive online tasks and batched offline tasks. Given the burstiness and latency sensitivity of online tasks, over-provisioning resources is common practice. This allows for the integration of latency-insensitive offline tasks during periods of low online load, enhancing resource utilization. However, strategically serving online and offline tasks through a preemption mechanism fails to fully leverage the flexibility of offline tasks and suffers from KV cache recomputation and irregular workloads. In this paper, we introduce Echo, a collaborative online-offline task serving system, including a scheduler, a KV cache manager, and estimation toolkits. The scheduler and KV cache manager work tightly to maximize the throughput of offline tasks, while the estimator further predicts execution time to ensure online task SLOs. The scheduler leverages the batch information of last iteration to reduce the search space for finding the optimal schedule. The KV cache manager sets the priority of the KV cache based on the type of tasks and the opportunity of prefix sharing to reduce the recomputation. Finally, the estimation toolkits predict the execution time, future memory consumption, and the throughput of offline tasks to guide the scheduler, KV cache manager, and the system deployer. Evaluation based on real-world workloads demonstrates that Echo can increase offline task throughput by up to $3.3\times$, while satisfying online task SLOs.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。