多GPU大语言模型推理中CPU引起的性能下降特征分析
Characterizing CPU-Induced Slowdowns in Multi-GPU LLM Inference
AI总结:
通过分析多GPU大语言模型推理负载,发现CPU资源不足导致GPU利用率低下,增加CPU核心数可显著提升性能并降低首令牌延迟。
摘要:
大规模机器学习工作负载越来越依赖多GPU系统,但其性能常常受到一个被忽视的组件——CPU的限制。通过对现代大语言模型(LLM)推理和服务工作负载的详细研究,我们发现多GPU性能经常下降不是因为GPU饱和,而是因为CPU未能让GPU保持忙碌。在有限的CPU分配下,系统表现出诸如内核启动延迟、通信停滞和分词延迟增加等症状,导致即使有充足的GPU资源,GPU利用率也严重不足。即使在采用进程级分离和现代GPU端优化(如CUDA Graphs)的服务栈中,这些瓶颈仍然存在。由于额外CPU核心的边际成本相对于GPU实例定价较小,我们的评估表明,增加CPU核心数量可以以最小的额外成本显著提高性能和稳定性。在中等服务负载下,我们观察到CPU匮乏的配置经常超时,而提供足够的CPU资源可以恢复响应能力,并将首令牌延迟(TTFT)降低1.47-5.15倍(跨配置),且无需额外GPU。
英文摘要:
Large-scale machine learning workloads increasingly rely on multi-GPU systems, yet their performance is often limited by an overlooked component: the CPU. Through a detailed study of modern large language model (LLM) serving workloads, we find that multi-GPU performance often degrades not because GPUs are saturated, but because CPUs fail to keep them busy. Under limited CPU allocations, systems exhibit symptoms such as delayed kernel launch, stalled communication, and increased tokenization latency, leading to severe GPU underutilization even when ample GPU resources are available. The problem becomes more severe in agentic LLM serving, where long accumulated contexts increase CPU-side tokenization work while high prefix-cache reuse across multi-turn interactions reduces GPU-side prefill work. These bottlenecks persist even in serving stacks that employ process-level separation and modern GPU-side optimizations such as CUDA Graphs. Since CPU cores cost orders of magnitude less than GPUs, provisioning additional cores is a highly cost-effective mitigation. Under moderate serving load, we observe that CPU-starved configurations frequently time out, while providing adequate CPU resources restores responsiveness and reduces time-to-first-token (TTFT) latency by 1.47-7.11x across configurations, all without requiring additional GPUs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。