TL;DR
Modern GPUs are powerful but often underutilized, especially in AI workloads. This paper dives deep into the subtle ways different GPU tasks interfere with each other when sharing resources, proposing a methodology to quantify this interference and paving the way for smarter GPU schedulers and more efficient kernel designs.
What Problem Does This Paper Address?
Graphics Processing Units (GPUs) are essential for accelerating AI training and inference, but despite their power, they are frequently underutilized. This underutilization stems from the fact that different parts of a GPU workload might demand different resources (e.g., compute power vs. memory bandwidth), leaving other parts idle. While "colocation" – running multiple workloads on the same GPU simultaneously – can boost utilization and reduce costs, it's challenging because of "resource interference." Existing GPU schedulers often rely on simplified metrics to manage colocation, leading to unpredictable performance degradation. This paper aims to provide a deeper understanding of these interference mechanisms to enable predictable and efficient GPU sharing.
Methods
The authors employ a two-pronged approach:
- GPU Microbenchmarking: They developed a suite of custom CUDA microbenchmarks designed to stress specific GPU resources (e.g., L2 cache, memory bandwidth, shared memory, warp schedulers, compute pipelines). These benchmarks are used to isolate and quantify a workload's sensitivity to interference on each resource.
- Workload Analysis: They analyze the interference patterns of real-world AI workloads, particularly LLM inference (specifically, the "Time Between Tokens" or TBT metric), when colocated with their microbenchmarks. This involves using NVIDIA's profiling tools like Nsight Compute (NCU) and Nsight Systems to gather detailed performance metrics.
They also analyze existing GPU schedulers (like Usher and Orion) to identify their pitfalls, such as relying on single metrics or ignoring critical ones like Instructions Per Cycle (IPC).
Datasets
The paper does not explicitly list "datasets" in the traditional sense of training data. Instead, they evaluate their methods using:
- Large Language Models (LLMs): Specifically, Gemma3-1B-IT and Llama3.1-8B-Instruct models.
- Custom Microbenchmarks: These are designed to stress specific GPU resources and are used to simulate interference.
They also mention using a modified fork of VLLM (a popular LLM inference framework) to support kernel colocation experiments.
Key Insights and Ideas
- Colocation is Tricky: Simply placing workloads on the same GPU doesn't guarantee efficiency. Interference can occur at multiple granularities, from individual SMs to shared resources like the L2 cache and memory bandwidth.
- Single Metrics are Insufficient: Relying on metrics like "achieved occupancy" alone is misleading. A kernel might have low occupancy but still saturate critical resources, causing significant slowdowns when colocated.
- IPC Matters: A kernel with a very high Instructions Per Cycle (IPC) can hog the warp scheduler, causing significant slowdowns for other colocated kernels, even if they are on separate Streaming Multiprocessors (SMs).
- Fine-Grained Scheduling is Key: To avoid "head-of-line blocking" (where one slow kernel delays others), schedulers need to make decisions at a per-kernel or per-thread-block level, not just at the whole-job level.
- Kernel Design Impacts Colocation: Developers can inadvertently make their kernels difficult to colocate by aggressively using GPU resources. Conversely, designing kernels with colocation in mind could significantly improve overall GPU efficiency.
- Interference is Multi-faceted: Beyond well-known memory bandwidth and cache contention, interference can arise from warp scheduling, compute pipeline saturation, and even shared memory bank conflicts.
Key Results
- Significant Slowdowns: The paper demonstrates cases where colocation, based on simplified assumptions, led to slowdowns of 1.73x (due to SM resource contention) and 2.15x (due to L2 cache pollution). In one instance, a copy kernel's execution time doubled when colocated with a compute kernel that saturated the IPC.
- LLM Sensitivity: LLM decode phases are often memory-bound and less sensitive to L2 cache locality but highly susceptible to memory bandwidth contention, leading to slowdowns of up to 1.3x.
- Shared Memory Bank Conflicts: Increasing shared memory bank conflicts in a copy kernel caused slowdowns of 1.79x and 3.75x for different cuBLAS GEMM implementations.
- Pipeline Saturation: Even before the warp scheduler is saturated, compute pipelines (like FP64 operations) can become bottlenecks, requiring careful scheduling to avoid interference.
- Trade-offs: The authors show that sacrificing some individual kernel performance for better colocation opportunities can significantly benefit overall GPU efficiency and cost. For example, restricting an LLM decode to less than half the GPU's SMs resulted in only a 1.19x TBT slowdown.
Limitations and Future Work
- Hardware Visibility: The authors note that the closed-source nature of NVIDIA GPUs limits deep visibility into hardware mechanisms, making it challenging to fully understand interference.
- Profiling Overhead: While profiling tools like NCU are powerful, they can be time-consuming, which might be a barrier for real-time scheduling decisions.
- Kernel Design: Most high-performance GPU workloads are not designed with colocation in mind, often maximizing individual kernel performance at the expense of potential sharing.
- Future Work:
- Developing a robust "kernel-level interference estimator" to predict performance under colocation.
- Building a "workload-level interference estimator" to guide scheduler decisions.
- Exploring hardware support for more flexible GPU sharing (e.g., better intra-SM visibility, DRAM channel partitioning).
- Encouraging GPU programmers to design "colocation-friendly" kernel variants.
- Investigating interference patterns on GPUs from other vendors (e.g., AMD).
Summary updated