arXiv:2504.15465cs.OScs.LG2025-04被引 33

LithOS让GPU在机器学习中更省电、更高效,还能自动调资源。

LithOS: An Operating System for Efficient Machine Learning on GPUs

  • 用细粒度的TPC调度和原子化内核,实现动态资源分配。
  • 推理堆叠下尾延迟降低13倍,吞吐量提升1.6倍。
  • 适合数据中心优化GPU利用率,研究者可参考其系统设计。

数据科学对GPU的需求激增,高效利用成为关键挑战。为在满足多样模型需求的同时优化资源使用,需采用操作系统级方案。本文提出LithOS,首个面向GPU的操作系统原型,包含四项创新机制:(i) 新型TPC调度器,支持以单个TPC为粒度的空间调度,实现工作负载间高效的TPC抢占;(ii) 透明的内核原子化,减少队头阻塞,支持执行中动态资源重分配;(iii) 轻量级硬件资源按需调节机制,确定每个原子所需最小TPC资源;(iv) 透明电源管理机制,根据运行中任务行为降低功耗。我们在Rust中实现LithOS,评估覆盖广泛机器学习场景,对比NVIDIA及前沿研究方案。在推理堆叠场景中,相比MPS尾延迟降低13倍;相较最优现有方案,尾延迟降低3倍,聚合吞吐提升1.6倍。在混合推理-训练堆叠中,相比MPS尾延迟降低4.7倍;相较最优方案,尾延迟降低1.18倍,吞吐提升1.35倍。仅牺牲不到4%性能时,资源按需调节平均节省25%的GPU容量;性能下降7%时,电源管理实现约25%的能耗节省。整体上,LithOS显著提升GPU效率,为未来GPU操作系统研究奠定基础。

原文摘要 · Abstract (English)

The surging demand for GPUs in datacenters for machine learning (ML) has made efficient GPU utilization crucial. However, meeting the diverse needs of ML models while optimizing resource usage is challenging. To enable transparent, fine-grained GPU management that maximizes utilization and energy efficiency while maintaining strong isolation, an operating system (OS) approach is needed. This paper introduces LithOS, a first step toward a GPU OS. LithOS includes the following new abstractions and mechanisms for efficient GPU resource management: (i) a novel TPC Scheduler that supports spatial scheduling at the granularity of individual TPCs, unlocking efficient TPC stealing between workloads; (ii) transparent kernel atomization to reduce head-of-line blocking and enable dynamic resource reallocation mid-execution; (iii) a lightweight hardware right-sizing mechanism that determines the minimal TPC resources needed per atom; and (iv) a transparent power management mechanism that reduces power consumption based on in-flight work behavior. We implement LithOS in Rust and evaluate its performance across extensive ML environments, comparing it to state-of-the-art solutions from NVIDIA and prior research. For inference stacking, LithOS reduces tail latencies by 13x compared to MPS; compared to the best SotA, it reduces tail latencies by 3x while improving aggregate throughput by 1.6x. In hybrid inference-training stacking, LithOS reduces tail latencies by 4.7x compared to MPS; compared to the best SotA, it reduces tail latencies 1.18x while improving aggregate throughput by 1.35x. Finally, for a modest performance hit under 4%, LithOS's right-sizing provides a quarter of GPU capacity savings on average, while for a 7% hit, its power management yields a quarter of a GPU's energy savings. Overall, LithOS increases GPU efficiency, establishing a foundation for future OS research on GPUs.

GPU调度机器学习系统优化能效管理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。