TL;DR
Berth is a user-space system that enables high-utilization GPU sharing between latency-critical inference and best-effort background tasks (like training) without requiring invasive kernel or driver modifications. By cleverly controlling when background work is "fed" to the GPU and leveraging existing hardware time-slicing, it preserves strict Service Level Objectives (SLOs) while delivering up to 3.5x more background throughput than existing non-invasive baselines.
What Problem Does This Paper Address?
Modern GPUs are expensive and often sit idle. Inference services (like those powering LLMs or image recognition) are typically provisioned for peak loads, meaning that for much of the day, a large portion of their compute capacity is wasted.
The obvious solution is to run "best-effort" background work, such as model training, on that same GPU. However, this is notoriously difficult because of latency. A background training kernel might take tens of milliseconds to finish, but an inference request might have an SLO of only 15ms. If the inference request arrives just after a training kernel starts, it will miss its deadline.
Existing solutions are either:
- Invasive: They require rewriting kernels, patching drivers, or instrumenting frameworks—options often unavailable to users of closed-source GPU stacks.
- Inefficient: Hardware partitioning (like NVIDIA's MIG) prevents interference but leaves resources idle if the inference service isn't fully loaded.
- Unreliable: Standard temporal sharing (time-slicing) doesn't respect priorities, leading to significant SLO violations.
Methods
The core insight of Berth is that commodity GPUs already have a preemptive time-slicer; they just lack a way to express priority from the outside. Berth creates this priority through three main user-space mechanisms:
- Feed Control: A preloaded shim intercepts kernel launches. When a latency-critical request is "in-flight," the shim simply stops feeding new kernels from the best-effort job to the GPU.
- Deadline References: For continuous-batching LLM engines, Berth tracks the "slack" in each decoding step. It only feeds background work if it predicts the work will finish before the next token's deadline.
- Shortened Time Slices: Berth uses an unprivileged driver control call to shorten the hardware time slice for the best-effort process (e.g., to 500µs). This ensures that if a background kernel is already running when an inference request arrives, it is preempted by the hardware scheduler almost immediately.
Crucially, Berth requires no privileges and no changes to applications, frameworks, or drivers.
Datasets
The authors evaluated Berth across 31 scenario points using a variety of models and request patterns:
- MLPerf Inference Benchmarks: ResNet-50, RetinaNet, and BERT-large.
- LLM Serving: vLLM engines running Qwen2.5 models (0.5B to 7B parameters).
- Background Work: BERT-large training, ResNet-50 training, and raw matrix multiplication (GEMM) "hogs."
- Traces: Realistic request arrival patterns from the Azure Functions 2021 and Azure LLM inference 2023 traces.
Key Insights and Ideas
- Hardware preemption is enough: You don't need to build a new preemption mechanism. The existing GPU time-slicer can switch contexts in a fraction of a millisecond; it just needs to be told what to run.
- Priority can be "faked" from the outside: By withholding work from the background process whenever a high-priority request is active, the system effectively grants the high-priority request 100% of the GPU's attention.
- LLM decoding steps have harvestable slack: Even though LLM engines are "always busy" during generation, there are millisecond-scale gaps between token generations where background work can safely execute.
- Non-invasive is practical: By operating as a user-space shim, Berth is compatible with proprietary libraries (like cuBLAS or cuDNN) that invasive research systems cannot easily handle.
Key Results
Berth consistently outperformed 13 different baselines (including TGS, XSched, and NVIDIA's MPS/MIG).
- SLO Attainment: Berth met SLOs within a few percentage points of running the inference task alone (95.8% vs 97.9% average).
- Throughput: It achieved 2.7x to 3.5x higher background throughput than the strongest baselines that were also able to meet SLOs.
- LLM Performance: In LLM serving scenarios, Berth met per-token targets for nearly 100% of requests while background training continued to run.
Limitations and Future Work
- Visibility: The shim sees kernel launches but doesn't have direct visibility into the application's internal request queues.
- Resource Contention: While Berth manages compute time, it doesn't explicitly manage contention for memory bandwidth or L2 cache, which can still cause minor slowdowns.
- Trust Model: Berth assumes a cooperative environment. A "hostile" background process could theoretically reset its own time slice to a longer value, though the authors suggest future work could involve a daemon to monitor and enforce these settings.
- Burst Handling: Under extreme saturation or highly bursty loads, the lack of queue visibility can lead to slight SLO degradation.
Summary updated