Introduction
Despite the massive demand for GPUs in modern datacenters, hardware resources remain significantly underutilized. Analysis of production services at Meta reveals that GPUs often hover around 27% utilization, a phenomenon termed the "utilization crisis." This inefficiency stems from the fact that individual machine learning (ML) models often fail to saturate the massive parallel resources of modern hardware, such as the NVIDIA H100.
LithOS is a novel "GPU Operating System" designed to bring fine-grained, transparent resource management to ML workloads. By breaking monolithic GPU kernels into smaller "atoms" and scheduling them at the level of individual hardware clusters, LithOS slashes tail latencies by up to 13x and improves energy efficiency by 26%—all without requiring code changes from the user.
The Limitations of Current Sharing
Existing GPU sharing solutions generally fall into two flawed categories:
- Coarse-grained partitioning (e.g., NVIDIA MIG): These provide strong isolation but are inflexible, leaving resources idle if a task does not require its full allocated slice.
- Fine-grained multiplexing (e.g., NVIDIA MPS): While these improve throughput, they suffer from "Head-of-Line" (HoL) blocking. In this scenario, a long-running background task (like training) prevents a latency-sensitive task (like inference) from starting, leading to massive spikes in response time.
Furthermore, most research-based alternatives require invasive modifications to ML frameworks like PyTorch or JAX, making them impractical for large-scale deployment.
System Architecture
LithOS introduces an operating system approach by interposing at the GPU driver level. Its architecture is built on four main pillars:
- TPC Scheduler: Instead of scheduling for the entire GPU, LithOS manages Thread Processing Clusters (TPCs). It employs "TPC Stealing" to dynamically reassign idle clusters to active workloads.
- Kernel Atomizer: LithOS transparently wraps standard GPU kernels in a "Prelude" kernel that executes only a specific subset of thread blocks (an "atom"). This allows the system to effectively "preempt" long kernels by choosing not to schedule the next atom, preventing HoL blocking.
- Hardware Right-sizing: Using a lightweight model based on Amdahl’s Law, LithOS determines the minimum number of TPCs a kernel needs to maintain performance, freeing the remainder for other tasks.
- Transparent Power Management: By identifying memory-bound kernels that do not benefit from high clock speeds, LithOS applies fine-grained Dynamic Voltage and Frequency Scaling (DVFS) to save power without impacting performance.
Evaluation and Key Results
The authors evaluated LithOS using production-representative workloads, including a week-long Meta Ads inference trace and LLM traces from Microsoft Azure. The system was tested on NVIDIA A100 GPUs across a diverse suite of models (RetinaNet, Llama 3, DLRM, etc.).
- Latency Reduction: For inference workloads, LithOS reduced tail latencies ($P_{99}$) by 13x compared to NVIDIA MPS and by 3x compared to state-of-the-art (SotA) research solutions.
- Throughput Gains: In hybrid scenarios mixing inference and training, LithOS improved aggregate throughput by 1.35x over SotA while maintaining low inference latencies.
- Efficiency: The hardware right-sizing mechanism saved 26% of GPU capacity on average with only a 4% performance hit. Transparent power management delivered an average of 26% total energy savings.
Conclusion and Future Work
LithOS demonstrates that transparency and fine-grained control are essential for modern GPU management. By treating the GPU as a managed, schedulable resource rather than a run-to-completion device, it achieves significant gains in responsiveness and efficiency. Future work will focus on overcoming hardware switching latencies for DVFS and reducing the minor overhead (roughly 10%) introduced by the atomization logic.
Summary updated