TL;DR
Co-locating background CPU tasks on expensive GPU servers is an attractive way to harvest idle resources, but it often severely degrades Large Language Model (LLM) serving performance. This paper reveals that the culprit isn't slower GPU kernels, but rather "tail amplification" in the CPU-side serving loop before work is ever submitted to the GPU. To solve this, the authors introduce CoTail, a measurement-driven framework that diagnoses these upstream bottlenecks and dynamically applies targeted OS-level protections to maintain strict serving quality.
What Problem Does This Paper Address?
Host CPUs on GPU servers frequently sit under-utilized during LLM inference because the heavy lifting is offloaded to accelerators. While running background CPU workloads (like web servers, compilation, or data processing) on these idle cores seems like a win for data center efficiency, it introduces a massive catch: it can cause severe, unpredictable spikes in LLM serving latency—specifically Time-to-First-Token (TTFT) and Time-Per-Output-Token (TPOT).
Traditional profiling approaches typically focus on the CPU-GPU boundary or GPU kernel execution times. Consequently, infrastructure operators have lacked clear guidance on exactly where this interference occurs within the serving stack and how to select the right operating system-level protections without unnecessarily killing background workload performance.
Methods
The authors instrumented the LLM serving loop using NVIDIA Tools Extension (NVTX) to track four core CPU-side stages: request scheduling (scheduler.step), batch construction (batch.construct), execution wrapping (model.execute), and model forward invocation (model.forward).
To formalize their approach, they introduced two new metrics:
- Core Path Tail Index (CPTI): Measures the average positive P95/P99 tail latency amplification across these core serving stages.
- Core Tail Suppression (CTS): Quantifies how effectively an OS-level protection policy mitigates this tail amplification.
Using these metrics, they developed CoTail, a rule-based diagnostic and mitigation procedure. As shown in Figure 1, CoTail operates in two primary phases:
- Stage 1 (Hardware Screening): Uses low-overhead hardware counters to profile the candidate CPU workload's risk level (Low, Medium, or High).
- Stage 2 (Service-Stage Diagnosis & Mitigation): For risky workloads, CoTail runs a short, unprotected profiling pass to calculate CPTI and identify the dominant tail stage. It then maps the bottleneck to a specific OS-level protection policy—such as targeted real-time scheduling (
rt), NUMA isolation (numa), or a combination (rt+numa)—and validates it against a Service Level Objective (SLO).
Datasets
Rather than standard static datasets, the paper evaluates its framework using a matrix of state-of-the-art LLMs, serving engines, and synthetic/real-world CPU workloads:
- LLMs & Engines: DeepSeek-R1-Distill-Qwen-7B, Llama-3.1-8B, and Mistral-7B, running on vLLM and SGLang.
- Primary CPU Workloads (Calibration):
stress-ng,ffmpeg,7zip,redis,openssl,kernel_build,memcached, andnginx. - Held-out CPU Workloads (Validation):
image-preprocess,sqlite-txn,text-search, andzstd-compress.
Key Insights and Ideas
- The GPU is Innocent: Counterintuitively, background CPU workloads do not meaningfully slow down GPU kernel execution. Instead, they starve the CPU threads responsible for orchestrating and batching requests, causing massive upstream synchronization stalls (e.g., OS-runtime
sem_waitdelays). - Standard Metrics Can Deceive: Traditional downstream metrics like Total Kernel Launch and Queuing Time (TKLQT) correlate poorly with end-to-end degradation. Because the stalled CPU loop struggles to pack requests, it actually sends smaller batches to the GPU. This can cause individual GPU kernel execution times to artificially shrink, masking severe end-to-end performance degradation.
- Protections Must Match the Symptom: There is no single best OS protection strategy. CPU-bound and context-switching workloads (like
nginxorredis) respond dramatically well to real-time scheduling (rt). Conversely, cache- and memory-bandwidth-sensitive workloads (likeffmpeg) require topology-aware NUMA isolation (numa).
Key Results
- Unprotected Devastation: Without any protection, co-locating an
nginxworkload with vLLM slashes throughput by 78.8%, spikes TTFT by 429.5%, and increases TPOT by 362.4% (see Figure 2). - Targeted Recovery: CoTail-guided protections successfully mitigated these effects, improving
nginxthroughput by up to 4.4× and reducing TPOT by 4.5×. - Superior SLO Compliance: In held-out validation testing, CoTail satisfied the deployment SLO in 12 out of 12 oracle-feasible cases. In contrast, a blunt
Always-rtpolicy only satisfied 10/12 cases due to its clean protection overhead. CoTail also reduced the performance slowdown imposed on the background "co-tenant" workloads from 56.65% to 51.21%.
Limitations and Future Work
The authors note that CoTail is designed as a same-platform diagnostic procedure rather than a universal cluster scheduler. Its hardware-counter and CPTI thresholds are platform-specific and must be recalibrated if deployed on different CPU topologies, GPU interconnects, or inference engines. Additionally, the framework currently requires NVTX instrumentation within the serving engine source code.
Promising future directions include automating out-of-the-box threshold calibration and extending the micro-diagnostic approach to multi-GPU tensor-parallel or pipeline-parallel serving setups.
Summary updated