GPU 内存气球专题概览气球基础槽位演示来源与校审
MMEMORY LAB / GPU BALLOON
BILINGUAL READING / 逐段对照

Prism:通过 GPU 内存气球实现高性价比多 LLM 服务

Prism: Cost-Efficient Multi-LLM Serving via GPU Memory Ballooning

arXiv:2505.04021v3 · 2026-06-10 · OSDI 2026

原文作者与署名

Shan Yu; Yifan Qiao; Mingyuan Ma; Yangmin Li; Shuo Yang; Xinyuan Tong; Yang Wang; Zhiqiang Xie; Yuwei An; Shiyi Cao; Ke Bao; Deepak Vij; Xiaoning Ding; Yichen Wang; Qingda Lu; Zhong Wang; Gao Gao; Harry Xu; Junyi Shu; Jiarong Xing; Ying Sheng

AI逐段译稿/第一轮文本与结构核对,非人工终审、非作者官方译本,未复现实验。正文、附录、声明逐段对照;算法附中文说明,图内英文、参考文献、模型和代码名保留原文。阅读解读与原文疑点。

固定原文 ↗ · CC BY 4.0 与版本台账 · 下载对照文本

121个对照单元
Abstract摘要
001

Inference providers must maintain availability for many LLMs, including low-volume but essential models, making resource efficiency increasingly important as token prices fall. Analysis of production traces reveals a dynamic bursty-group pattern in which sets of models become active together and shift over time; existing space- and time-sharing approaches lack principled mechanisms to adapt to this variability, forcing trade-offs between SLO adherence and efficiency. We observe that elastic memory allocation can unify spatial and temporal sharing. Based on this insight, we have developed Prism, a memory-centric LLM co-serving framework that applies memory ballooning to reclaim memory across models and support both forms of sharing under a single scheme. Prism’s balloon driver, referred to as kvcached, has been open-sourced at https://github.com/ovg-project/kvcached, and deployed in production environments across 10K+ GPUs.

推理服务提供商必须保证许多大语言模型(LLM)随时可用,其中也包括请求量虽少却不可缺少的模型。随着 token 价格下降,资源效率愈发重要。对生产环境轨迹的分析揭示了一种动态的“突发模型组”模式:一组模型同时活跃,而这组模型的组成又随时间变化。现有空间共享和时间共享方法缺乏有原则的机制来适应这种变化,因而必须在服务等级目标(SLO)达成率与效率之间权衡。我们发现,弹性内存分配能够统一空间共享与时间共享。基于这一认识,我们开发了 Prism:一个以内存为中心的 LLM 协同服务框架。它通过内存气球机制回收不同模型的内存,在统一方案下支持两种共享方式。Prism 的气球驱动名为 kvcached,已在 https://github.com/ovg-project/kvcached 开源,并已用于覆盖超过一万块 GPU 的生产环境。
†† * Corresponding authors.

1 Introduction1 引言

002

Serving LLMs is costly for providers such as Hugging Face and Alibaba Cloud, which must host thousands of base and fine-tuned models, many with low request volumes yet mandatory availability [52, 42, 53]. As token prices fall and models vary widely in size and workload patterns, reducing inference cost while preserving performance has become a central objective. The core challenge, however, is not hardware expense but chronic under-utilization: to satisfy strict SLOs, industry practice often dedicates a model-parallel GPU group (i.e., one or more GPUs jointly serving a single model instance), guaranteeing immediate responsiveness but wasting substantial capacity. This strategy is particularly inefficient for models with bursty or sparse traffic, and production analyses show that GPU duty cycles commonly fall below 30% [52, 53].

对于 Hugging Face、阿里云等提供商而言,LLM 服务成本高昂:它们必须托管数千个基础模型与微调模型,其中许多模型请求量很低,却仍须保证可用[52,42,53]。token 价格不断下降,而模型大小与工作负载模式差异巨大,因此在保持性能的同时降低推理成本已成为核心目标。不过,核心挑战并非硬件价格,而是长期存在的利用不足。为了满足严格的 SLO,业界通常为一个模型实例专门分配一个模型并行 GPU 组,即共同服务该实例的一块或多块 GPU。这保证了即时响应,却浪费大量容量。对于流量突发或稀疏的模型,这种策略尤其低效;生产分析显示,GPU 实际工作时间占比往往低于 30%[52,53]。
003

To improve utilization, prior work has explored various GPU sharing mechanisms at different granularities. Because auto-regressive LLM inference is intrinsically memory-bound, tail latency is governed primarily by memory stalls (e.g., page faults, PCIe migrations). Moreover, compute sharing is already well studied—both via hardware mechanisms such as NVIDIA MIG [29] and vGPU [30], and via software solutions [27, 61, 13, 10, 12, 41]. In contrast, effective memory sharing remains comparatively underexplored. We therefore center this work on advancing effective GPU memory sharing.

为提高利用率,已有研究探索了不同粒度的 GPU 共享机制。由于自回归 LLM 推理本质上受内存制约,尾延迟主要受内存停顿支配,例如缺页和 PCIe 迁移。此外,计算共享已得到广泛研究,既包括 NVIDIA MIG[29]、vGPU[30] 等硬件机制,也包括软件方案[27,61,13,10,12,41]。相比之下,有效的内存共享研究较少。因此,本研究着重推进有效的 GPU 内存共享。
004

The work of memory sharing for LLM serving falls into two categories: space sharing and time sharing. Space sharing (e.g., MuxServe [11]) colocates multiple models on the same GPU to utilize unused memory and compute cycles, which is effective for smaller, low-traffic models that are continuously accessed. Time sharing (e.g., QLM [33] and Aegaeon [52]) swaps models in and out of GPU memory, which is ideal for handling sporadic requests to models as the resources can be freed up when models are idle. While these strategies are effective for specific cases, our analysis of a broad range of production serving traces demonstrates that they fail to adapt to more complex and realistic usage scenarios.

LLM 服务的内存共享工作分为空间共享与时间共享两类。空间共享,例如 MuxServe[11],把多个模型共置于同一 GPU,利用空闲的内存和计算周期,适合体积较小、流量较低却持续被访问的模型。时间共享,例如 QLM[33] 与 Aegaeon[52],将模型换入、换出 GPU 内存,适合处理零星请求,因为模型空闲时可以释放资源。这些策略在特定情形下有效,但我们对广泛生产轨迹的分析表明,它们无法适应更复杂、更真实的使用场景。
005

In particular, we have conducted a comprehensive analysis of production traces drawn from major inference providers (i.e., Hyperbolic and Novita AI) as well as independent evaluation platforms (i.e., Chatbot Arena). These traces encompass 11 days to 16 months of traffic across 58 heterogeneous models. Our results indicate that real-world workloads display diverse, rapidly changing patterns that elude any single, fixed sharing mechanism.

具体而言,我们全面分析了来自主要推理提供商 Hyperbolic、Novita AI,以及独立评测平台 Chatbot Arena 的生产轨迹。这些轨迹覆盖 58 个异构模型、11 天至 16 个月的流量。结果表明,真实负载呈现多样且快速变化的模式,任何单一、固定的共享机制都难以应对。
006

Key observations.  At the model level, deployed models show a bursty-group behavior: when a burst occurs, requests concentrate on a particular subset of models, and that subset shifts over time, similar to an application’s dynamically changing working set. This pattern is driven by modern compound AI systems and agentic pipelines, which depend on a central reasoning LLM together with a number of fine-tuned or LoRA models for specialized agent tasks. At the request level, detailed inspection of the traces confirms that requests are extremely dynamic and volatile and fluctuate rapidly and unpredictably, limiting the value of existing GPU-sharing techniques. Space sharing, alone, fails to adapt to longer idle periods; for instance, in the Novita AI trace, where models are idle for over 70% of the time, space sharing creates significant memory fragmentation, leaving 50% of GPU memory occupied but unused. In contrast, time sharing, alone, struggles with rapid workload fluctuations. The significant latency overhead of swapping (e.g., several seconds) causes severe thrashing during traffic bursts, resulting in a spike of requests violating their latency SLOs due to queuing delays.

关键观察。在模型层面,已部署模型表现出“突发模型组”行为:突发出现时,请求集中于某个模型子集,而该子集随时间变化,类似应用动态变化的工作集。其驱动力是现代复合 AI 系统与智能体流水线:它们依赖一个中心推理 LLM,再结合若干微调模型或 LoRA 模型执行专门的智能体任务。在请求层面,细查轨迹可见,请求极其动态、波动剧烈,变化迅速且不可预测,这限制了既有 GPU 共享技术的作用。单独采用空间共享无法适应较长的空闲期。例如在 Novita AI 轨迹中,模型超过 70% 的时间处于空闲,空间共享造成明显的内存碎片化,使 50% 的 GPU 内存虽被占用却未被使用。反之,单独采用时间共享也难以应对快速波动。换入换出的显著延迟,例如数秒,会在突发流量期间造成严重抖动,请求排队延迟激增,大量请求违反延迟 SLO。
007

Maximizing resource utilization while preserving SLO attainment requires integrating both strategies: space sharing for colocating low-traffic models and time sharing for burst handling and idle-resource reclamation. However, mingling these approaches is far from trivial due to the fundamentally different challenges they must address—the flexibility of memory balancing for space sharing vs. the efficiency of model swapping for time sharing. One could attempt to switch spatial and temporal sharing strategies dynamically; yet, co-locating models with conflicting sharing needs creates resource contention. Specifically, a model requiring time-sharing typically relies on preempting resources to maximize burst performance, which directly contradicts the persistent resource availability required by a model colocated through space-sharing. Without a mechanism to fluidly mediate these conflicting operational modes, the system is forced into rigid configurations that cannot adapt to dynamic load changes.

要在维持 SLO 达成率的同时最大化资源利用,必须结合两种策略:以空间共享共置低流量模型,以时间共享处理突发并回收空闲资源。但两者的结合绝非易事,因为它们面临的根本挑战不同:空间共享需要灵活的内存平衡,时间共享需要高效的模型换入换出。一种尝试是在空间与时间共享策略间动态切换;然而,把共享需求相冲突的模型共置,会产生资源争用。具体而言,需要时间共享的模型通常依赖抢占资源来最大化突发时的性能,这直接违背了空间共享共置模型所需的持续资源可用性。若没有机制流畅协调这两种相互冲突的运行方式,系统就只能采用僵硬配置,无法适应动态负载。
008

Insight: a memory-centric view to unify space- and time-sharing.  Our central observation is that GPU memory is the unifying bottleneck, and each sharing strategy is concerned with a different portion of that memory: time-sharing focuses on efficiently swapping in LLM weights, whereas space-sharing determines how to scale KV-cache capacity among concurrently served models. This perspective parallels memory ballooning in virtualization, where a hypervisor dynamically reclaims memory from guest VMs and reallocates it where needed. In the context of LLM co-serving, an analogous “balloon driver” can reclaim memory from idle models to swap in the weights of new models (supporting time-sharing) or from models with low request rates by shrinking their KV-cache reservations (supporting space-sharing). Treating GPU memory as an elastic resource allows the system to fluidly shift between sharing modes and even enable both simultaneously (i.e., apply time-sharing to only a subset of colocated models), ensuring active models obtain the memory required to satisfy their SLOs while maximizing cluster-level efficiency.

洞见:以内存为中心统一空间共享与时间共享。我们的核心观察是,GPU 内存是共同瓶颈,而每种策略关注的是内存的不同部分:时间共享着重高效换入 LLM 权重,空间共享则决定并发服务模型之间如何伸缩 KV 缓存容量。这与虚拟化中的内存气球机制相似:虚拟机监控器动态回收客户虚拟机的内存,再把它分配到需要之处。在 LLM 协同服务中,类似的“气球驱动”可以回收空闲模型的内存,以换入新模型权重,支持时间共享;也可以缩减低请求率模型的 KV 缓存预留,支持空间共享。把 GPU 内存视为弹性资源,可让系统流畅切换共享模式,甚至同时使用两者,例如仅对共置模型中的一部分进行时间共享,从而在最大化集群整体效率的同时,让活跃模型获得满足 SLO 所需的内存。
009

Prism.  We developed Prism, a new memory-centric GPU sharing system for multi-LLM serving. At its core, Prism implements the concept of memory ballooning for LLMs to enable demand-aware, cross-model memory sharing, a capability missing in existing systems but critical for unifying spatial and temporal strategies. Prism ensures that models can promptly expand their memory footprint to meet latency SLOs, while unused memory is efficiently harvested from others to maximize overall cluster utilization. The design of Prism addresses two key challenges.

Prism。我们开发了 Prism,一套新的、以内存为中心的多 LLM GPU 共享系统。其核心是在 LLM 中实现内存气球机制,提供需求感知的跨模型内存共享能力。这是统一空间与时间策略的关键,而现有系统缺少这一能力。Prism 保证模型能够及时扩大内存占用以满足延迟 SLO,同时高效回收其他模型的未用内存,最大化集群整体利用率。Prism 的设计解决了以下两个关键挑战。
010

Challenge 1: How to enable flexible memory ballooning for LLMs?  Today’s LLM serving engines (e.g., SGLang and vLLM) are designed for single-model serving and adopt per-model static memory allocation. While techniques like PagedAttention manage memory efficiently within a model, they operate at the application level and cannot harvest memory across model boundaries.

挑战一:如何为 LLM 提供灵活的内存气球机制?当前的 SGLang、vLLM 等 LLM 服务引擎面向单模型服务设计,采用按模型静态分配内存的方式。PagedAttention 等技术虽然能够高效管理单个模型内部的内存,但它们工作于应用层,无法跨越模型边界回收内存。
011

Flexible memory ballooning requires a mechanism to dynamically resize the physical memory footprint of a model at runtime without disrupting its execution. Prism tackles this through a model balloon driver for serving engines (§5). The model balloon driver decouples virtual and physical GPU memory: serving engines reserve a large virtual address space during initialization, but physical memory is allocated and mapped only on demand. This design enables transparent, fine-grained memory redistribution at a 2 MB granularity with millisecond-level overhead, supporting diverse model architectures with zero code change to attention kernels.

灵活的内存气球机制需要在运行期间动态调整模型的物理内存占用,而不打断模型执行。Prism 通过面向服务引擎的模型气球驱动解决这一问题(§5)。该驱动解耦 GPU 虚拟内存与物理内存:引擎初始化时预留较大的虚拟地址空间,但物理内存只在需要时分配并映射。这种设计支持以 2 MB 为粒度、毫秒级开销的透明细粒度内存再分配,适应不同模型架构,且无需修改注意力内核代码。
012

Challenge 2: How to place models and schedule requests to maximize SLO attainment?  While the balloon driver provides the mechanism for elasticity, maximizing SLO attainment requires intelligent policies to decide when and where memory should be allocated. Without proper coordination, contention for shared memory can lead to thrashing and performance degradation. Prism solves this through decoupled model placement and request scheduling. First, the fast-changing bursty groups (§3.1) require a placement algorithm that can quickly decide where each model should run. Prism tackles this with a global demand-complementary placement algorithm that minimizes the KV pressure ratio (KVPR), balancing model memory demand with GPU capacity (§6.1). Second, volatile request arrivals and diverse SLO targets require estimating each request’s time slack so the memory manager can steer memory toward latency-sensitive tasks. Prism achieves this via a local slack-aware arbitration algorithm, which leverages a GPU-level request queue to prioritize requests based on their slack (§6.2).

挑战二:如何放置模型、调度请求,以最大化 SLO 达成率?气球驱动提供了弹性机制,但要最大化达成率,还需要智能策略决定何时、何处分配内存。若协调不当,共享内存争用会导致抖动与性能下降。Prism 将模型放置与请求调度解耦。首先,快速变化的突发模型组(§3.1)要求放置算法迅速决定模型运行位置。Prism 采用全局的需求互补放置算法,最小化 KV 压力比(KVPR),平衡模型内存需求与 GPU 容量(§6.1)。其次,多变的请求到达与不同 SLO 目标要求估计每个请求的时间余量,让内存管理器把内存引向延迟敏感任务。Prism 采用本地的余量感知仲裁算法,通过 GPU 级请求队列,按请求的时间余量确定优先级(§6.2)。
013

Results.  We implemented Prism on top of SGLang [63], a widely used LLM serving engine. We evaluated Prism comprehensively with two production traces, and with 58 representative LLMs of varying architectures and sizes, on GPU clusters with up to 32 H100 GPUs. Our results show that Prism achieves up to 3.3×\times higher time-to-first- token (TTFT) SLO attainment and 2×2\times higher time-per-output-token (TPOT) SLO attainment given the same number of GPUs. When targeting the same level of SLO attainment, Prism achieves up to over 2×\times cost reduction or 3.5×\times more requests compared to the state-of-the-art.

结果。我们在广泛使用的 LLM 服务引擎 SGLang[63] 上实现 Prism,使用两条生产轨迹和 58 个架构、大小各异的代表性 LLM,在最多 32 块 H100 GPU 的集群上进行全面评估。结果显示,GPU 数相同时,Prism 的首 token 时间(TTFT)SLO 达成率最高为对比方案的 3.3 倍,每输出 token 时间(TPOT)SLO 达成率最高为 2 倍。若目标是相同水平的 SLO 达成率,相比最先进方案,Prism 可获得最高超过 2 倍的成本缩减,或处理最高 3.5 倍的请求量。
014

Prism’s balloon driver, referred to as kvcached, has been open-sourced and actively maintained at https://github.com/ovg-project/kvcached. kvcached has been adopted by many industry users to support production workloads in clusters of more than 10K GPUs. We report usage analyses from two companies at the end of §7.

Prism 的气球驱动名为 kvcached,已在 https://github.com/ovg-project/kvcached 开源并积极维护。许多业界用户已采用 kvcached,在超过一万块 GPU 的集群中支持生产负载。§7 末尾报告了两家公司的使用分析。

2 Background2 背景

015

SLOs of Online LLM Serving.  In online LLM serving, unlike offline batch processing, the system must interact with users or downstream applications in real-time. Consequently, providers enforce strict SLOs to guarantee the quality of experience. Two key latency metrics define these objectives. First, Time-To-First-Token (TTFT) measures the latency to process the input prompt and generate the first token, which is a crucial metric for interactive applications, such as chatbots. Second, Time-Per-Output-Token (TPOT) measures the average inter-token latency during the autoregressive generation, which is essential to ensure that text generation is fluid and matches human reading speeds.

在线 LLM 服务的 SLO。不同于离线批处理,在线 LLM 服务必须与用户或下游应用实时交互,因此提供商以严格的 SLO 保证体验。两个关键延迟指标定义这些目标。首先,首 token 时间(TTFT)衡量处理输入提示并生成第一个 token 所需的延迟,对聊天机器人等交互应用尤其重要。其次,每输出 token 时间(TPOT)衡量自回归生成阶段的平均 token 间延迟,关系到文本输出是否流畅、是否符合人的阅读速度。
016

Memory footprint of LLM serving.  LLM inference is inherently memory-bound, with GPU memory dominated by model weights and KV cache.

LLM 服务的内存占用。LLM 推理本质上受内存制约,GPU 内存主要由模型权重和 KV 缓存占据。
017

Model weights. LLM weights are massive; for example, a 70B-parameter model requires roughly 140 GB of GPU memory in FP16. Under long-tail workloads [52], idle models waste GPU memory; prior work [52, 13] mitigates this with model eviction and accelerated weight loading.

模型权重。LLM 权重体积庞大,例如一个 700 亿参数模型采用 FP16 时,约需 140 GB GPU 内存。对于长尾负载[52],空闲模型会浪费 GPU 内存;已有工作[52,13]通过模型驱逐与加速权重加载缓解这一问题。
018

KV cache and PagedAttention. The KV cache stores intermediate Key (K) and Value (V) tensors for attention layers to avoid redundant computation. Unlike weights, the KV cache is dynamic, growing with sequence length and batch size.

KV 缓存与 PagedAttention。KV 缓存保存注意力层的中间 Key(K)和 Value(V)张量,避免重复计算。不同于权重,KV 缓存是动态的,会随序列长度与批大小增长。
019

To improve GPU memory efficiency, mainstream LLM serving systems adopt PagedAttention [21], which splits each request’s KV cache into fixed-size blocks that can be stored non-contiguously and reused across requests. Frameworks such as SGLang [63] and vLLM [21] implement this design by reserving large PyTorch tensors as a KV block pool and mapping each request’s logical blocks to physical offsets in the pool. For each of the LL attention layers, a K tensor and a V tensor of shape (B,T,H,D)(B,T,H,D) are allocated, where BB is the number of blocks, TT is the tokens per block, HH is the number of attention heads, and DD is the head dimension. The values of LL, HH, and DD vary across model architectures (e.g., Llama-3-8B (32,8,12832,8,128) vs. GPT-OSS-120B (36,8,6436,8,64)), resulting in different KV block sizes.

为提高 GPU 内存效率,主流 LLM 服务系统采用 PagedAttention[21],把每个请求的 KV 缓存划分为固定大小的块,允许非连续存放,并在请求间复用。SGLang[63]、vLLM[21] 等框架通过预留大型 PyTorch 张量作为 KV 块池,把请求逻辑块映射到池中的物理偏移。对 L 个注意力层中的每一层,分配一个 K 张量和一个 V 张量,形状均为 (B,T,H,D):B 是块数,T 是每块 token 数,H 是注意力头数,D 是头维度。L、H、D 随架构而异,例如 Llama-3-8B 为 (32,8,128),GPT-OSS-120B 为 (36,8,64),因此 KV 块大小也不同。

3 Production Trace Analysis3 生产轨迹分析

Trace name轨迹名称 Service provider服务提供方 # models模型数 Time span时间跨度
Hyperbolic Hyperbolic [19] 24 4 months
Novita Novita AI [3] 16 1 month
Arena-Battle Chatbot Arena [9] 129 16 months
Arena-Chat Chatbot Arena [9] 84 11 days
Table 1: Production trace summary.
表1:生产轨迹汇总。
020

Prior studies have primarily profiled single-model LLM services [48, 49], but the cross-model dynamics that arise in multi-LLM serving remain largely under-examined. As a result, evaluations in recent multi-LLM serving work often rely on synthetic or simplified workloads, such as Poisson/Gamma arrivals [11, 33, 52], temporally rescaled traces from non-LLM domains [14, 13], or dataset-driven replays [39].

既有研究主要刻画单模型 LLM 服务[48,49],多 LLM 服务引发的跨模型动态仍缺少充分研究。因此,近期多 LLM 服务工作评估时常依赖合成或简化负载,例如泊松/Gamma 到达[11,33,52]、从非 LLM 领域按时间缩放的轨迹[14,13],或基于数据集的回放[39]。
021

To address these gaps, we conduct a detailed characterization of production workloads from major inference providers (i.e., Hyperbolic and Novita AI) as well as independent evaluation platforms (i.e., Chatbot Arena), explicitly capturing the fine-grained, time-varying dynamics of multi-LLM traffic. The four traces span 24–129 deployed models over weeks to months of traffic, summarized in Table 1. In this section, we utilize the traces from Novita AI as a representati4ve example to illustrate our observations and report cross-trace statistics. We include a detailed CDF analysis in Appendix A.1.

为填补这些空白,我们详细刻画来自主要推理提供商 Hyperbolic、Novita AI,以及独立评测平台 Chatbot Arena 的生产负载,明确捕捉多 LLM 流量细粒度、随时间变化的动态。四条轨迹覆盖 24–129 个已部署模型、数周至数月的流量,汇总见表 1。本节以 Novita AI 轨迹为代表说明观察,并报告跨轨迹统计。附录 A.1 给出了详细的累积分布函数(CDF)分析。
Refer to caption
Figure 1: Combined view of model-request dynamics; the x-axes denote time. (a) Variation of concurrently active model groups over a six-hour window (8am–4pm): the y-axis lists all models from the Novita trace; each cell represents a three-minute interval, with dark/light shading indicating whether the model is active. (b) Zoomed-in view of volatile request patterns from 11am–1pm, showing per-model normalized request rates, where darker colors indicate higher rates. (c) A further zoom-in over a 5-minute window from (b), comparing two models on a shared normalization.
图1:模型与请求动态的综合视图,横轴均为时间。(a) 原文称“六小时窗口(8am–4pm)”内同时活跃模型组的变化:纵轴为 Novita 轨迹全部模型,每格代表3分钟,深浅色表示是否活跃;(b) 放大11am–1pm的请求波动,各模型请求率分别归一化,颜色越深请求率越高;(c) 将(b)中5分钟进一步放大,两个模型使用共同尺度归一化。【译注:六小时与8点至16点不一致。】

3.1 Model Level: Shifting Bursty Groups3.1 模型层面:不断变化的突发模型组

022

We begin by examining the dynamics of concurrently active models (i.e., those processing at least one request) from the Novita trace over a six-hour span in Figure 1(a), where a horizontal slice of a model represents its active/idle activities over time, and a vertical slice at a point of time reveals which subset of the models is active at the point. Our analysis reveals two properties that are common for production workloads: bursty groups and heterogeneous access patterns.

我们先考察图 1(a) 中 Novita 轨迹六小时内并发活跃模型的变化;“活跃”指至少在处理一个请求。某模型对应的水平切片表示它随时间活跃或空闲,某时刻的垂直切片则表示当时活跃的模型子集。分析揭示出生产负载共有的两个性质:突发模型组,以及异构访问模式。
023

Vertical behavior: bursty groups. Vertically, deployed models demonstrate a bursty-group behavior: models receive requests in short, irregular bursts separated by long and variable idle intervals. Because these bursts occur asynchronously across models, only a small subset is active at any moment, and this subset changes rapidly over time. We refer to this transient set as the bursty group, analogous to how an application’s working set changes during its execution—there are common models that appear in almost every group but most models experience sporadic requests and hence appear only in a small number of groups. Across the four traces, 23%–50% of models are active concurrently on average, and the active set changes 54–766 times per hour. Although the total number of deployed LLMs can be large, only the bursty group drives actual demand. Efficient GPU utilization thus requires adapting resources to this shifting model group, rather than allocating resources statically to all models.

纵向行为:突发模型组。从纵向看,已部署模型表现为突发模型组:模型在短暂且不规则的突发中收到请求,中间穿插漫长、长短不一的空闲期。不同模型的突发并不同步,因此任何时刻都只有较小的子集活跃,该子集又快速变化。我们把这个暂时的集合称为“突发模型组”,类似应用执行过程中变化的工作集。一些常用模型几乎出现在每个组里,但多数模型只有零星请求,仅出现在少数组里。四条轨迹中,平均同时活跃的模型比例为 23%–50%,活跃集合每小时变化 54–766 次。尽管部署的 LLM 总数可能很大,真正产生需求的只是突发模型组。因此,高效 GPU 利用要求资源适应这个不断变化的组,而不是静态分给所有模型。
024

Horizontal behavior: Heterogeneous activation patterns. Horizontally, the workload exhibits significant heterogeneity across models in activation patterns. Some models, such as Llama-3.3-70B, sustain long stretches of continuous activity, while others (like Distilled-Deepseek-R1-Qwen-14B(DS-R1-Q-14B)) activate only in sparse, short-lived instances with only a small group of applications/users using it. This heterogeneity is largely driven by the diverse roles that models play in modern compound AI systems and agentic pipelines. Large general-purpose models (e.g., Llama-3.3-70B) often act as central reasoning or planning components and remain active throughout user interactions, leading to sustained request streams. In contrast, smaller distilled models (e.g., DS-R1-Q-14B) are typically invoked as auxiliary components—such as for tool use or verification—and are triggered only at specific pipeline stages, resulting in intermittent, bursty activations.

横向行为:异构激活模式。从横向看,不同模型的激活模式差异明显。Llama-3.3-70B 等模型长期持续活跃,而 Distilled-Deepseek-R1-Qwen-14B(DS-R1-Q-14B)等模型仅由少量应用或用户使用,激活稀疏、持续很短。这种异构性主要源于模型在现代复合 AI 系统和智能体流水线中的不同角色。大型通用模型,例如 Llama-3.3-70B,常担任核心推理或规划组件,在用户交互期间保持活跃,因此请求持续到来。较小的蒸馏模型,例如 DS-R1-Q-14B,通常用于工具调用或验证等辅助环节,只在特定流水线阶段触发,因此激活间歇且突发。
025

Aggregating requests across many applications and users yields a mixed access pattern in which some models remain persistently active, others appear only sporadically, and even the same model may exhibit different behaviors over time. These differences have direct implications for resource management: long-running models benefit from sustained colocation, whereas short and scattered bursts favor opportunistic execution. Consequently, multi-LLM serving systems must adapt to the heterogeneous activation behavior of each model, rather than assuming uniform access patterns.

汇集许多应用和用户的请求后,会形成混合访问模式:某些模型持续活跃,某些仅偶尔出现,甚至同一个模型也可能随时间呈现不同行为。这直接影响资源管理:长期运行的模型受益于持续共置,短促、分散的突发更适合机会式执行。因此,多 LLM 服务系统必须适应各模型的异构激活行为,而不能假设访问模式一致。
026

Implication: Inefficiency of static partitioning. The existence of shifting bursty groups fundamentally challenges any static strategies. Since only a small, changing subset of models drives demand at any given moment, statically partitioning GPU memory across all models (to ensure availability) results in severe resource fragmentation. In the Novita AI trace, for example, models are idle for over 70% of the time on average. Under a static memory-partitioning regime, the memory reserved for these idle models is wasted, preventing active models in the current bursty group from utilizing that capacity to scale up and meet their SLOs.

启示:静态分区效率低下。变化的突发模型组从根本上挑战任何静态策略。任一时刻,实际需求只来自一个较小且不断变化的子集;若为保证可用性而把 GPU 内存静态分配给所有模型,就会造成严重的资源碎片化。例如在 Novita AI 轨迹中,模型平均超过 70% 的时间空闲。采用静态内存分区时,这些空闲模型预留的内存被浪费,使当前突发组中的活跃模型无法利用这部分容量扩展规模、满足 SLO。

3.2 Request Level: Dynamic and Volatile3.2 请求层面:动态且波动剧烈

027

We next zoom in to a shorter period of time to examine the fine-grained dynamics of individual models. Figure 1(b) depicts the request rates for the models over a two-hour window, normalized within each model so that low-volume bursts remain visible alongside high-volume ones.

接下来,我们缩短观察时段,考察单个模型的细粒度动态。图 1(b) 给出两小时窗口中的模型请求率,并在各模型内部归一化,使低流量突发也能与高流量突发一起看清。
028

Extreme volatility and pattern shifts. As shown in Figure 1(b), request streams shift patterns frequently. Even models that appear continuously active in coarser views actually exhibit rapid oscillations between low-demand periods and short, intense bursts (e.g., Qwen2-7B). Similarly, models that are only sporadically invoked display burst sizes and inter-arrival times that vary significantly over time (e.g., Llama-3.1-8B).

极端波动与模式变化。如图 1(b),请求流经常改变模式。即便在粗粒度视图里看似持续活跃的模型,实际上也会在低需求期与短而强烈的突发之间快速振荡,例如 Qwen2-7B。同样,只有零星调用的模型,其突发规模与到达间隔也会显著变化,例如 Llama-3.1-8B。
029

Abrupt pattern transitions. Furthermore, these workload patterns often undergo rapid, unforeseen transitions. Figure 1(c) provides a granular, 5-minute zoom-in view of request arrivals for two representative models. This window reveals a stark shift in interaction dynamics: a phase of moderate, interleaved activity—where both models contend for resources simultaneously—abruptly gives way to a concentrated burst from a single model. Such sudden pattern shifts occur without discernible triggers, implying that the system cannot rely on historical stability or long-term pattern recognition; instead, it must possess the agility to react to instantaneous changes. Such transitions are pervasive: across our traces, many models exhibit a request rate coefficient of variation above 1 and 40–100 idle intervals per hour.

突如其来的模式转变。此外,这些负载模式经常发生迅速且不可预见的转变。图 1(c) 对两个代表模型的请求到达提供了细粒度的五分钟放大视图。窗口显示出交互动态的鲜明转折:两个模型同时争用资源、适度交错活跃的阶段,突然变成单个模型的集中突发。这些变化没有明显触发迹象,意味着系统不能依靠历史稳定性或长期模式识别,而必须敏捷响应即时变化。此类转变普遍存在:在我们的轨迹中,许多模型的请求率变异系数超过 1,每小时经历 40–100 次空闲间隔。
030

Implication: Instability of pure time sharing. The extreme volatility and rapid pattern transitions undermine pure time-sharing strategies. As seen in Figure 1(c), request streams frequently transition into phases of interleaved activity where multiple models are active simultaneously. In these scenarios, a time-sharing system relying on swapping must constantly evict and reload weights to serve alternating requests. This leads to model thrashing, where the latency overhead of loading weights dominates execution time, causing immediate SLO violations. This volatility necessitates the stability of space sharing, where working sets remain resident to handle interleaved demand without swapping penalties.

启示:纯时间共享不稳定。极端波动与快速模式转变削弱了纯时间共享策略。如图 1(c),请求流经常进入多个模型同时活跃、请求交错的阶段。在这种场景下,依赖换入换出的时间共享系统必须不断驱逐、重新加载权重,才能服务交替到来的请求。这导致模型抖动:权重加载延迟支配执行时间,立即造成 SLO 违反。这种波动需要空间共享带来的稳定性,让工作集常驻内存,以免受换入换出惩罚、低延迟处理交错需求。

3.3 Applying Existing Approaches3.3 应用已有方法

原论文图表,见图注
(a) Pure time sharing.
(a) 纯时间共享。
原论文图表,见图注
(b) Pure space sharing.
(b) 纯空间共享。
Figure 2: Performance of pure time- (a) and space-sharing (b) for the trace in Figure 1(c). Pure time sharing in (a) causes model switching when both models have requests, while pure space sharing in (b) causes queuing delay during requests spike.
图2:在图1(c)轨迹上,纯时间共享(a)与纯空间共享(b)的性能。前者在两模型同时有请求时发生模型切换;后者在突发请求时产生排队延迟。
031

To understand the implications of these abrupt pattern transitions, we ran two representative state-of-the-art strategies, time sharing (QLM [33]) and space sharing (static partition [29, 1]), on the trace segment shown in Figure 1(c). Figure 2 illustrates the resulting memory usage and cumulative SLO violations for each approach.

为理解这些突然模式转变的影响,我们在图 1(c) 的轨迹片段上运行了两种代表性的先进策略:时间共享 QLM[33] 与空间共享静态分区[29,1]。图 2 展示两种方法的内存使用与累积 SLO 违反情况。
032

Failure of time sharing.  Time sharing manages resources by swapping models in and out of GPU memory. This approach struggles during the initial phase of interleaved activity. As both models receive frequent, overlapping requests, the system is forced to repeatedly evict and reload weights to serve alternating inputs. As shown in Figure 2(a), this leads to severe model thrashing: the GPU spends more time on PCIe transfers and engine re-initialization than on computation. As such, request queues grow rapidly, resulting in a spike of SLO violations even before the workload intensity peaks.

时间共享的失效。时间共享通过把模型换入、换出 GPU 内存来管理资源。这在初始的交错活跃阶段会遇到困难:两个模型都频繁收到相互重叠的请求,系统被迫反复驱逐、重载权重,处理交替输入。如图 2(a),这造成严重的模型抖动,GPU 花在 PCIe 传输和引擎重新初始化上的时间多于计算时间。于是,请求队列快速增长,在负载强度尚未达到峰值前,SLO 违反就已激增。
033

Failure of space sharing.  Space sharing avoids swapping by partitioning GPU memory between models. While this provides stability during the interleaved phase, it fails catastrophically when the workload transitions to the burst phase, as shown in Figure 2(b). Although one model becomes idle, its model weights remain locked, preventing the active model which is now experiencing a demand surge from utilizing the full GPU capacity. This rigid isolation creates artificial resource scarcity: the active model is starved of KV cache memory while adjacent memory sits idle. The result is a throughput cap that causes significant queuing delays and SLO violations during the burst.

空间共享的失效。空间共享通过在模型之间划分 GPU 内存避免换入换出。在交错阶段它提供了稳定性,但当负载进入突发阶段时,会发生灾难性失效,如图 2(b)。一个模型虽已空闲,它的权重仍被锁定在内存中,使需求陡增的活跃模型无法使用整块 GPU 的容量。这种僵硬隔离制造了人为的资源短缺:旁边内存闲置,活跃模型却缺 KV 缓存。最终,吞吐量受限,突发期间出现明显排队延迟与 SLO 违反。

3.4 Takeaway: A Hybrid Approach3.4 启示:混合方法

034

Our analysis demonstrates that production multi-LLM workloads exhibit conflicting requirements that no single existing strategy can satisfy:

我们的分析表明,生产多 LLM 负载具有相互冲突的需求,现有任何单一策略都无法满足:
  • •
    035

    Bursty groups benefit from time-sharing capabilities: At the model level, the active set shifts over time. Pure space sharing fails here because it rigidly locks memory for idle models, causing fragmentation and preventing active models from scaling. The system must be able to evict idle resources to maximize utilization.

    突发模型组需要时间共享能力。在模型层面,活跃集合随时间变化。纯空间共享会把内存锁给空闲模型,导致碎片化、阻碍活跃模型扩展,因此无法胜任。系统必须能驱逐空闲资源以提高利用率。
  • •
    036

    Volatile requests benefit from space-sharing capabilities: At the request level, demand fluctuates rapidly and often interleaves across models. Pure time sharing fails here because swapping causes severe thrashing during these volatile periods. The system must be able to keep active models colocated in memory to provide low-latency access.

    多变请求需要空间共享能力。在请求层面,需求快速波动,且常在模型间交错。纯时间共享会在这些多变时期因换入换出导致严重抖动,因此无法胜任。系统必须让活跃模型共同驻留内存,以提供低延迟访问。
037

Motivation for Prism. These two patterns capture the workload at coarse- and fine-grained levels, respectively. Because they reflect different facets of the same underlying behavior, they cannot be addressed in isolation, necessitating a hybrid approach: the system must fluidly shift between the strategies at runtime. It needs the elasticity to act like a time-sharing system when reclaiming memory from the idle models, while simultaneously acting like a space-sharing system to co-serve the models in an active bursty group without causing SLO violations. This calls for a design that manages GPU memory as a dynamic, shared resource rather than static partitions.

Prism 的动机。这两种模式分别反映负载的粗粒度与细粒度特征,是同一底层行为的不同侧面,不能独立解决,因而需要混合方法:系统必须在运行时流畅切换策略。回收空闲模型内存时,它要像时间共享系统一样具备弹性;同时,它又要像空间共享系统一样,为活跃突发组中的多个模型共同提供服务,而不违反 SLO。这要求把 GPU 内存作为动态共享资源管理,而不是划成静态分区。

4 Overview4 系统概览

038

Prism is a memory-efficient GPU sharing system for cost-effective multi-LLM serving. Figure 3 shows its system architecture and design overview. Prism receives inference requests at its frontend, which routes them to the corresponding LLMs for processing. To improve cost efficiency, Prism serves LLMs with flexible combinations of space and time sharing. For instance, high-rate models may occupy GPUs exclusively, while multiple low-rate models can be colocated on a single GPU or a model-parallel GPU group. In Prism, a GPU group represents the strict scheduling boundary—a set of GPUs tightly coupled to jointly serve one model instance. Prism’s global scheduler treats each of these groups as a distinct, indivisible resource unit. Idle models are temporarily evicted to CPU DRAM and reactivated when new requests arrive. Prism continuously adjusts its sharing strategies based on runtime workload to maximize overall SLO attainment.

Prism 是一个内存高效、面向低成本多 LLM 服务的 GPU 共享系统。图 3 给出架构与设计概览。前端接收推理请求并路由到对应 LLM。为提高成本效率,Prism 灵活结合空间与时间共享:高请求率模型可独占 GPU,多个低请求率模型可共置在一块 GPU 或一个模型并行 GPU 组内。在 Prism 中,GPU 组是严格的调度边界,即一组紧密耦合、共同服务一个模型实例的 GPU;全局调度器把每组视为独立、不可拆分的资源单位。空闲模型暂时驱逐到 CPU DRAM,新请求到来时再激活。Prism 持续根据运行时负载调整共享策略,最大化整体 SLO 达成率。
039

Prism achieves this with two key designs for flexible, demand-aware cross-model memory sharing and coordination. First, it introduces a balloon driver, referred to as kvcached (§5) that enables flexible and efficient memory sharing between models, forming the foundation for rapid adaptation to workload variations and policy changes. Second, Prism optimizes the overall resource allocation through a memory-centric control plane that uses a combination of (1) load-aware model placement (§6.1) that maximizes memory headroom for GPUs to facilitate ballooning and (2) slack-aware request arbitration that prioritizes requests on each GPU for maximizing SLO attainment (§6.2).

Prism 通过两项关键设计实现灵活、需求感知的跨模型内存共享与协调。第一,引入名为 kvcached 的气球驱动(§5),使模型间内存共享灵活且高效,成为快速适应负载与策略变化的基础。第二,以一个内存中心的控制平面优化整体资源分配:结合负载感知的模型放置(§6.1),最大化 GPU 可供气球伸缩的内存余地;以及余量感知的请求仲裁,对每个 GPU 上的请求排优先级,最大化 SLO 达成率(§6.2)。
040

Relation with autoscaling.  Prism is orthogonal to and can be seamlessly integrated with autoscaling [58, sgl-project-ome, 4, 23]. Prism focuses on efficiently sharing GPUs between models (replicas) while autoscaling automatically scales up/down the number of model replicas.

与自动伸缩的关系。Prism 与自动伸缩[58,sgl-project-ome,4,23]正交,可以无缝集成。Prism 关注模型(副本)之间如何高效共享 GPU;自动伸缩则自动增加或减少模型副本数量。
Refer to caption
Figure 3: The system architecture and design overview of Prism.
图3:Prism 系统架构与设计概览。

5 GPU Memory Ballooning for Multi-LLMs5 面向多 LLM 的 GPU 内存气球机制

041

This section describes how Prism enables flexible cross-model memory sharing with our balloon driver, providing a foundation for adapting policies to dynamic workloads.

本节介绍 Prism 如何通过气球驱动实现灵活的跨模型内存共享,为根据动态负载调整策略奠定基础。

5.1 Requirements and Challenges5.1 要求与挑战

042

Mainstream LLM serving engines [63, 21] adopt block-based KV token management (e.g., PagedAttention [21]). While this design effectively reduces request-level memory fragmentation within a single LLM, it requires the application (serving engine) to manage the GPU physical memory directly, by pre-allocating a large portion of GPU memory as the KV block pool. This memory thus remains occupied even when there is no active request, and the KV blocks within the tensor are unused. This prevents the redistribution of unused memory across different LLMs, limiting the ability to support flexible time- and space-sharing among multiple LLMs. This leads to four key requirements for Prism.

主流 LLM 服务引擎[63,21]采用基于块的 KV token 管理,例如 PagedAttention[21]。该设计虽能有效减少单个 LLM 内部的请求级内存碎片,却要求应用,即服务引擎,直接管理 GPU 物理内存,预先将较大一部分 GPU 内存分配为 KV 块池。因此,即使没有活跃请求、张量内的 KV 块未被使用,这些内存仍被占据。不同 LLM 之间无法重新分配这些未用内存,限制了灵活的时间与空间共享。这引出 Prism 的四项关键要求。
043

R1: Fast memory reallocation between model weights and KV cache.  When a model is swapped out, the memory released by its weights should be quickly repurposed by other models as KV cache. Similarly, when an idle model is reactivated upon new requests, the running models must promptly release unused KV cache memory for the new model’s weights and KV cache. However, this is hard with statically reserved KV pool tensors, whose physical GPU memory cannot be partially released. A workaround is to copy active token blocks into a smaller tensor and then destroy the old one. However, this not only requires waiting for the slow copy to complete, but also demands enough GPU memory to hold both tensors during the transient period.

R1:在模型权重和 KV 缓存之间快速重新分配内存。模型换出时,其权重释放的内存应迅速改作其他模型的 KV 缓存。空闲模型因新请求重新激活时,运行中的模型也必须及时释放未用 KV 缓存,为新模型的权重与 KV 缓存腾出空间。但静态预留的 KV 池张量很难做到这一点,因为其 GPU 物理内存不能部分释放。一种变通方法是把活跃 token 块复制到较小张量,再销毁旧张量;然而,这既要等待缓慢的复制,还要求过渡期间有足够的 GPU 内存同时容纳两个张量。
044

R2: KV cache sharing across diverse model architectures.  For models colocated on a GPU, their KV cache memory should be flexibly shared; e.g., unused KV cache memory from one LLM can be easily reused by others. However, LLMs often have diverse KV cache layouts, resulting in different tensor shapes, e.g., different head dimensions and number of attention heads. Therefore, simply using a pool of unified KV tensors across models is infeasible: different token sizes lead to misaligned tensor shapes, and different layer counts cause inconsistent numbers of tensors.

R2:跨不同模型架构共享 KV 缓存内存。同一 GPU 上共置的模型应能灵活共享 KV 缓存内存,例如一个 LLM 未使用的 KV 缓存内存应容易被其他模型复用。但是,各 LLM 的 KV 缓存布局常不相同,张量形状也不同,例如头维度、注意力头数不同。因此,不能简单让所有模型使用统一的 KV 张量池:token 大小不同会导致张量形状不对齐,层数不同又导致张量数量不一致。
045

R3: Minimal redistribution overhead and memory fragmentation.  Since memory redistribution may occur frequently, it must incur low overhead while minimizing fragmentation to improve utilization. This rules out a strawman design that splits the reserved KV pool tensor into multiple smaller segments so that free segments from one model can be reused by another. This is because choosing the segment size is inherently challenging: too many small segments increase second-level indexing overhead, while too few large segments cause severe fragmentation.

R3:尽量降低再分配开销和内存碎片。内存再分配可能频繁发生,因此必须低开销、少碎片,以提高利用率。这排除了一个简单方案:把预留 KV 池张量分成多个小片段,让模型之间复用空闲片段。原因在于片段大小难以选择:小片段太多会增加二级索引开销,大片段太少又会造成严重碎片。
046

R4: Transparent to existing serving frameworks.  The new mechanism should remain fully compatible with existing serving frameworks, where the KV block pool is allocated as large tensors, and require no changes to attention kernels. The previously mentioned segment-based method violates this requirement, as it splits the tensor into segments, which necessitates extensive kernel modifications.

R4:对现有服务框架透明。新机制应与现有框架完全兼容,仍把 KV 块池表现为大张量,并且不要求修改注意力内核。前述分段方案违背这一要求,因为张量被拆成片段后,需要大幅修改内核。
047

Summary.  Multi-LLM serving must efficiently cope with heterogeneous memory demands (e.g., different model weights and KV token blocks), each with distinct semantics (e.g., head dimensions and layer counts) and lifecycles. Existing single-LLM systems manage GPU memory entirely at the application level, imposing their own semantics on top of a fixed GPU allocation. This approach works well for a single model, which can efficiently manage its memory in isolation. In multi-LLM settings, however, such isolation becomes a barrier, as memory needs to be shared and reallocated across models dynamically to accommodate bursty group behavior and workload volatility.

小结。多 LLM 服务必须高效处理异构内存需求,例如不同模型权重与 KV token 块;它们的语义,例如头维度和层数,以及生命周期各不相同。现有单 LLM 系统完全在应用层管理 GPU 内存,在固定 GPU 分配上施加自身语义。这对单模型行之有效,可以独立高效管理内存;但在多 LLM 中,这种隔离成为障碍,因为为应对突发模型组和负载波动,内存必须能跨模型动态共享、重新分配。
Refer to caption
Figure 4: Memory ballooning for effective multi-LLM serving.
图4:通过内存气球实现高效多 LLM 服务。

5.2 Solution: GPU Memory Ballooning5.2 解决方案:GPU 内存气球

048

To meet all the above requirements, our key insight is that memory management should be pushed down to the GPU runtime level. At this level, the system can treat all models uniformly, allowing GPU memory to be transparently redistributed across models, while applications manage only the memory allocated to them with their own semantics.

为满足上述所有要求,我们的关键洞见是把内存管理下移到 GPU 运行时层。在该层,系统可统一对待所有模型,透明地在模型间重新分配 GPU 内存;应用则只需按自身语义管理分到的内存。
049

Building on this idea, Prism introduces a balloon driver, named kvcached, which sits as a shim between inference engines and GPU memory. Open sourced at https://github.com/ovg-project/kvcached, kvcached manages the entire GPU physical memory for LLM serving, including both model weights and the KV cache pool. Meanwhile, kvcached reserves a large contiguous virtual address space for each engine, which presents it to the engine as if it were dedicated GPU memory. On top of this reserved space, kvcached translates application-level semantics (e.g., weights, KV caches, and intermediate buffers) into allocations of physical GPU memory pages. Physical pages are created only on demand and mapped to virtual addresses lazily, allowing memory to expand and shrink as workloads change, as illustrated in Figure 4.

据此,Prism 引入名为 kvcached 的气球驱动,作为推理引擎与 GPU 内存之间的中间层。kvcached 已在 https://github.com/ovg-project/kvcached 开源,管理 LLM 服务使用的全部 GPU 物理内存,包括模型权重与 KV 缓存池。同时,它为各引擎预留较大的连续虚拟地址空间,使引擎看来仿佛拥有专用 GPU 内存。在该预留空间上,kvcached 把权重、KV 缓存、中间缓冲等应用语义转换成 GPU 物理页分配。物理页只按需创建,并延迟映射到虚拟地址,使内存能随负载扩大或缩小,如图 4。
050

Specifically, kvcached meets all the requirements in §5.1 through the following designs.

具体而言,kvcached 通过以下设计满足 §5.1 的全部要求。
051

D1: Unified model weights and KV cache management.  kvcached achieves fast memory redistribution between model weights and KV cache through unified virtual and physical memory management. Since kvcached-managed memory is agnostic to application semantics, both weights and KV cache can be seamlessly reallocated across engines. Moreover, kvcached dynamically adjusts physical memory limits: when an evicted model is reactivated, it shrinks the limits of other models on the same GPU, bounding their allocations and immediately freeing space for the new model. The opposite happens when a model is evicted.

D1:统一管理模型权重与 KV 缓存。kvcached 通过统一的虚拟与物理内存管理,在权重和 KV 缓存间快速重新分配内存。其管理不依赖应用语义,因此权重与 KV 缓存所占内存都可以无缝地在引擎之间重新分配。此外,它动态调整物理内存限额:被驱逐的模型重新激活时,收缩同一 GPU 上其他模型的限额,约束其分配并立即为新模型腾出空间;模型被驱逐时则反向操作。
052

D2: Automatic token block mapping.  To support models with different layer counts and token sizes, kvcached employs an internal KV cache manager to map token blocks onto underlying virtual and physical GPU pages. Prism assigns token blocks to available slots within a virtual page, or allocates a new physical page when necessary. To prevent size conflicts and ensure portability across architectures, the KV cache manager further segregates token blocks from different models onto distinct memory pages.

D2:自动映射 token 块。为支持不同层数与 token 大小的模型,kvcached 使用内部 KV 缓存管理器,把 token 块映射到下层 GPU 虚拟页和物理页。Prism 把 token 块分配到虚拟页的可用槽位,必要时分配新物理页。为避免大小冲突并支持不同架构,KV 缓存管理器进一步将不同模型的 token 块隔离到不同内存页。
053

D3: Overhead and fragmentation optimizations.  kvcached minimizes memory redistribution overhead and fragmentation through three key optimizations. First, mainstream serving frameworks maintain separate K and V tensors per layer, requiring 2​L2L page allocations across all layers each time. To reduce this overhead, kvcached reorganizes the memory layout in virtual space, so that all layers’ K and V vectors of a token are stored in contiguous virtual space, requiring only one batch allocation for all pages (2L×2L\times speedup). Second, kvcached uses a pre-allocation thread to asynchronously prepare a small buffer of GPU pages. Engines draw new pages from this buffer first, while released pages are returned to it and only physically freed if the buffer exceeds its limit or memory must be reclaimed for a new model. Finally, to reduce fragmentation, kvcached uses 2MB memory pages, and prioritizes using partially filled pages.

D3:优化开销与碎片。kvcached 采用三项关键优化。首先,主流框架为每层分别维护 K、V 张量,每次操作跨所有层需要 2L 次页分配。kvcached 重新组织虚拟内存布局,使一个 token 在所有层的 K、V 向量位于连续虚拟空间,只需一次批量分配全部页,得到 2L 倍加速。其次,用预分配线程异步准备少量 GPU 页缓冲。引擎优先从该缓冲拿新页,释放的页归还缓冲;只有缓冲超过上限或需要为新模型回收内存时,才真正释放物理页。最后,使用 2 MB 内存页并优先填充未满页,以减少碎片。
054

D4: Elastic tensor abstraction.  kvcached ensures transparency with existing LLM serving frameworks by introducing an elastic tensor (eTensor) abstraction, implemented via PyTorch’s extension interface to abstract away the details of physical page allocation from the serving engine. Elastic tensors can be used exactly like regular PyTorch tensors, requiring no modifications to attention kernels and remaining fully compatible with CUDA graph optimizations commonly used in LLM serving frameworks.

D4:弹性张量抽象。kvcached 引入弹性张量(eTensor),经 PyTorch 扩展接口实现,把物理页分配细节从服务引擎中隐藏起来,保证对现有框架透明。弹性张量可像普通 PyTorch 张量一样使用,不必修改注意力内核,并与服务框架常用的 CUDA Graph 优化完全兼容。

5.3 Fast Model Loading5.3 快速模型加载

055

Model swapping speed directly impacts the flexibility of GPU sharing. High latency can hinder the timely swapping of models with strict SLOs, limiting policy adaptability. While deactivation is straightforward, i.e., terminating the engine and releasing all memory, reactivation is more complicated, which involves: (1) initializing a new serving engine and reserving a new virtual address space for KV cache pool; and (2) loading the model weights from CPU DRAM. If done naïvely, this process can take tens of seconds—far exceeding the TTFT SLOs of online LLM inference, which are often within a few seconds or less.

模型换入换出速度直接影响 GPU 共享的灵活性。高延迟会妨碍严格 SLO 模型及时换入,限制策略适应能力。停用相对简单,即终止引擎并释放全部内存;重新激活则更复杂,包括:(1)初始化新服务引擎,为 KV 缓存池预留新虚拟地址空间;(2)从 CPU DRAM 加载模型权重。朴素实现可能耗时数十秒,远超在线 LLM 推理通常只有数秒乃至更短的 TTFT SLO。
056

Reusable engine pools.  The root cause of (1) lies in the tight coupling between the engine and the model it serves. In current systems, an engine shares the same lifecycle as its model—when a model is evicted, its engine is also terminated, along with its virtual address space. As a result, every model activation incurs the full cost of engine initialization.
Prism eliminates this overhead by decoupling the lifecycles of the engines and models. Specifically, it maintains an engine pool on each GPU, where engines are pre-initialized with virtual address space and distributed contexts. Upon model activation, Prism selects an available engine from the pool and starts model loading directly. When a model is evicted, its physical memory is released, but its engine with virtual address space is returned to the engine pool for future reuse.
However, an engine cannot directly reuse previously reserved virtual memory space to serve a new model. This is because current inference engines perform index-based token access, which depends on a model-specific memory layout that is incompatible with models of different architectures, e.g., different numbers of layers or token sizes. To address this, Prism introduces a KV cache virtual memory manager to manage the pre-reserved virtual memory spaces in the engine pool. When a new model is loaded, the manager dynamically aligns the reserved virtual space to match the memory layout required by the new model (one-time effort), and then creates a new kvcached based on the aligned memory spaces. The kvcached can then correctly and efficiently locate the virtual memory page where each token resides during inference.

可复用引擎池。步骤(1)的根因是引擎与其服务模型紧密耦合。当前系统中二者生命周期相同:模型被驱逐时,引擎及其虚拟地址空间也一同终止,所以每次激活都要支付完整初始化成本。Prism 将二者生命周期解耦:各 GPU 维护一个引擎池,其中引擎已预先初始化虚拟地址空间和分布式上下文。模型激活时,选择可用引擎,直接加载模型;模型驱逐时,释放物理内存,但把保留虚拟地址空间的引擎放回池中复用。不过,引擎不能直接沿用原先预留的虚拟空间来服务新模型,因为当前推理引擎按索引访问 token,依赖模型特有的内存布局,无法兼容层数或 token 大小不同的架构。为此,Prism 引入 KV 缓存虚拟内存管理器,管理池内预留空间。加载新模型时,一次性动态对齐这些空间以匹配新模型所需布局,再据此创建新的 kvcached。随后,推理中便能正确、高效定位各 token 所在的虚拟页。
057

Parallel model weight loading.  The time spent on (2) model weight loading is heavily influenced by the utilization of the CPU–GPU interconnect bandwidth. We found that loading models naïvely via the cudaMemcpyAsync API to a GPU fails to saturate the interconnect bandwidth, even when invoked from multiple threads. This may be due to all cudaMemcpyAsync operations targeting the same GPU executing serially, limited by the CUDA driver and hardware.
Prism overcomes this bottleneck by chunking model weights into smaller segments, loading them in parallel across multiple GPUs on the same node, and then aggregating them to the target GPU via high-speed NVLink interconnects. This parallelized strategy significantly accelerates model loading. To minimize interference with running workloads on GPUs, Prism partitions model weights at the granularity of individual weight tensors and loads them in a streaming fashion. As a result, each GPU only needs to maintain a small buffer (e.g., 30MB), minimizing possible memory contention.

并行加载模型权重。步骤(2)耗时很大程度取决于 CPU–GPU 互连带宽利用率。我们发现,朴素地用 cudaMemcpyAsync 向一块 GPU 加载模型,即使用多线程调用,也无法用满互连带宽。这可能因为面向同一 GPU 的所有 cudaMemcpyAsync 操作受 CUDA 驱动和硬件限制而串行执行。Prism 将权重分成较小片段,在同一节点的多块 GPU 上并行加载,再通过高速 NVLink 汇聚到目标 GPU,以克服瓶颈,显著加速加载。为减少对现有 GPU 负载的干扰,Prism 按单个权重张量粒度分块,并以流式方式加载。于是每块 GPU 只需保留一个很小的缓冲,例如 30 MB,尽量减小内存争用。

6 A Memory-Centric Control Plane6 以内存为中心的控制平面

058

The memory ballooning mechanism in §5 provides the elasticity needed to unify spatial and temporal sharing, but leveraging it effectively requires policies that adapt to evolving bursty groups and volatile request patterns. Our goal is to improve memory efficiency and maximize SLO attainment for TTFT and TPOT through coordinated memory sharing. Because TTFT and TPOT can interfere [64], we prioritize TTFT, whose prompt length is known, while noting that the resulting improvements in resource scheduling also benefit TPOT by reducing memory-induced preemptions.

§5 的内存气球机制提供了统一空间、时间共享所需的弹性,但要有效利用它,策略必须适应不断变化的突发模型组和多变请求。我们的目标是通过协调内存共享,提高内存效率,最大化 TTFT 与 TPOT 的 SLO 达成率。由于两者可能相互干扰[64],我们优先考虑提示长度已知的 TTFT;同时指出,资源调度改善也会减少内存不足导致的抢占,从而有利于 TPOT。
059

Challenges.  Unifying time and space sharing complicates scheduling because decisions must jointly span models, requests, and tokens, all of which shape GPU memory usage and latency. These layers are tightly coupled: model residency sets memory availability, request concurrency determines consumption, and token execution affects both utilization and SLOs. Optimizing any one dimension in isolation—e.g., maximizing colocation or strictly protecting SLOs—can destabilize the others. Consequently, time- and space-sharing choices form a large, interdependent decision space where placement, memory pressure, and request scheduling continually interact in non-trivial ways.

挑战。统一时间与空间共享使调度复杂化,因为决策必须联合跨越模型、请求、token 三层,它们共同决定 GPU 内存使用与延迟。这些层次紧密耦合:模型是否驻留决定内存可用量,请求并发决定消耗,token 执行影响利用率和 SLO。孤立优化任何一个维度,例如最大化共置或严格保护 SLO,都会使其他维度失稳。因此,时间与空间共享构成庞大、相互依赖的决策空间,模型放置、内存压力和请求调度在其中持续发生复杂交互。
060

A natural formulation of this problem is a joint optimization over model placement, request scheduling, and memory allocation (e.g., via an ILP), but this quickly becomes intractable. The placement space alone is enormous: with MM models and NN GPUs, there are NM possible assignments even before considering migration decisions. Request scheduling is likewise combinatorial, as differing prompt lengths, arrival times, SLOs, output lengths, and engine states yield a factorial explosion in possible execution orders. Moreover, placement and scheduling are tightly coupled—migrating even one model changes which GPUs can serve which requests and how KV caches evolve, thereby altering future scheduling decisions. All of this must be decided online, with the scheduler observing only recent arrivals while lacking knowledge of future bursts, output lengths, or concurrency.

一种自然建模是联合优化模型放置、请求调度和内存分配,例如使用整数线性规划(ILP),但很快就难以求解。仅放置空间已极大:M 个模型、N 块 GPU,即便尚未考虑迁移,也有 N 的 M 次方种分配。请求调度同样是组合问题,不同提示长度、到达时间、SLO、输出长度和引擎状态,使可能执行次序呈阶乘爆炸。此外,放置和调度紧密耦合:哪怕只迁移一个模型,也会改变哪些 GPU 能服务哪些请求、KV 缓存如何演化,从而改变后续调度。而这一切必须在线决策,调度器只能观察近期到达,无法预知未来突发、输出长度或并发度。
061

Insight.  Our key insight is that this complexity simplifies when managed through a memory-centric lens. Models, requests, and tokens influence system behavior primarily through how they consume and contend for GPU memory, while SLO attainment is directly governed by the availability of that memory at execution time. By making memory the central optimization target, we unify multiple interacting objectives, utilization efficiency, latency control, and stability, under a single principle: controlling memory contention. This reduces a multi-metric, multi-level scheduling problem into a tractable design centered on memory management.

洞见。我们的关键认识是,采用以内存为中心的视角,可以简化上述复杂性。模型、请求、token 主要通过消耗和争用 GPU 内存影响系统行为;SLO 达成率则直接受执行时内存可用性支配。以内存作为核心优化目标,可以将利用效率、延迟控制与稳定性等相互作用的目标,统一到“控制内存争用”这一原则下,把多指标、多层级调度问题变成可处理的内存管理设计。
062

Memory contention manifests at multiple scopes: cluster-level model activity drives coarse-grained memory demand, while fine-grained request dynamics determine SLO outcomes. No single control loop can manage both effectively, motivating a memory-centric hierarchical scheduler: a macro, cluster-level plane that shapes memory pressure via model placement, and a micro, GPU-level plane that allocates memory per request to satisfy heterogeneous SLOs. Coordinating these layers enables Prism to maintain high utilization and robust SLO attainment.

内存争用存在于多个范围:集群级模型活跃情况驱动粗粒度内存需求,细粒度请求动态决定 SLO 结果。单一控制循环不能同时有效处理两者,因此需要以内存为中心的分层调度器:宏观集群平面通过模型放置塑造内存压力;微观 GPU 平面按请求分配内存,以满足不同 SLO。协调两层,使 Prism 保持高利用率和稳健的 SLO 达成率。

6.1 Load-Aware Model Placement6.1 负载感知的模型放置

063

The objective of the global model placement strategy is to place models across GPUs to maximize the headroom available for memory ballooning. If too many models from the same active bursty group are colocated, they will simultaneously demand memory for KV-cache expansion, leading to severe contention and out-of-memory errors.

全局模型放置的目标是在各 GPU 上放置模型,最大化可供内存气球伸缩的余地。如果把同一个活跃突发组中的过多模型共置,它们会同时为 KV 缓存扩张请求内存,导致严重争用和内存不足错误。
064

To prevent this, Prism employs a load-aware placement strategy. Because predicting exact memory usage is difficult due to unknown output lengths of LLM inference requests, we utilize a robust heuristic referred to as the KV Pressure Ratio (KVPR). KVPR quantifies the intensity of memory contention on a GPU by comparing the aggregate urgency of memory demand against the remaining capacity, calculated as w​_​t​o​k​e​n​_​r​a​t​es​h​a​r​e​d​_​k​v\frac{w\_token\_rate}{shared\_kv}, where w​_​t​o​k​e​n​_​r​a​t​e=t​o​k​e​n​_​r​a​t​e∗t​o​k​e​n​_​s​i​z​eS​L​Ow\_token\_rate=\frac{token\_rate*token\_size}{SLO} represents the SLO-weighted token memory usage rate of a model, indicating its memory demand per unit time. By counting both input tokens from newly admitted requests and decode tokens produced by running requests per unit time, t​o​k​e​n​_​r​a​t​etoken\_rate captures the full KV-cache growth rate and helps KVPR accurately reflect GPU memory pressure. We use the TPOT SLO for S​L​OSLO because autoregressive decoding dominates generation latency and is especially sensitive to KV-cache memory contention. s​h​a​r​e​d​_​k​vshared\_kv is the memory available for the KV cache on a GPU. A high KVPR indicates a high-pressure GPU where memory ballooning is likely to be stifled.

为避免这一点,Prism 采用负载感知放置策略。LLM 请求输出长度未知,很难准确预测内存使用,因此我们采用称为 KV 压力比(KVPR)的稳健启发式。它用总内存需求紧迫程度与剩余容量之比衡量 GPU 内存争用强度,计算为 w_token_rate / shared_kv,其中 w_token_rate = token_rate × token_size / SLO,是模型按 SLO 加权的 token 内存使用率,表示其单位时间内的内存需求。token_rate 同时计入单位时间新接纳请求的输入 token 与运行请求生成的 decode token,从而覆盖完整的 KV 缓存增长率,帮助 KVPR 反映 GPU 内存压力。SLO 使用 TPOT SLO,因为自回归解码支配生成延迟,对 KV 缓存争用尤其敏感。shared_kv 是 GPU 上可供 KV 缓存使用的内存。KVPR 高,表示该 GPU 压力高,内存气球伸缩容易受限。
065

Algorithm 1 realizes our model placement strategy. Prism prioritizes the most aggressive memory consumers by sorting models in descending order of their SLO-weighted token usage rates w​_​t​o​k​e​n​_​r​a​t​ew\_token\_rate, ensuring that high-demand workloads are allocated resources first (Lines 1–3). For each model, the scheduler identifies the GPU that minimizes the resulting KVPR. This step inherently enforces complementarity: by targeting the device with the lowest existing pressure, Prism effectively colocates high-demand models with low-demand ones, thereby maximizing the capacity available for the high-demand model to balloon its memory usage (Lines 5–8). If the selected GPU differs from the model’s current GPU, Prism migrates the model accordingly. However, this migration incurs overhead from engine switching and model weight loading. To avoid unnecessary migrations with marginal benefit, Prism compares the KVPR of the best and current GPUs, and proceeds only if the improvement exceeds a threshold τ\tau (Line 8). Finally, Prism assigns the model to its selected GPU and updates the corresponding GPU states (Lines 9–12).

算法 1 实现模型放置策略。Prism 按 SLO 加权 token 使用率 w_token_rate 降序排列模型,优先处理最激进的内存消费者,使高需求负载先获得资源(第 1–3 行)。对每个模型,调度器找出放入后 KVPR 最低的 GPU。这样自然实现互补:选择已有压力最小的设备,将高需求模型与低需求模型共置,最大化高需求模型可扩张的容量(第 5–8 行)。若所选 GPU 不同于当前 GPU,就迁移模型;但迁移会带来引擎切换和权重加载开销。为避免收益微小的不必要迁移,Prism 比较最佳与当前 GPU 的 KVPR,仅在改进超过阈值 τ 时迁移(第 8 行)。最后,将模型分配给所选 GPU,并更新 GPU 状态(第 9–12 行)。
066

Analysis.  This greedy approach approximates the optimal solution by bounding the maximum KVPR across the cluster, ensuring that no single GPU becomes a disproportionate bottleneck that stifles memory sharing. A detailed formal analysis is provided in Appendix A.2. The algorithm also seamlessly supports large models utilizing Tensor Parallelism (TP). By treating each TP partition as a distinct scheduling unit with anti-affinity constraints, Prism ensures they are placed on separate GPUs, thereby aggregating memory capacity across devices to satisfy massive KV demands.

分析。该贪心方法通过约束集群最大 KVPR 近似最优解,避免某块 GPU 成为不成比例的瓶颈,扼制内存共享。详细形式分析见附录 A.2。该算法也无缝支持采用张量并行(TP)的大模型:将各 TP 分区视为独立调度单位,并施加反亲和约束,保证它们放在不同 GPU,从而聚合设备间内存容量,满足巨大的 KV 需求。
067

Model eviction and activation.  The placement strategy evicts a model if it remains idle and GPU resources become constrained for other models. Prism performs eviction based on an empirical threshold, which can be determined by analyzing the idle interval distribution; a detailed sensitivity analysis is provided in Appendix A.4. When the model receives new requests, Prism immediately reactivates it by placing it on the GPU with the lowest KV pressure ratio, drawing from a pre-warmed engine pool with reusable distributed contexts and buffers to avoid re-initialization, and using parallel weight loading to keep cold-start latency within TTFT budgets (§5.3).

模型驱逐与激活。当某模型持续空闲,且其他模型的 GPU 资源受限时,放置策略会驱逐该模型。Prism 使用经验阈值,可由空闲间隔分布确定;敏感性分析见附录 A.4。模型收到新请求时,立即把它放到 KVPR 最低的 GPU 上重新激活,使用预热引擎池中可复用的分布式上下文和缓冲避免重新初始化,并通过并行权重加载,把冷启动延迟控制在 TTFT 预算内(§5.3)。
068

Model migration.  Model migration is designed to preserve TTFT during placement changes. Rather than stopping request processing while the destination instance is prepared, Prism keeps the source instance active and continues serving requests until the target is ready. This allows migration latency to be overlapped with ongoing execution, so requests experience only the short switch-over delay. Therefore, Prism’s effectiveness does not depend on fast interconnects. Practically, when the source and target GPUs are connected via NVLink, Prism uses NVLink as an optional shortcut for migrating model weights and resident KV caches. In non-NVLink environments, Prism leverages GPUDirect RDMA [31] if available, or falls back to standard eviction and reactivation, which takes at most a few seconds for <70B models.

模型迁移。迁移设计旨在模型放置变化时保护 TTFT。Prism 不会在目标实例准备期间停止请求处理,而是保持源实例活跃、继续提供服务,直到目标就绪。这样,迁移延迟与执行重叠,请求只经历短暂切换延迟。因此,Prism 的有效性不依赖高速互连。实际部署中,若源和目标 GPU 由 NVLink 相连,Prism 可选用 NVLink 快速迁移模型权重和驻留 KV 缓存。没有 NVLink 时,可用则利用 GPUDirect RDMA[31],否则退回常规驱逐与重新激活;对于小于 70B 的模型,该过程至多耗时数秒。
Algorithm 1 Model Placement to Maximize Memory Headroom.
算法1:最大化内存余量的模型放置。
1: Number of GPUs NN, GPU memory capacity CC, migration threshold τ\tau, and MM models. Each model mjm_{j} has: token rate tjt_{j}, weight wjw_{j}, token size t​zjtz_{j}, current device index gjg_{j}, and latency SLO sjs_{j}.
输入:N块GPU、容量C、迁移阈值τ、M个模型。模型m_j具有token率t_j、权重大小w_j、token大小tz_j、当前位置g_j和延迟SLO s_j。
2: Assign each model to a GPU to balance the resource demand and remaining memory capacity.
输出目标:将各模型分配到GPU,平衡资源需求与剩余容量。
3: Sort models by tj∗t​zjsj\frac{t_{j}*tz_{j}}{s_{j}} in descending order. Denote the sorted sequence as m1,m2,…,mMm_{1},m_{2},\dots,m_{M}.
按 t_j×tz_j/s_j 降序排列模型,记为m₁,…,m_M。
4: for i=1i=1 to NN do
遍历GPU i=1至N。
5:   s​h​a​r​e​d​_​k​vi←Cshared\_kv_{i}\leftarrow C; w​_​t​o​k​e​n​_​r​a​t​ei←0w\_token\_rate_{i}\leftarrow 0
初始化 shared_kv_i←C,w_token_rate_i←0。
6: for k=1k=1 to MM do
遍历模型 k=1至M。
7:   /* find the GPU b​e​s​t​_​i​d​xbest\_idx that minimizes KVPR */
寻找使KVPR最小的GPU best_idx。
8:   b​e​s​t​_​r,b​e​s​t​_​i​d​x←(min, argmin)​w​_​t​o​k​e​n​_​r​a​t​eis​h​a​r​e​d​_​k​vibest\_r,\ best\_idx\leftarrow\text{(min, argmin)}\frac{w\_token\_rate_{i}}{shared\_kv_{i}}
best_r、best_idx←各GPU的w_token_rate_i/shared_kv_i的最小值及对应下标。
9:   c​u​r​r​e​n​t​_​r←w​_​t​o​k​e​n​_​r​a​t​egks​h​a​r​e​d​_​k​vgkcurrent\_r\leftarrow\frac{w\_token\_rate_{g_{k}}}{shared\_kv_{g_{k}}}
current_r←当前GPU g_k的KVPR。
10:   b​e​s​t​_​g​p​u←{b​e​s​t​_​i​d​x,if ​c​u​r​r​e​n​t​_​r−b​e​s​t​_​r>τgk,otherwisebest\_gpu\leftarrow\begin{cases}best\_idx,&\text{if }current\_r-best\_r>\tau\\ g_{k},&\text{otherwise}\end{cases}
若current_r−best_r>τ,选best_idx,否则保留g_k。
11:   Assign model mkm_{k} to b​e​s​t​_​g​p​ubest\_gpu
将模型m_k放置到best_gpu。
12:   w​_​t​o​k​e​n​_​r​a​t​eb​e​s​t​_​g​p​u←w​_​t​o​k​e​n​_​r​a​t​eb​e​s​t​_​g​p​u+rkskw\_token\_rate_{best\_gpu}\leftarrow w\_token\_rate_{best\_gpu}+\frac{r_{k}}{s_{k}}
将best_gpu的w_token_rate加上r_k/s_k。【原文此处r_k与输入t_j、tz_j的关系未在算法中明确,保留待核对。】
13:   s​h​a​r​e​d​_​k​vb​e​s​t​_​g​p​u←s​h​a​r​e​d​_​k​vb​e​s​t​_​g​p​u−wkshared\_kv_{best\_gpu}\leftarrow shared\_kv_{best\_gpu}-w_{k}
从best_gpu的shared_kv中减去w_k。
14: return Model-to-GPU placement
返回模型到GPU的放置关系。

6.2 Slack-Aware Request Arbitration6.2 时间余量感知的请求仲裁

069

While global placement balances demand, memory contention arises locally when resident models process requests concurrently. Under unified sharing, strict isolation causes fragmentation, whereas uncontrolled sharing risks starvation, with urgent requests blocked by long-running ones. Models on the same GPU may compete for KV cache memory, and without coordination a high-rate, relaxed-SLO model can monopolize memory and degrade SLO attainment for stricter workloads.

全局放置虽然平衡需求,但驻留模型并发处理请求时,仍会发生本地内存争用。统一共享下,严格隔离会产生碎片,失控共享又可能造成饥饿:紧急请求被长期运行请求阻挡。同一 GPU 上模型竞争 KV 缓存;若缺少协调,高请求率、宽松 SLO 的模型可能垄断内存,损害更严格负载的 SLO 达成率。
070

A naïve approach is to cap each model’s memory usage, but choosing appropriate limits is difficult under dynamic workloads and heterogeneous SLOs: conservative caps throttle throughput, while generous ones starve other models. Adapting limits at runtime helps but cannot take effect immediately, since memory must be freed by completing in-flight requests—a process that can take seconds depending on request length and load. This coordination challenge arises because each engine maintains its own queue and greedily schedules requests as memory becomes available.

一种简单方法是限制每个模型的内存,但在动态负载、异构 SLO 下,限额很难选择:过低会限制吞吐,过高会让其他模型缺资源。运行时调整有帮助,却不能立即生效,因为必须等待在途请求完成才能释放内存;这可能随请求长度、负载而耗时数秒。协调困难源于每个引擎维护自己的队列,只要内存可用就贪心调度请求。
071

To resolve this, Prism employs a slack-aware request arbitration strategy. Instead of maintaining separate queues per model, Prism uses a shared per-GPU request queue that arbitrates access to each GPU’s physical memory pool to coordinate the memory usage for heterogeneous SLO requests. Our goal is to prioritize requests that are most critical for maximizing SLO attainment. Prism goes beyond simple deadline prioritization by leveraging the exact time slack of each request, which is defined as the buffer between a request’s deadline and its required execution time.

为此,Prism 采用时间余量感知的请求仲裁。不再为每个模型分别排队,而是使用每 GPU 共享请求队列,仲裁 GPU 物理内存池的使用权,协调异构 SLO 请求的内存占用。目标是优先处理对最大化 SLO 达成率最关键的请求。Prism 不只简单按截止时间排序,而是利用每个请求的精确时间余量,即截止时间与所需执行时间之间的缓冲。
072

With both the deadline (drd_{r}) and execution cost (ere_{r}) known, Prism transforms the scheduling challenge into a classic deadline problem. We adopt the Moore-Hodgson algorithm [25], which minimizes the number of deadline misses. As shown in Algorithm 2, given a set of requests RR, Prism first sorts them in ascending order of their prefill completion deadlines (Line 1). Then, for each request in the sorted list, Prism appends it to the schedule list SS and checks whether it can finish within its TTFT SLO (Lines 3-7). If the most recently added request cannot meet its deadline, Prism evicts the request in SS with the longest execution time (Lines 9–11). It then moves to the next request and continues this process until evaluating all requests. Finally, Prism dispatches the accepted requests in SS following their order in the schedule.

在截止时间 d_r 和执行成本 e_r 已知时,Prism 把调度转化为经典截止时间问题,采用使错过截止时间的任务数量最少的 Moore–Hodgson 算法[25]。如算法 2,给定请求集合 R,先按 prefill 完成截止时间升序排列(第 1 行)。再依次把请求加入调度列表 S,检查是否能在 TTFT SLO 内完成(第 3–7 行)。若最新加入的请求不能按时完成,就从 S 中移除执行时间最长的请求(第 9–11 行),然后继续检查后续请求。遍历完成后,按 S 中次序派发接纳的请求。
Algorithm 2 GPU-Local Request Scheduling
算法2:GPU 本地请求调度。
1: A set of nn requests R={r1,r2,…,rn}R=\{r_{1},r_{2},\dots,r_{n}\}. Each request rir_{i} has: a prompt length pip_{i}, a chunked-prefill speed cic_{i} determined by the model serves it, a TTFT SLO sis_{i}, and an arrival time aia_{i}.
输入:请求集R={r₁,…,r_n};各请求有提示长度p_i、由服务模型决定的chunked-prefill速度c_i、TTFT SLO s_i、到达时间a_i。
2: A subset of requests S⊆RS\subseteq R that can be executed in order to maximize TTFT SLO attainment.
输出:可执行的请求子集S⊆R,以最大化TTFT SLO达成率。
3: Sort RR in ascending order of deadlines di=ai+sid_{i}=a_{i}+s_{i}: r1,r2,…,rnr_{1},r_{2},\dots,r_{n} such that d1≤d2≤⋯≤dnd_{1}\leq d_{2}\leq\dots\leq d_{n}.
按deadline d_i=a_i+s_i升序排列R。
4: Initialize S←∅S\leftarrow\emptyset, c​u​r​r​e​n​t​_​t​i​m​e←current\_time\leftarrow Timer.time()
初始化S为空,current_time为Timer.time()。
5: for k=1k=1 to nn do
遍历k=1至n。
6:   Let r←rkr\leftarrow r_{k}, er←prcre_{r}\leftarrow\frac{p_{r}}{c_{r}}
令r←r_k,预计执行时间e_r←p_r/c_r。
7:   Append rr to SS
将r加入S。
8:   Update c​u​r​r​e​n​t​_​t​i​m​e←c​u​r​r​e​n​t​_​t​i​m​e+ercurrent\_time\leftarrow current\_time+e_{r}.
current_time←current_time+e_r。
9:   if c​u​r​r​e​n​t​_​t​i​m​e>ar+srcurrent\_time>a_{r}+s_{r} then
若current_time>a_r+s_r:
10:    /* pop the request with longest execution time */
从候选集里移出执行时间最长的请求。
11:    Let rmax←arg⁡maxr′∈S⁡pr′cr′r_{\text{max}}\leftarrow\arg\max\limits_{r^{\prime}\in S}\frac{p_{r^{\prime}}}{c_{r^{\prime}}}
r_max←S中p/c最大的请求。
12:    Remove rmaxr_{\text{max}} from SS
从S中移除r_max。
13:    Update c​u​r​r​e​n​t​_​t​i​m​e←c​u​r​r​e​n​t​_​t​i​m​e−prmaxcrmaxcurrent\_time\leftarrow current\_time-\frac{p_{r_{\text{max}}}}{c_{r_{\text{max}}}}   
current_time减去r_max的预计执行时间。
14: return SS
返回S。
073

Analysis.  Prism focuses arbitration on TTFT attainment because it gates when a request can start; once admitted, a request runs through decoding under its TPOT SLO, which is governed by memory headroom rather than queue ordering. Long-running decode requests are preempted only when memory is severely constrained, so a single heavy request cannot stall many newly admitted ones, matching the batch scheduling policies of SGLang and vLLM [63, 21].

分析。Prism 将仲裁重点放在 TTFT 达成率上,因为它决定请求何时启动;请求一经接纳,就在 TPOT SLO 约束下执行解码,而 TPOT 主要由内存余地、不是排队顺序支配。只有内存严重受限时,才抢占长时间运行的 decode 请求,避免单个重请求阻塞大量新接纳请求。这与 SGLang、vLLM[63,21] 的批调度策略一致。
074

Request scheduling ensures optimal TTFT attainment when chunked-prefill has prefill running at each inference step. This is because the prefill time ere_{r} of a request rr can be estimated as er=prcre_{r}=\frac{p_{r}}{c_{r}}, allowing us to compute the prefill completion time of any request rir_{i} in a sequence using dri=ari+∑i=1npricrid_{r_{i}}=a_{r_{i}}+\sum_{i=1}^{n}\frac{p_{r_{i}}}{c_{r_{i}}}, where nn is the number of requests (including rir_{i}) waiting for processing. With this information, we can follow the proof of the original Moore-Hodgson algorithm [8] to prove the optimality of our scheduling algorithm. Our admission control ensures prefill runs at each inference step (so no starvation) by admitting a proper number of requests to each engine and preempting long decoding requests.

当分块 prefill 在每一步推理中都执行 prefill 时,该请求调度保证最优 TTFT 达成率。原因是请求 r 的 prefill 时间可估为 e_r = p_r / c_r;于是可按原文公式 d_{r_i} = a_{r_i} + Σ_{i=1}^{n}(p_{r_i}/c_{r_i}),计算序列中请求 r_i 的 prefill 完成时间,其中 n 是等待处理的请求数,包括 r_i。有了这些信息,可以沿用原 Moore–Hodgson 算法[8]的证明,证明本调度算法的最优性。我们的接纳控制通过给各引擎接纳适量请求、抢占长 decode 请求,保证每步推理都执行 prefill,避免饥饿。

7 Evaluation7 评估

075

We implemented a prototype of Prism with ∼\sim10,400 lines of Python and 774 lines of C++ code. As the serving backend, we used SGLang [63], a widely adopted open-source inference engine, and extended it with our elastic memory manager library. The library is built on CUDA VMM APIs [28] and exposes standard KV cache allocation APIs via Python bindings, requiring only 22 lines of changes to integrate with SGLang.

我们用约 10,400 行 Python 和 774 行 C++ 实现 Prism 原型。服务后端使用广泛采用的开源推理引擎 SGLang[63],并用弹性内存管理库扩展它。该库基于 CUDA VMM API[28],通过 Python 绑定暴露标准 KV 缓存分配接口;集成到 SGLang 只需修改 22 行。
076

On the frontend, we used a Redis queue [38] to cache incoming requests from all clients. Prism’s local scheduler dispatches these requests to the serving engines of corresponding models based on Algorithm 2. For tensor-parallel models, the GPU-local scheduler runs only on the first rank, and the resulting scheduling decisions are broadcast to all other ranks to ensure consistency. Prism’s global scheduler operates as a separate Python process, collecting execution metrics from each engine—such as request rates and queue status. It makes scheduling decisions (e.g., model evictions and activations) and communicates them to the engines using ZeroMQ [57].

前端使用 Redis 队列[38]缓存所有客户端的到达请求。本地调度器依照算法 2,将请求派发到相应模型的服务引擎。对张量并行模型,GPU 本地调度器仅运行于第一个 rank,再把调度结果广播到其余 rank,保证一致。全局调度器作为独立 Python 进程运行,收集各引擎的请求率、队列状态等执行指标,作出驱逐、激活等决策,再以 ZeroMQ[57]通知引擎。

7.1 Experimental Setup7.1 实验设置

077

Testbed.  We conducted our experiments on a cluster of four nodes, each equipped with eight NVIDIA H100-80G GPUs interconnected via 600GB/s NVLink. These nodes communicate through a 100Gbps Ethernet network. Each node features two 52-core Intel Xeon Platinum 8480+ CPUs, 1.7 TB of DRAM, and a PCIe Gen5 x16 interface. All nodes run Ubuntu 22.04 with CUDA Toolkit 12.4.

实验平台。集群有四个节点,每节点八块 NVIDIA H100-80G GPU,由 600 GB/s NVLink 互连;节点间使用 100 Gbps 以太网。每节点另有两颗 52 核 Intel Xeon Platinum 8480+ CPU、1.7 TB DRAM 和 PCIe Gen5 x16 接口。所有节点运行 Ubuntu 22.04、CUDA Toolkit 12.4。
078

Baselines.  We compared Prism against four baselines that share GPUs to serve multi-LLMs: (1) Static partition (S-Partition); (2) MuxServe++; (3) QLM [33]; and (4) ServerlessLLM [13]. Note that the original MuxServe is built on vLLM and supports only Llama-2 models. We ported it to SGLang and generalized its memory mechanism with our kvcached to support heterogeneous models, referred to as MuxServe++. We evaluated the performance of MuxServe++ and MuxServe using three Llama-3.1-8B models under different request rates over a 10-minute period: 199 requests/min, 262 requests/min, and 22 requests/min. All experiments were conducted under the same and consistent conditions. The results are shown in Table 2. As we can see, MuxServe++ achieves comparable or even better performance.

基线。我们与四种共享 GPU 的多 LLM 服务方案比较:(1)静态分区 S-Partition;(2)MuxServe++;(3)QLM[33];(4)ServerlessLLM[13]。原 MuxServe 基于 vLLM,仅支持 Llama-2。我们把它移植到 SGLang,并用 kvcached 泛化内存机制以支持异构模型,称为 MuxServe++。用三个 Llama-3.1-8B 模型比较 MuxServe++ 与 MuxServe,三者请求率分别为每分钟 199、262、22 个请求,运行十分钟;全部实验条件保持一致。表 2 表明,MuxServe++ 性能相当,甚至更好。
079
Mean E2E (s)平均端到端时间(秒) P95 E2E (s)P95端到端时间(秒) Req Tput (r/s)请求吞吐量(请求/秒) Token Tput (t/s)token吞吐量(token/秒)
MuxServe 7.40 18.85 7.97 3363.53
MuxServe++ 5.25 12.09 7.98 3353.09
Mean TTFT (s)平均TTFT(秒) P95 TTFT (s)P95 TTFT(秒) Mean TPOT (ms)平均TPOT(毫秒) P95 TPOT (ms)P95 TPOT(毫秒)
MuxServe 1.47 11.04 21.21 31.95
MuxServe++ 0.089 0.320 18.82 33.97
表 2 数值对照。指标依次为平均端到端延迟(秒)、P95 端到端延迟(秒)、请求吞吐(请求/秒)、token 吞吐(token/秒):MuxServe 为 7.40、18.85、7.97、3363.53;MuxServe++ 为 5.25、12.09、7.98、3353.09。其余指标依次为平均 TTFT(秒)、P95 TTFT(秒)、平均 TPOT(毫秒)、P95 TPOT(毫秒):MuxServe 为 1.47、11.04、21.21、31.95;MuxServe++ 为 0.089、0.320、18.82、33.97。
Table 2: Performance comparison of MuxServe and MuxServe++
表2:MuxServe 与 MuxServe++ 的性能比较。
080

Note that general GPU-sharing systems target application-agnostic workloads and cannot be directly compared: they focus on single-GPU sharing rather than cluster-level GPU sharing, and are not designed to optimize LLM serving, which requires both TTFT and TPOT adherence (§8).

通用 GPU 共享系统面向与应用无关的负载,不能直接比较:它们重点是单 GPU 而非集群级共享,也不是为同时遵守 TTFT、TPOT 的 LLM 服务设计的(§8)。
081

Traces and models.  We used two real-world traces, Hyperbolic [19] and Arena-Chat [9]. For each trace, we sampled a representative set of models, including both popular and long-tail models, ensuring their workload characteristics (e.g., popularity distribution and idle patterns) align with the observations in §3. To simulate various scenarios, we scaled the traces by multiplying the number of requests by a factor of NN, increasing the load while preserving the original traffic patterns—a common way used in prior work [22, 11]. In total, we evaluated 58 LLMs as detailed in Table 3. The large-scale experiments (§7.4) use all models, while other evaluations (§7.2—§7.3) select subsets tailored to specific goals.

轨迹与模型。我们使用 Hyperbolic[19] 与 Arena-Chat[9] 两条真实轨迹。对各轨迹抽取一组代表模型,兼顾热门和长尾,保证流行度分布、空闲模式等符合 §3 观察。为模拟不同场景,将请求数乘以因子 N,提高负载同时保持原流量模式,这是既有工作[22,11]的常见做法。总计评估表 3 中的 58 个 LLM。§7.4 的大规模实验使用全部模型,§7.2–7.3 则按目标选择子集。
Model size 1B-3B 4B-8B 9B-30B 31B-70B
#LLMs 43 8 3 4
Table 3: Models used in our evaluation.
表3:评估中使用的模型。
原论文图表,见图注
原论文图表,见图注
原论文图表,见图注
原论文图表,见图注
原论文图表,见图注
原论文图表,见图注
原论文图表,见图注
Figure 5: End-to-end performance comparison on SLO attainments under varying scales of rates, SLOs, and numbers of available GPUs. The dotted vertical lines mark where the system reaches 99% TTFT or TPOT attainment.
图5:在不同请求率倍率、SLO倍率及可用 GPU 数量下,比较端到端 SLO 达成率。竖向虚线标记达到99% TTFT或TPOT达成率的位置。
082

Metrics.  Our primary performance metrics are TTFT and TPOT attainment. To establish SLOs for each model, we first ran its workload on dedicated GPUs to measure its P95 TTFT and TPOT latencies. This process produced TTFT SLOs ranging from 0.04s to 0.13s and TPOT SLOs from 5.2ms to 50.9ms. We then scaled these base values by a factor to evaluate system performance under varying latency requirements, following an approach consistent with prior work [22, 11, 36]. We also reported aggregated throughput. To account for model idle periods, throughput considers the actual time (excluding idle time) spent serving them.

指标。主要性能指标是 TTFT 和 TPOT 达成率。先在专用 GPU 上运行各模型负载,测量 P95 TTFT、TPOT,用来设定 SLO:TTFT 基值范围 0.04–0.13 秒,TPOT 基值 5.2–50.9 毫秒。再按因子缩放这些基值,考察不同延迟要求下的性能,这与既有工作[22,11,36]一致。我们也报告聚合吞吐;为处理模型空闲期,吞吐按实际服务时间计算,不计空闲时间。

7.2 End-to-End Performance7.2 端到端性能

083

We start with the end-to-end performance of Prism under varying request rates, SLO requirements, and GPU supplies.

首先考察不同请求率、SLO 要求和 GPU 供给下,Prism 的端到端性能。
084

SLO attainment vs. request rate.  We first evaluated various inference loads by serving eight models on two shared GPUs. As shown in Figure 5 (first row), Prism consistently outperforms all baselines by maintaining a significantly higher TTFT SLO attainment. On the Hyperbolic trace, Prism supports up to 2.3×2.3\times and 3.5×3.5\times more requests than MuxServe++ and static partitioning, respectively, while still achieving 99% SLO attainment. On the Arena-Chat trace, it handles over 3×3\times more requests than all baselines. The gains stem from KVPR-driven placement, which keeps per-GPU memory pressure low so active models retain headroom under bursty arrivals. MuxServe++’s TTFT SLO attainment drops quickly with higher request rates because it cannot evict idle models or relocate models across GPUs, leading to memory contention and degraded performance.

SLO 达成率与请求率。首先用两块共享 GPU 服务八个模型,评估不同推理负载。图 5 第一行显示,Prism 一贯保持显著更高的 TTFT SLO 达成率,优于全部基线。在 Hyperbolic 轨迹中,达到 99% 达成率的同时,可处理请求数最高分别为 MuxServe++ 和静态分区的 2.3 倍、3.5 倍。在 Arena-Chat 中,可处理请求数超过所有基线的 3 倍。收益来自 KVPR 驱动的放置:维持低 GPU 内存压力,让活跃模型在突发到达时保有余地。MuxServe++ 不能驱逐空闲模型,也不能在 GPU 间重新放置模型,因此请求率升高时内存争用加剧、性能恶化,TTFT 达成率迅速下降。
085

QLM time-shares GPUs by packing pending requests into groups and dispatching each group to a GPU under an SLO-aware stochastic policy, swapping models and preempting unfinished requests whenever consecutive groups target different models. The frequent swapping makes QLM’s TTFT attainment worse than static partitioning.

QLM 将待处理请求打包为组,以 SLO 感知随机策略派发到 GPU,实现时间共享。连续两组指向不同模型时,会换入换出模型并抢占未完成请求。频繁换入换出使其 TTFT 达成率比静态分区还差。
086

ServerlessLLM serves models in a time-sharing manner for serverless workloads: inactive models are unloaded, and newly arriving requests wait until the scheduler reactivates the required model on the server with the fastest startup, selected based on checkpoint locality. Because the full cold-start process still dominates request latency, ServerlessLLM achieves the worst TTFT SLO attainment.

ServerlessLLM 面向无服务器负载,以时间共享服务模型:卸载不活跃模型,新请求等待调度器在启动最快的服务器上重新激活所需模型,位置选择依据 checkpoint 本地性。由于完整冷启动仍支配请求延迟,ServerlessLLM 的 TTFT SLO 达成率最低。
087

Prism maintains high TPOT attainment through its demand-aware scheduler, which balances workloads to reduce memory contention. Although the scheduler explicitly targets TTFT, TPOT benefits as a side effect: TPOT is degraded mainly by oversized batches and memory-induced preemptions, both of which subside once KVPR-balanced placement caps per-GPU memory contention. QLM achieves lower TPOT because it over-batches under high load, increasing per-iteration latency, while ServerlessLLM performs even worse by allowing unbounded batch sizes that further raise P99 TPOT. Both MuxServe++ and static partitioning experience severe memory contention at high request rates, causing frequent preemptions that substantially degrade TPOT.

Prism 的需求感知调度器平衡负载、减小内存争用,因而保持高 TPOT 达成率。虽然调度器显式优化 TTFT,TPOT 也附带受益:TPOT 主要因批过大和内存不足引发的抢占而恶化,而 KVPR 平衡放置限制 GPU 内存争用后,两者都会缓解。QLM 在高负载下过度组批、增加每轮延迟,所以 TPOT 较低;ServerlessLLM 允许无界批大小,进一步提高 P99 TPOT,表现更差。MuxServe++ 与静态分区在高请求率下内存争用严重,频繁抢占,大幅损害 TPOT。
088

SLO attainment vs. SLO requirements.  The middle row of Figure 5 shows the attainment across different SLO targets. As SLO scales up, Prism quickly achieves 99% TTFT and TPOT attainment. In contrast, no baseline achieves 99% TTFT attainment even on the largest SLO scale in this experiment, and their attainment rates do not improve significantly as the scale increases. Among the baselines, MuxServe++ achieves the best TTFT performance, reaching 84.79% and 67.22% attainment on the largest SLO scale for the two traces. The gap to Prism is primarily due to their inflexibility to adapt sharing policies dynamically. The TPOT attainment of all systems increases rapidly as the SLO scale grows because TPOT is less sensitive to memory contention. We also observe that the Hyperbolic trace requires higher SLO scales due to more bursty and heavier request patterns.

SLO 达成率与 SLO 要求。图 5 中间一行展示不同 SLO 目标下的结果。放宽 SLO 后,Prism 很快达到 99% 的 TTFT 与 TPOT 达成率。相比之下,即使本实验中最大的 SLO 缩放倍数,也没有基线达到 99% TTFT,且随倍数增长改善不明显。MuxServe++ 是基线中 TTFT 最好的,最大倍数下两条轨迹分别达到 84.79% 和 67.22%。与 Prism 的差距主要源于无法动态调整共享策略。所有系统的 TPOT 达成率都随 SLO 放宽而迅速上升,因为 TPOT 对内存争用较不敏感。Hyperbolic 的请求更突发、更重,因此需要更大的 SLO 缩放倍数。
089

SLO attainment vs. available GPUs.  Finally, we evaluate performance when provisioning more GPUs. We selected 18 models from Table 3, representing a mix of popular and tail models with diverse load variability. To fully test the flexibility of our scheduling strategy, we included models of varying sizes from 1B to 8B, all of which fit within a single 80GB GPU. This setup enables a wide range of model-sharing combinations across GPUs. As shown in Figure 5 (last row), Prism achieves 99% TTFT and TPOT attainment using only four and five GPUs on the two traces, respectively, demonstrating its effectiveness in improving cost-efficiency while maintaining performance. In comparison, all baselines fail to reach 99% TTFT attainment even with eight GPUs, and only a few baselines achieve 99% TPOT attainment when seven or eight GPUs are provisioned.

SLO 达成率与可用 GPU。最后考察增加 GPU 配给的情况。从表 3 选择 18 个模型,混合热门和长尾,负载变化各异。为充分检验策略灵活性,使用 1B–8B 的不同大小模型,它们都能装进单块 80 GB GPU,允许丰富的跨 GPU 共享组合。图 5 最后一行显示,两条轨迹下 Prism 分别仅用四块、五块 GPU 就达到 99% TTFT 与 TPOT 达成率,说明它能兼顾性能与成本效率。相比之下,所有基线即使用八块 GPU 仍达不到 99% TTFT,仅少数在七或八块 GPU 时达到 99% TPOT。
原论文图表,见图注
原论文图表,见图注
原论文图表,见图注
Figure 6: Benefits of cross-model memory coordination. The first figure shows the request rates. The last two figures shows the total KV memory size and the throughout of the two models.
图6:跨模型内存协调的收益。首图显示请求率,后两图显示两个模型的 KV 内存总容量和吞吐量(原文 throughout 按上下文理解为 throughput)。

7.3 Performance Analysis7.3 性能分析

090

Next, we provide a detailed performance breakdown to analyze the effectiveness of each design in Prism and how each contributes to its strong end-to-end performance.

接下来详细分解性能,分析 Prism 各设计的有效性,以及各自对端到端表现的贡献。
091

Flexible cross-model memory sharing.  We first evaluated the benefits of our flexible cross-model memory sharing by comparing with static partition using a simplified two-model trace extracted from Arena-Chat, shown in Figure 6 (first row). We present the normalized total KV cache usage and aggregated throughput for both methods in the last two rows of Figure 6. As we can see, Prism’s on-demand memory allocation allows it to use more memory for KV cache, particularly after the 20th second, when Model1 experiences low demand while Model2 faces a surge in request rates. The larger KV cache memory enables Prism to achieve higher throughput, as shown in the last row. In contrast, under static partitioning, even when Model1 underutilizes its memory, Model2 cannot leverage the unused memory due to the static allocation boundary.

灵活的跨模型内存共享。先使用从 Arena-Chat 提取的简化双模型轨迹,与静态分区比较,轨迹见图 6 第一行;后两行展示两者归一化总 KV 缓存使用量及聚合吞吐。按需分配使 Prism 能使用更多 KV 内存,特别是第 20 秒后,Model1 需求下降、Model2 请求率激增时。更大的 KV 容量带来更高吞吐,如最后一行。静态分区下,即便 Model1 未充分利用内存,Model2 也不能跨越静态边界使用它。
092

Model placement.  Next, we evaluated the benefits of our global scheduler that conducts model placement. In this experiment, we used two GPUs to serve eight models from Arena-Chat. Figure 7(a) presents the TTFT and TPOT attainment with the global scheduler enabled or disabled. The results show that enabling the global scheduler significantly improves both TTFT and TPOT attainment. To provide further insights, we plot the average KV cache memory available per request as it arrives on each GPU. With the global scheduler enabled, the load is more evenly balanced across the two GPUs, allowing each request to access more KV cache memory on average. In contrast, without the global placement scheduler, the load is imbalanced: GPU1 shows more available memory during the first 600 seconds, while the near-zero availability between the 800th and 1000th seconds indicates that GPU1 is idle while GPU0 is overloaded.

模型放置。接着评估执行模型放置的全局调度器,用两块 GPU 服务 Arena-Chat 中八个模型。图 7(a) 比较启用与禁用全局调度时的 TTFT、TPOT 达成率,启用后两者均明显提高。为深入理解,绘制各 GPU 上请求到达时平均可用 KV 缓存量。启用后,两块 GPU 负载更均衡,每个请求平均获得更多 KV 内存。禁用后负载失衡:前 600 秒 GPU1 可用内存更多;而第 800–1000 秒接近零的可用量,则表明 GPU1 空闲、GPU0 过载。
原论文图表,见图注
(a) Attainment with rate scales
(a) 不同请求率倍率下的达成率
原论文图表,见图注
(b) GPU load status
(b) GPU 负载状态
Figure 7: Effectiveness of global model placement scheduling.
图7:全局模型放置调度的有效性。
原论文图表,见图注
(a) Attainment with SLO scales
(a) 不同 SLO 倍率下的达成率
原论文图表,见图注
(b) Queue length with time
(b) 队列长度随时间变化
Figure 8: Effectiveness of GPU local request scheduling.
图8:GPU 本地请求调度的有效性。
093

Request arbitration.  To evaluate the GPU-local scheduler that prioritizes requests, we use two models: we fix the SLO scale of Model1 to eight and vary the SLO scales of Model2 to evaluate the priority-based admission control in the GPU-local scheduling. Figure 8(a) shows the TTFT attainment as we vary the SLO scale of Model2. Model1 consistently maintains high attainment, and enabling our GPU-local scheduling improves the SLO attainment of Model2 by more than 40%. To dive deeper, we plot the queue length of each model in Figure 8(b) of one experiment run. From the queue lengths, we clearly observe that when the local scheduler is enabled, the system prioritizes Model2’s requests, which are shorter but have stricter SLO requirements.

请求仲裁。为评估决定优先级的 GPU 本地调度器,使用两个模型:固定 Model1 的 SLO 倍数为 8,改变 Model2 的倍数,检验优先级接纳控制。图 8(a) 显示 Model2 的不同 SLO 下 TTFT 达成率。Model1 始终保持高达成率,启用本地调度让 Model2 的达成率提高超过 40%。图 8(b) 绘制其中一次运行的各模型队长,可清楚看到启用后系统优先处理 Model2:它的请求较短,但 SLO 更严格。

7.4 Large-Scale Evaluation7.4 大规模评估

094

Finally, we evaluated how effectively Prism in reducing the cost of multi-LLM serving at scale. We served all 58 models listed in Table 3, following common TP practices for large models: TP=4 for 32B models [46, 45] and TP=4 or 8 for 70B models [24, 2], utilizing 32 GPUs in total. We sampled 58 models from the Arena-Chat trace and the Hyperbolic trace.

最后评估 Prism 如何在大规模多 LLM 服务中降低成本。使用表3列出的全部 58 个模型,按大模型常见 TP 配置:32B 使用 TP=4[46,45],70B 使用 TP=4 或 8[24,2],共使用 32 块 GPU。我们从 Arena-Chat、Hyperbolic 轨迹中抽取这 58 个模型。
原论文图表,见图注
(a) SLO attainment with cluster size scaling
(a) 集群规模变化下的 SLO 达成率
原论文图表,见图注
(b) Number of GPUs needed for 99% SLO attainments
(b) 达到99% SLO达成率所需的GPU数量
Figure 9: SLO attainment and cost saving at large scales.
图9:大规模场景的 SLO 达成率与成本节省。
095

SLO attainments vs. number of GPUs.  Figure 9(a) shows TTFT and TPOT attainment with an increased number of GPUs. Prism outperforms all baselines, achieving nearly 99% TTFT attainment with just 16 GPUs, while MuxServe++ requires 32 GPUs to reach similar performance, and other methods require even more. As the number of GPUs increases, all baselines improve in TTFT and TPOT attainment except QLM. We find this to be related to its suboptimal scheduling algorithm. QLM assigns requests to GPUs without considering which models are already on GPUs; when a queue is empty, it picks the first available GPU, often triggering unnecessary swaps. With more GPUs, this leads to more idle devices and frequent swapping. Its inefficient swapping, which requires engine restart [37], adds significant latency, causing queued requests to miss their SLOs.

SLO 达成率与 GPU 数。图 9(a) 展示增加 GPU 数的结果。Prism 优于全部基线,仅用 16 块 GPU 就达到接近 99% TTFT;MuxServe++ 要 32 块才能达到相近性能,其他方法需要更多。除 QLM 外,基线 TTFT、TPOT 随 GPU 增加而改善。我们发现 QLM 的例外源于次优调度:它分配请求时不考虑 GPU 上已有模型;队列为空时选择第一个可用 GPU,常触发不必要的换入换出。GPU 越多,空闲设备和频繁换入换出越多;低效换入换出又要求重启引擎[37],增加延迟,让排队请求错过 SLO。
原论文图表,见图注
Figure 10: The activation time for models with different sizes. Data is measured on H100 GPUs.
图10:不同大小模型的激活时间,在 H100 GPU 上测量。
096

Cost saving.  Figure 9(b) shows the number of GPUs required to achieve 99% SLO attainments at different SLO scales. If a system fails to achieve 99% attainment with all 32 GPUs, we denote its GPU requirement as “32+”. Prism achieves 99% TTFT SLO attainments with only 16 GPUs when SLO scale is 5 and TPOT SLO scale is 2.0. MuxServe++ needs 20 GPUs to get 99% TTFT SLO attainments with SLO scale ≥\geq 30, while static partition needs even more GPUs or a higher SLO scale. For TPOT, static partition is the best across all baselines, requiring 20 GPUs, while QLM and MuxServe++ need at least 29 GPUs when TPOT SLO scale ≤\leq 3.0.

成本节省。图 9(b) 展示不同 SLO 倍数下达到 99% 所需 GPU 数。若全部 32 块仍达不到,则记为“32+”。Prism 在 TTFT SLO 倍数为 5、TPOT SLO 倍数为 2.0 时,仅用 16 块 GPU 达到相应 99% 达成率。MuxServe++ 需要 20 块 GPU,且 TTFT SLO 倍数至少为 30,才达到 99% TTFT;静态分区需要更多 GPU 或更宽松 SLO。TPOT 方面,静态分区是最好的基线,需要 20 块;当 TPOT SLO 倍数不大于 3.0 时,QLM、MuxServe++ 至少需要 29 块。
原论文图表,见图注
(a) Company A
(a) 公司 A
原论文图表,见图注
(b) Company B
(b) 公司 B
Figure 11: Production results from two companies, showing (a) throughput and (b) revenue per GPU before and after using Prism.
图11:两家公司的生产结果,分别展示使用 Prism 前后的单 GPU 吞吐量(a)和收入(b)。

7.5 System Overhead7.5 系统开销

097

Model activation latency.  We also measured model activation latency from pageable CPU memory for models ranging from 1B to 70B parameters (see §5.3 for more details). Our optimizations significantly reduce activation latency. Prism loads small models (1B∼\sim8B) within 0.7s, a medium-size model (14B) in just 1.3s, and large models (>70B) in 1.5s (Figure 10). These results show that Prism can promptly activate evicted models upon receiving new requests.

模型激活延迟。我们还测量从可分页 CPU 内存激活 1B–70B 模型的延迟,详见 §5.3。优化显著降低延迟:Prism 在 0.7 秒内加载 1B–8B 小模型,14B 中型模型仅需 1.3 秒,原文所称大模型(>70B)为 1.5 秒(图 10)。结果表明,收到新请求时,Prism 能及时激活先前驱逐的模型。
098

Activation and migration frequency.  Over a 10-minute window of the eight-models-on-two-GPUs run, Prism issued 2 idle-driven activations and 3 inter-GPU migrations. Migrations stay off the TTFT critical path: weights and in-flight KV state transfer over NVLink within tens of milliseconds (e.g., ∼\sim20 ms for an 8B model) while the source instance keeps serving. Activations complete within 2 s, well inside the multi-second TTFT SLOs typical of online serving.

激活与迁移频率。在八模型、两 GPU 的十分钟运行窗口中,Prism 发起两次因空闲而驱逐后的激活、三次 GPU 间迁移。迁移不在 TTFT 关键路径上:权重和在途 KV 状态通过 NVLink 在数十毫秒内传输,例如 8B 模型约 20 毫秒,同时源实例继续服务。激活在两秒内完成,低于在线服务通常为数秒的 TTFT SLO。
099

Elastic memory overhead.  We evaluated Prism’s elastic memory overhead in the worst case, where the request rates are constant, leaving no opportunities for dynamic sharing. With two colocated Llama-3.2-3B models on an A100-40G GPU, Prism incurs only 3 ms (4 %) TTFT and 4 ms (13 %) TPOT overhead at a high load of 32 req/s and only 2 ms (3.5 %) TTFT and 3 ms (7 %) TPOT overhead at a high load of 28 req/s (see §A.3), compared to static partitioning.

弹性内存开销。我们在请求率恒定、没有动态共享机会的最坏情况下评估开销。在一块 A100-40G 上共置两个 Llama-3.2-3B,与静态分区比较,高负载每秒 32 个请求时,Prism 仅增加 3 毫秒(4%)TTFT、4 毫秒(13%)TPOT;每秒 28 个请求时,仅增加 2 毫秒(3.5%)TTFT、3 毫秒(7%)TPOT,见附录 A.3。

7.6 Production Workloads7.6 生产工作负载

100

As of December 2025, Prism has been deployed in multiple organizations serving LLM workloads. Figure 11 summarizes deployments at a large tech company (Company A) using Prism on an internal GPU cluster, and a commercial LLM inference provider (Company B) serving external customers. To isolate Prism’s contribution from workload variation, both deployments use shadow workload replay: the same online request stream is mirrored to two identical clusters, one running Prism and the other not, so that the model mix and traffic patterns are held constant across the two arms.

截至 2025 年 12 月,Prism 已在多个组织部署,用于 LLM 负载。图 11 汇总两家部署:一家大型科技公司(公司 A)在内部 GPU 集群使用 Prism;一家商业 LLM 推理提供商(公司 B)服务外部客户。为排除工作负载变化的影响,两家都采用影子负载回放:把同一在线请求流镜像到两个完全相同的集群,一个运行 Prism,另一个不运行,保持两组模型组合和流量模式不变。
101

Figure 11(a) shows Company A’s per-GPU token throughput before and after adopting Prism. Company A serves diverse applications using fine-tuned and off-the-shelf models (3B–70B) on a shared GPU pool. With Prism dynamically adjusting model placement and sharing—without changes to existing inference engines—Company A achieves consistently higher throughput (3.89× on average) over several weeks, with no SLO violations and unchanged tail latency. Figure 11(b) presents results from Company B, which optimizes revenue per GPU under highly variable traffic, computed as the prefill and decode tokens generated in the window priced at the provider’s published per-token rates, normalized by GPU count. Prior to Prism, fragmentation and overprovisioning constrained revenue; after deployment, Prism improves utilization while meeting all SLOs, raising revenue per GPU by 2.86×\times by converting idle capacity into billable tokens.

图 11(a) 展示公司 A 使用 Prism 前后的单 GPU token 吞吐。公司 A 在共享 GPU 池上,以 3B–70B 微调和现成模型服务多种应用。Prism 动态调整模型放置与共享,无需修改既有推理引擎;数周内吞吐持续提高,平均为原来的 3.89 倍,没有 SLO 违反,尾延迟不变。图 11(b) 展示公司 B 的结果:在高度多变流量下优化单 GPU 收入。其计算方式是,把窗口内 prefill、decode token 数按提供商公开的每 token 价格计价,再按 GPU 数归一化。采用前,碎片化和过度配置限制收入;采用后,Prism 在满足全部 SLO 的同时提高利用率,将空闲容量转成可计费 token,使单 GPU 收入达到原来的 2.86 倍。

8 Related Work8 相关工作

102

SLO-aware LLM scheduling. Llumnix [44], SLOs-Serve [6], ExeGPT [32], SAGESERVE [20], DistServe [64], and MELL [35] explore SLO-aware scheduling to improve LLM inference performance. However, they primarily focus on request scheduling or resource allocation for single-model serving, while Prism enables dynamic cross-model memory harvesting for efficient multi-model serving.

SLO 感知 LLM 调度。Llumnix[44]、SLOs-Serve[6]、ExeGPT[32]、SAGESERVE[20]、DistServe[64]、MELL[35]探索 SLO 感知调度以改善 LLM 推理。但它们主要面向单模型请求调度或资源分配;Prism 则提供动态跨模型内存回收,实现高效多模型服务。
103

Memory management in LLM serving. vAttention [34] and vTensor [55] use CUDA virtual memory APIs [28] to decouple physical and virtual memory allocation. However, their purpose is to simplify programming and improve kernel efficiency for single-LLM serving. In addition, they require re-implementing a large portion of the current inference engine stack, while our method preserves compatibility with the widely used PagedAttention [21] mechanism.

LLM 服务内存管理。vAttention[34] 与 vTensor[55] 利用 CUDA 虚拟内存 API[28]解耦物理、虚拟分配,但目标是简化单 LLM 编程、改善内核效率。此外,它们要求重新实现当前推理引擎栈的大量部分,而我们保持与广泛使用的 PagedAttention[21]兼容。
104

GPU sharing techniques. GPU sharing has been extensively studied [60, 59, 26, 43, 17, 16, 51, 56, 50, 54, 18, 7, 62, 5, 47, 22, 11, 13, 33, 52], but largely at the OS or runtime layer for application-agnostic, single-GPU workloads. Compute-centric designs time-slice between latency-critical and best-effort co-tenants [51, 12] or add preemptive scheduling across heterogeneous accelerators [41], whereas Prism targets memory sharing across uniformly latency-critical LLMs spanning multiple GPUs. The closest memory-centric work, MSched [40], schedules GPU–CPU paging after oversubscription, while Prism proactively prevents oversubscription via coordinated placement. Existing multi-LLM solutions remain fragmented: MuxServe [11] supports spatial sharing but pins models to devices even when idle, while Aegaeon [52] performs temporal sharing via prefill–decode disaggregation, requiring weight duplication and struggling with diverse, dynamic access patterns. Prism unifies spatial and temporal sharing through elastic GPU memory management.

GPU 共享技术。GPU 共享已有广泛研究[60,59,26,43,17,16,51,56,50,54,18,7,62,5,47,22,11,13,33,52],但多数位于操作系统或运行时层,面向应用无关的单 GPU 负载。计算中心设计在延迟关键与尽力而为租户之间分时[51,12],或对异构加速器增加可抢占调度[41];Prism 则针对跨多 GPU、同样具有延迟关键需求的 LLM 进行内存共享。最接近的内存中心工作 MSched[40]在超额订阅后调度 GPU–CPU 分页;Prism 通过协调放置,主动避免超额订阅。现有多 LLM 方案仍彼此割裂:MuxServe[11]支持空间共享,但模型空闲时仍固定在设备上;Aegaeon[52]通过 prefill–decode 解耦实现时间共享,需要复制权重,也难适应多样、动态访问。Prism 以弹性 GPU 内存管理统一空间与时间共享。

9 Conclusion9 结论

105

This paper introduces Prism, a multi-LLM serving system that improves cost efficiency while maximizing SLO attainment via GPU sharing. Prism achieves this by enabling flexible memory ballooning, and employing a two-level scheduling algorithm to make efficient use of GPU memory.

本文提出 Prism:一个通过 GPU 共享改善成本效率、最大化 SLO 达成率的多 LLM 服务系统。它提供灵活的内存气球机制,并采用两级调度算法高效利用 GPU 内存。

Acknowledgments致谢

106

We thank the anonymous reviewers for their comments and are particularly grateful to our shepherd Xiaosong Ma for her valuable feedback. We also thank Ion Stoica, Matei Zaharia, Jiangfei Duan, Chenxi Wang, Shi Liu, Zhenting Zhu, and Yicheng Liu for their discussions and insights. We are grateful to Hyperbolic, Novita AI, Chatbot Arena, NVIDIA, and the SGLang open-source community for production traces and hardware support. This work was supported by an Amazon AI Fellowship (awarded to Shan Yu), the National Science Foundation (CNS-1763172, CNS-2007737, CNS-2006437, CNS-2106838, CNS-2147909, CNS-2128653, CNS-2301343, CNS-2330831, CNS-2403254, IIS-2546642), the Alibaba Research Intern Program, and gifts to Sky Computing Lab from industry partners (Accenture, AMD, Anyscale, Cisco, Google, IBM, Intel, Intesa Sanpaolo, Lambda, Lightspeed, Mibura, Microsoft, NVIDIA, Samsung SDS, and SAP). Junyi Shu, Jiarong Xing, Harry Xu, and Ying Sheng are the corresponding authors.

致谢。感谢匿名审稿人的意见,特别感谢 shepherd Xiaosong Ma 的宝贵反馈。感谢 Ion Stoica、Matei Zaharia、Jiangfei Duan、Chenxi Wang、Shi Liu、Zhenting Zhu、Yicheng Liu 的讨论与见解。感谢 Hyperbolic、Novita AI、Chatbot Arena、NVIDIA 及 SGLang 开源社区提供生产轨迹和硬件支持。本工作获得授予 Shan Yu 的 Amazon AI Fellowship、美国国家科学基金会项目 CNS-1763172、CNS-2007737、CNS-2006437、CNS-2106838、CNS-2147909、CNS-2128653、CNS-2301343、CNS-2330831、CNS-2403254、IIS-2546642、阿里巴巴研究实习项目,以及 Sky Computing Lab 业界伙伴 Accenture、AMD、Anyscale、Cisco、Google、IBM、Intel、Intesa Sanpaolo、Lambda、Lightspeed、Mibura、Microsoft、NVIDIA、Samsung SDS、SAP 的资助。Junyi Shu、Jiarong Xing、Harry Xu、Ying Sheng 为通信作者。

References参考文献(保留英文)

  • [1] N. Agarwal (2024) Implementing Fractional GPUs in Kubernetes with Aliyun Scheduler. Note: https://huggingface.co/blog/NileshInfer/implementing-fractional-gpus-in-kubernetesAccessed: May, 2025 Cited by: §3.3.
  • [2] M. AI (2024) Llama 3.3-70B-Instruct. Note: https://huggingface.co/meta-llama/Llama-3.3-70B-InstructAccessed: May, 2025 Cited by: §7.4.
  • [3] N. AI (2025) Novita AI homepage. Note: https://novita.ai/Accessed: May, 2025 Cited by: §A.1, Table 1.
  • [4] ai-dynamo (2025) Dynamo: a datacenter-scale distributed inference serving framework. GitHub. Note: https://github.com/ai-dynamo/dynamoAccessed: 2025-08-18 Cited by: §4.
  • [5] G. Chen, Y. Zhao, X. Shen, and H. Zhou (2017) EffiSha: a software framework for enabling effficient preemptive scheduling of gpu. In Proceedings of the 22nd ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP ’17, New York, NY, USA, pp. 3–16. External Links: ISBN 9781450344937, Link, Document Cited by: §8.
  • [6] S. Chen, Z. Jia, S. Khan, A. Krishnamurthy, and P. B. Gibbons (2025) SLOs-Serve: Optimized Serving of Multi-SLO LLMs. arXiv preprint arXiv:2504.08784. Cited by: §8.
  • [7] W. Chen, Z. Mo, H. Xu, K. Ye, and C. Xu (2023) Interference-aware multiplexing for deep learning in gpu clusters: a middleware approach. In Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis, SC ’23, New York, NY, USA. External Links: ISBN 9798400701092, Link, Document Cited by: §8.
  • [8] J. Cheriyan, R. Ravi, and M. Skutella (2021) A Simple Proof of the Moore-Hodgson Algorithm for Minimizing the Number of Late Jobs. Operations Research Letters 49 (6), pp. 842–843. Cited by: §6.2.
  • [9] W. Chiang, L. Zheng, Y. Sheng, A. N. Angelopoulos, T. Li, D. Li, H. Zhang, B. Zhu, M. Jordan, J. E. Gonzalez, and I. Stoica (2024) Chatbot Arena: An Open Platform for Evaluating LLMs by Human Preference. External Links: 2403.04132 Cited by: §A.1, Table 1, Table 1, §7.1.
  • [10] P. H. Coppock, B. Zhang, E. H. Solomon, V. Kypriotis, L. Yang, B. Sharma, D. Schatzberg, T. C. Mowry, and D. Skarlatos (2025) LithOS: an operating system for efficient machine learning on gpus. In Proceedings of the ACM SIGOPS 31st Symposium on Operating Systems Principles, SOSP ’25, New York, NY, USA, pp. 1–17. External Links: ISBN 9798400718700, Link, Document Cited by: §1.
  • [11] J. Duan, R. Lu, H. Duanmu, X. Li, X. Zhang, D. Lin, I. Stoica, and H. Zhang (2024) MuxServe: Flexible Multiplexing for Efficient Multiple LLM Serving. arXiv preprint arXiv:2404.02015. Cited by: §1, §3, §7.1, §7.1, §8.
  • [12] R. Fan, T. Ren, M. Xie, S. Gao, J. Shu, and Y. Lu (2025) GPREEMPT: gpu preemptive scheduling made general and efficient. In Proceedings of the 2025 USENIX Conference on Usenix Annual Technical Conference, USENIX ATC ’25, USA. External Links: ISBN 978-1-939133-48-9 Cited by: §1, §8.
  • [13] Y. Fu, L. Xue, Y. Huang, A. Brabete, D. Ustiugov, Y. Patel, and L. Mai (2024) ServerlessLLM:Low-Latency Serverless Inference for Large Language Models. In USENIX OSDI, pp. 135–153. Cited by: §1, §2, §3, §7.1, §8.
  • [14] S. Gao, Q. Wang, S. Zeng, Y. Lu, and J. Shu (2025) WEAVER: efficient multi-llm serving with attention offloading. In ATC, USENIX ATC ’25, USA. External Links: ISBN 978-1-939133-48-9 Cited by: §3.
  • [15] R. L. Graham (1969) Bounds on Multiprocessing Timing Anomalies. SIAM Journal on Applied Mathematics 17 (2), pp. 416–429. Cited by: §A.2.1, §A.2.1.
  • [16] L. Han, Z. Zhou, and Z. Li (2024) Pantheon: Preemptible Multi-DNN Inference on Mobile Edge GPUs. In Proceedings of the 22nd Annual International Conference on Mobile Systems, Applications and Services, pp. 465–478. Cited by: §8.
  • [17] M. Han, H. Zhang, R. Chen, and H. Chen (2022) Microsecond-Scale Preemption for Concurrent GPU-Accelerated DNN Inferences. In 16th USENIX Symposium on Operating Systems Design and Implementation (OSDI 22), pp. 539–558. Cited by: §8.
  • [18] M. Han, H. Zhang, R. Chen, and H. Chen (2022) Microsecond-scale preemption for concurrent GPU-accelerated DNN inferences. In 16th USENIX Symposium on Operating Systems Design and Implementation (OSDI 22), Carlsbad, CA, pp. 539–558. External Links: ISBN 978-1-939133-28-1, Link Cited by: §8.
  • [19] Hyperbolic (2024) Hyperbolic: The Open Access AI Cloud. Hyperbolic Provides Affordable GPU Access and Inference Services for Those at the Edges of AI. Hyperbolic. Note: https://hyperbolic.xyz/ Cited by: §A.1, Table 1, §7.1.
  • [20] S. Jaiswal, K. Jain, Y. Simmhan, A. Parayil, A. Mallick, R. Wang, R. S. Amant, C. Bansal, V. Rühle, A. Kulkarni, et al. (2025) Serving Models, Fast and Slow: Optimizing Heterogeneous LLM Inferencing Workloads at Scale. arXiv preprint arXiv:2502.14617. Cited by: §8.
  • [21] W. Kwon, Z. Li, S. Zhuang, Y. Sheng, L. Zheng, C. H. Yu, J. Gonzalez, H. Zhang, and I. Stoica (2023) Efficient Memory Management for Large Language Model Serving with PagedAttention. In Proceedings of the 29th Symposium on Operating Systems Principles, SOSP 2023, J. Flinn, M. I. Seltzer, P. Druschel, A. Kaufmann, and J. Mace (Eds.), pp. 611–626. Cited by: §2, §5.1, §6.2, §8.
  • [22] Z. Li, L. Zheng, Y. Zhong, V. Liu, Y. Sheng, X. Jin, Y. Huang, Z. Chen, H. Zhang, J. E. Gonzalez, and I. Stoica (2023) AlpaServe: Statistical Multiplexing with Model Parallelism for Deep Learning Serving. In 17th USENIX Symposium on Operating Systems Design and Implementation (OSDI 23), Boston, MA, pp. 663–679. External Links: ISBN 978-1-939133-34-2, Link Cited by: §7.1, §7.1, §8.
  • [23] llm-d (2025) Llm-d: a kubernetes-native high-performance distributed llm inference framework. GitHub. Note: https://github.com/llm-dAccessed: 2025-08-18 Cited by: §4.
  • [24] Meta (2024) Introducing Llama 3.1: Our Most Capable Models to Date. Note: https://ai.meta.com/blog/meta-llama-3-1/ Cited by: §7.4.
  • [25] J. M. Moore (1968) An N Job, One Machine Sequencing Algorithm for Minimizing the Number of Late Jobs. Management Science 15 (1), pp. 102–109. Cited by: §6.2.
  • [26] K. K. Ng, H. M. Demoulin, and V. Liu (2023) Paella: Low-Latency Model Serving with Software-Defined GPU Scheduling. In Proceedings of the 29th Symposium on Operating Systems Principles, pp. 595–610. Cited by: §8.
  • [27] NVIDIA (2024) NVIDIA Multi-Process Service. Note: https://docs.nvidia.com/deploy/mps/index.htmlAccessed: August, 2025 Cited by: §1.
  • [28] NVIDIA (2025) CUDA Toolkit Documentation: Virtual Memory Management. Note: https://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__VA.htmlAccessed: May, 2025 Cited by: §7, §8.
  • [29] NVIDIA (2025) NVIDIA Multi-Instance GPU. Note: https://www.nvidia.com/en-us/technologies/multi-instance-gpu/Accessed: May, 2025 Cited by: §1, §3.3.
  • [30] NVIDIA (2025) Unlock Next Level Performance with Virtual GPUs. Note: https://www.nvidia.com/en-us/data-center/virtual-solutions/Accessed: August, 2025 Cited by: §1.
  • [31] NVIDIA (2026) NVIDIA GPUDirect RDMA. Note: https://network.nvidia.com/products/GPUDirect-RDMA/ Cited by: §6.1.
  • [32] H. Oh, K. Kim, J. Kim, S. Kim, J. Lee, D. Chang, and J. Seo (2024) Exegpt: Constraint-Aware Resource Scheduling for LLM Inference. In Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 2, pp. 369–384. Cited by: §8.
  • [33] A. Patke, D. Reddy, S. Jha, H. Qiu, C. Pinto, C. Narayanaswami, Z. Kalbarczyk, and R. Iyer (2024) Queue Management for SLO-Oriented Large Language Model Serving. In Proceedings of the 2024 ACM Symposium on Cloud Computing, SoCC ’24, New York, NY, USA, pp. 18–35. External Links: ISBN 9798400712869, Link, Document Cited by: §1, §3.3, §3, §7.1, §8.
  • [34] R. Prabhu, A. Nayak, J. Mohan, R. Ramjee, and A. Panwar (2024) vAttention: Dynamic Memory Management for Serving LLMs without PagedAttention. External Links: 2405.04437, Link Cited by: §8.
  • [35] L. Qianli, H. Zicong, C. Fahao, L. Peng, and G. Song (2025) Mell: Memory-Efficient Large Language Model Serving via Multi-GPU KV Cache Management. arXiv preprint arXiv:2501.06709. Cited by: §8.
  • [36] R. Qin, Z. Li, W. He, J. Cui, F. Ren, M. Zhang, Y. Wu, W. Zheng, and X. Xu (2025) Mooncake: Trading More Storage for Less Computation—A KVCache-Centric Architecture for Serving LLM Chatbot. In 23rd USENIX Conference on File and Storage Technologies (FAST 25), pp. 155–170. Cited by: §7.1.
  • [37] QLM Project (2024) QLM: Quantum Language Model Project. Note: https://github.com/QLM-project/QLM/blob/eea5b622e2c4c6abd705876880f50014c4d9d0d1/qlm/endpoints/endpoint.py#L57Accessed: May, 2025 Cited by: §7.4.
  • [38] Redis (2025) Redis List documentation. Note: https://redis.io/docs/latest/develop/data-types/lists/Accessed: May, 2025 Cited by: §7.
  • [39] RyokoAI (2024) ShareGPT dataset. Note: https://sharegpt.com Cited by: §3.
  • [40] W. Shen, Y. Chen, R. Chen, and H. Chen (2025) MSched: gpu multitasking via proactive memory scheduling. arXiv preprint arXiv:2512.24637. Cited by: §8.
  • [41] W. Shen, M. Han, J. Liu, R. Chen, and H. Chen (2025) XSched: preemptive scheduling for diverse xpus. In Proceedings of the 19th USENIX Conference on Operating Systems Design and Implementation, OSDI ’25, USA. External Links: ISBN 978-1-939133-47-2 Cited by: §1, §8.
  • [42] Y. Sheng, S. Cao, D. Li, C. Hooper, N. Lee, S. Yang, C. Chou, B. Zhu, L. Zheng, K. Keutzer, J. E. Gonzalez, and I. Stoica (2024) SLoRA: Scalable Serving of Thousands of LoRA Adapters. In Proceedings of Machine Learning and Systems, Vol. 6, pp. 296–311. Cited by: §1.
  • [43] F. Strati, X. Ma, and A. Klimovic (2024) Orion: Interference-Aware, Fine-Grained GPU Sharing for ML Applications. In Proceedings of the Nineteenth European Conference on Computer Systems, pp. 1075–1092. Cited by: §8.
  • [44] B. Sun, Z. Huang, H. Zhao, W. Xiao, X. Zhang, Y. Li, and W. Lin (2024) Llumnix: Dynamic Scheduling for Large Language Model Serving. In 18th USENIX Symposium on Operating Systems Design and Implementation (OSDI 24), pp. 173–191. Cited by: §8.
  • [45] Q. Team (2024) Qwen2.5-32b. Note: https://huggingface.co/Qwen/Qwen2.5-32BAccessed: May, 2025 Cited by: §7.4.
  • [46] Q. Team (2024) Qwen2.5: A Party of Foundation Models. Note: https://qwenlm.github.io/blog/qwen2.5/Accessed: May, 2025 Cited by: §7.4.
  • [47] Y. Wang, C. Liu, D. Wong, and H. Kim (2024) GCAPS: gpu context-aware preemptive priority-based scheduling for real-time tasks. External Links: 2406.05221, Link Cited by: §8.
  • [48] Y. Wang, Y. Chen, Z. Li, Z. Tang, R. Guo, X. Wang, Q. Wang, A. C. Zhou, and X. Chu (2024) Towards efficient and reliable llm serving: a real-world workload study. External Links: 2401.17644 Cited by: §3.
  • [49] Wang, Jiahao and Han, Jinbo and Wei, Xingda and Shen, Sijie and Zhang, Dingyan and Fang, Chenguang and Chen, Rong and Yu, Wenyuan and Chen, Haibo (2025) KVCache cache in the wild: characterizing and optimizing kvcache cache at a large cloud provider. In 2025 USENIX Annual Technical Conference (USENIX ATC 25), pp. 465–482. Cited by: §3.
  • [50] Q. Weng, L. Yang, Y. Yu, W. Wang, X. Tang, G. Yang, and L. Zhang (2023) Beware of fragmentation: scheduling GPU-Sharing workloads with fragmentation gradient descent. In 2023 USENIX Annual Technical Conference (USENIX ATC 23), Boston, MA, pp. 995–1008. External Links: ISBN 978-1-939133-35-9, Link Cited by: §8.
  • [51] B. Wu, Z. Zhang, Z. Bai, X. Liu, and X. Jin (2023) Transparent GPU sharing in container clouds for deep learning workloads. In 20th USENIX Symposium on Networked Systems Design and Implementation (NSDI 23), Boston, MA, pp. 69–85. External Links: ISBN 978-1-939133-33-5, Link Cited by: §8.
  • [52] Y. Xiang, X. Li, K. Qian, Y. Yang, D. Zhu, W. Yu, E. Zhai, X. Liu, X. Jin, and J. Zhou (2025) Aegaeon: effective gpu pooling for concurrent llm serving on the market. In SOSP, SOSP ’25, New York, NY, USA, pp. 1030–1045. External Links: ISBN 9798400718700, Link, Document Cited by: §1, §1, §2, §3, §8.
  • [53] Y. Xiang, X. Li, K. Qian, W. Yu, E. Zhai, and X. Jin (2025) ServeGen: Workload Characterization and Generation of Large Language Model Serving in Production. arXiv preprint arXiv:2505.09999. Cited by: §1.
  • [54] W. Xiao, S. Ren, Y. Li, Y. Zhang, P. Hou, Z. Li, Y. Feng, W. Lin, and Y. Jia (2020) AntMan: dynamic scaling on GPU clusters for deep learning. In 14th USENIX Symposium on Operating Systems Design and Implementation (OSDI 20), pp. 533–548. External Links: ISBN 978-1-939133-19-9, Link Cited by: §8.
  • [55] J. Xu, R. Zhang, C. Guo, W. Hu, Z. Liu, F. Wu, Y. Feng, S. Sun, C. Shao, Y. Guo, et al. (2024) vTensor: Flexible Virtual Tensor Management for Efficient LLM Serving. arXiv preprint arXiv:2407.15309. Cited by: §8.
  • [56] P. Yu and M. Chowdhury (2019) Salus: fine-grained gpu sharing primitives for deep learning applications. External Links: 1902.04610 Cited by: §8.
  • [57] ZeroMQ (2025) ZeroMQ Website. Note: https://zeromq.org/Accessed: May, 2025 Cited by: §7.
  • [58] D. Zhang, H. Wang, Y. Liu, X. Wei, Y. Shan, R. Chen, and H. Chen (2024) Fast and Live Model Auto Scaling with O (1) Host Caching. arXiv preprint arXiv:2412.17246. Cited by: §4.
  • [59] S. Zhang, Q. Chen, W. Cui, H. Zhao, C. Xue, Z. Zheng, W. Lin, and M. Guo (2025) Improving GPU Sharing Performance through Adaptive Bubbleless Spatial-Temporal Sharing. In Proceedings of the Twentieth European Conference on Computer Systems, pp. 573–588. Cited by: §8.
  • [60] Y. Zhang, H. Yu, C. Han, C. Wang, B. Lu, Y. Li, Z. Jiang, Y. Li, X. Chu, and H. Li (2025) SGDRC: Software-Defined Dynamic Resource Control for Concurrent DNN Inference on NVIDIA GPUs. In Proceedings of the 30th ACM SIGPLAN Annual Symposium on Principles and Practice of Parallel Programming, pp. 267–281. Cited by: §8.
  • [61] W. Zhao, A. Jayarajan, and G. Pekhimenko (2025) Tally: non-intrusive performance isolation for concurrent deep learning workloads. In Proceedings of the 30th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 1, ASPLOS ’25, New York, NY, USA, pp. 1052–1068. External Links: ISBN 9798400706981, Link, Document Cited by: §1.
  • [62] Y. Zhao, X. Liu, S. Liu, X. Li, Y. Zhu, G. Huang, X. Liu, and X. Jin (2023) MuxFlow: efficient and safe gpu sharing in large-scale production deep learning clusters. External Links: 2303.13803, Link Cited by: §8.
  • [63] L. Zheng, L. Yin, Z. Xie, J. Huang, C. Sun, C. H. Yu, S. Cao, C. Kozyrakis, I. Stoica, J. E. Gonzalez, C. Barrett, and Y. Sheng (2023) SGLang: Efficient Execution of Structured Language Model Programs. External Links: 2312.07104 Cited by: §1, §2, §5.1, §6.2, §7.
  • [64] Y. Zhong, S. Liu, J. Chen, J. Hu, Y. Zhu, X. Liu, X. Jin, and H. Zhang (2024) DistServe: Disaggregating prefill and decoding for goodput-optimized large language model serving. In 18th USENIX Symposium on Operating Systems Design and Implementation (OSDI 24), pp. 193–210. Cited by: §6, §8.

Appendix A Appendix附录 A

A.1 Analysis of All production tracesA.1 所有生产轨迹的分析

原论文图表,见图注
(a) Bursty-group shifts.
(a) 突发模型组变化。
原论文图表,见图注
(b) Request rate correlation.
(b) 请求率相关性。
Figure 12: Request patten shifts.
图12:请求模式变化。
107

Overview.  To understand the workload of multi-LLM serving, we analyze four production traces in detail. These traces are collected from representative service providers as summarized in Table 1. The first two traces are from Hyperbolic [19] and Novita AI [3], two popular LLM inference service providers. They offer inference APIs for a variety of foundation models and also support user-deployed, fine-tuned models. The last two traces are from Chatbot Arena [9], a widely used open-source platform for LLM evaluation. It compares model responses via human preference voting (Arena-Battle) and also provides interfaces for real-time conversations with various models (Arena-Chat).

概览。为理解多 LLM 服务负载,我们详细分析四条生产轨迹,来自表 1 中的代表性提供商。前两条来自热门 LLM 推理服务提供商 Hyperbolic[19] 和 Novita AI[3],它们为多种基础模型提供推理 API,也支持用户部署的微调模型。后两条来自广泛使用的开源评测平台 Chatbot Arena[9]:它以人的偏好投票比较模型响应(Arena-Battle),也提供与各种模型实时对话的接口(Arena-Chat)。
108

Bursty-group behaviors.  The bursty groups in the production traces shift rapidly over time, and this behavior can be quantified through model switches. As shown in Figure 12(a), we plot the number of model switches per hour for each trace. To compute this metric, we treat a model as active if it has received at least one request in the past two minutes. A model switch is counted whenever the set of active models changes. Across the four traces, Novita exhibits the fewest switches, yet still averages 54 switches per hour, meaning the active set changes almost once per minute. In contrast, Arena-Chat, which contains the largest and most diverse collection of models, experiences an average of 766 switches per hour, reflecting that its active set changes every few seconds.

突发模型组行为。生产轨迹中的突发组快速变化,可通过模型切换量化。图 12(a) 绘制每条轨迹每小时的模型切换次数。计算时,将过去两分钟至少收到一个请求的模型视为活跃;只要活跃集合变化,就计一次模型切换。四条轨迹中,Novita 切换最少,但平均仍为每小时 54 次,几乎每分钟变一次;模型最多、最多样的 Arena-Chat 平均每小时 766 次,即每几秒变化一次。
109

Unpredictability.  The request rate at a given time is also highly unpredictable in our traces. Figure 12(b) quantifies predictability by measuring, for each model, the Pearson correlation between its request-rate time series on consecutive days. Across all traces, the correlations cluster near zero, showing that a model’s traffic at a given time of day provides virtually no information about its traffic at the same time on the next day.

不可预测性。轨迹中某一时刻的请求率同样难以预测。图 12(b) 计算每个模型相邻两天请求率时间序列的 Pearson 相关系数,量化可预测性。所有轨迹的相关系数都集中在零附近,表明某模型今天某时刻的流量,几乎不能提供明天同一时刻流量的信息。
110

Volatile requests.  Figure 13(a) further shows that models frequently alternate between activity and idleness: many models in the Hyperbolic and Novita traces experience more than 40–100 idle intervals per hour (>10 s each), making static reservations wasteful. Complementing this, Figure 13(b) reports the coefficient of variation (CV), calculated as the standard deviation divided by the mean (σ/μ\sigma/\mu), of requests per minute for each model. Both Hyperbolic and Novita traces contain many models with CV > 1. The Chatbot Arena traces have lower request rates, resulting in smaller CVs overall, but many models still exhibit CVs greater than 0.5. Together, the high frequency of idle intervals and the substantial variability captured by CV indicate that all traces exhibit strong, persistent volatility.

请求多变。图 13(a) 进一步表明,模型频繁在活跃与空闲间切换:Hyperbolic、Novita 中许多模型每小时有 40–100 次以上、每次超过十秒的空闲间隔,使静态预留浪费。图 13(b) 补充展示各模型每分钟请求数的变异系数(CV),即标准差除以均值 σ/μ。Hyperbolic、Novita 中许多模型 CV>1。Chatbot Arena 请求率较低,整体 CV 较小,但许多模型仍大于 0.5。高频空闲间隔和明显变异共同说明,所有轨迹都具有强烈、持续的波动性。
原论文图表,见图注
(a) Number of idle intervals per hour.
(a) 每小时空闲区间数。
原论文图表,见图注
(b) CV of request rate per minute.
(b) 每分钟请求率的变异系数。
Figure 13: Volatile requests.
图13:请求波动。

A.2 Analysis of Algorithm 1A.2 算法1分析

A.2.1 KVPR Bound AnalysisA.2.1 KVPR 界限分析

111

The global model placement algorithm ensures that the maximum KV pressure ratio (KVPR) across all GPUs is bounded by the maximum KVPR in the optimal placement. We give the following analysis.

全局模型放置算法保证,所有 GPU 中的最大 KV 压力比(KVPR),受最优放置中的最大 KVPR 约束。下面给出分析。
112

Let K​V​P​RO​P​TKVPR_{OPT} be the minimum possible maximum KVPR achievable by any optimal placement. Let K​V​P​Rm​a​xKVPR_{max} be the maximum KVPR produced by Algorithm 1. We want to show K​V​P​Rm​a​xKVPR_{max} is bounded by K​V​P​RO​P​TKVPR_{OPT}.

设 KVPR_OPT 为任意最优放置能够达到的最小“最大 KVPR”,KVPR_max 为算法 1 产生的最大 KVPR。我们要证明 KVPR_max 受 KVPR_OPT 约束。
113

Bottleneck Analysis:  Focus on the GPU, denoted as gm​a​xg_{max}, that achieves the highest KVPR (K​V​P​Rm​a​xKVPR_{max}) given by Algorithm 1’s placement. Let mkm_{k} be the last model assigned to this GPU gm​a​xg_{max}. Let Wb​e​f​o​r​eW_{before} and Sb​e​f​o​r​eS_{before} represent the total SLO-weighted request rate and shared KV memory on gm​a​xg_{max} just before model mkm_{k} was assigned. The final state on this GPU is K​V​P​Rm​a​x=(Wb​e​f​o​r​e+dk)/(Sb​e​f​o​r​e−wk)KVPR_{max}=(W_{before}+d_{k})/(S_{before}-w_{k}), where dkd_{k} is the SLO-weighted request rate (rk/skr_{k}/s_{k}) and wkw_{k} is the memory weight of model mkm_{k}. Similar to Graham [15], this proof aims to demonstrate that both the state before mkm_{k} was added and the contribution of mkm_{k} are bounded relative to K​V​P​RO​P​TKVPR_{OPT}. Specifically, it seeks to establish two conceptual bounds:

瓶颈分析。考察算法 1 放置后具有最高 KVPR,即 KVPR_max 的 GPU,记为 g_max。令 m_k 为最后分配到 g_max 的模型;W_before、S_before 分别为分配 m_k 前,该 GPU 的 SLO 加权总请求率与共享 KV 内存。最终状态为 KVPR_max = (W_before+d_k)/(S_before−w_k),其中 d_k 是 SLO 加权请求率 r_k/s_k,w_k 是模型 m_k 的内存权重。类似 Graham[15],本证明试图说明加入 m_k 前的状态、以及 m_k 本身的贡献,均相对于 KVPR_OPT 有界。具体试图建立以下两个概念性界限:
  • •
    114

    Bound 1 (Related to state before mkm_{k}): The KVPR on gm​a​xg_{max} just before mkm_{k}’s assignment, Wb​e​f​o​r​eSb​e​f​o​r​e\frac{W_{before}}{S_{before}}, was the minimum among all GPUs at that moment due to the algorithm’s greedy choice. This minimum KVPR is typically related to the average “pressure” across the system, which, in turn, is argued to be no larger than the optimal maximum pressure. This suggests the inequality: Wb​e​f​o​r​e/Sb​e​f​o​r​e≤K​V​P​RO​P​TW_{before}/S_{before}\leq KVPR_{OPT}

    界限一,与加入 m_k 前的状态有关。由于贪心选择,分配 m_k 前 g_max 上的 KVPR,即 W_before/S_before,是当时所有 GPU 中最小的。该最小值通常与系统平均“压力”有关,而平均压力又被论证为不大于最优的最大压力。由此提示不等式 W_before/S_before ≤ KVPR_OPT。
  • •
    115

    Bound 2 (Related to model mkm_{k}): The “pressure” exerted by the critical model mkm_{k} must be handled by the optimal solution. A fundamental lower bound on the optimal solution is the maximum pressure any single model would exert if placed alone on an otherwise empty GPU, i.e., K​V​P​RO​P​T≥dk/(C−wk)KVPR_{OPT}\geq d_{k}/(C-w_{k}).

    界限二,与模型 m_k 有关。最优方案必须承担关键模型 m_k 施加的“压力”。最优方案的一个基本下界,是把任一模型独占放入原本空闲 GPU 时产生的最大压力,即 KVPR_OPT ≥ d_k/(C−w_k)。
116

The final step involves integrating these insights to bound K​V​P​Rm​a​x=Wb​e​f​o​r​e+dkSb​e​f​o​r​e−wkKVPR_{max}=\frac{W_{before}+d_{k}}{S_{before}-w_{k}}. Following Graham’s proof [15], we substitute these into the numerator and get K​V​P​Rm​a​x≤K​V​P​RO​P​T⋅(1+CSgm​a​x−wk)KVPR_{max}\leq KVPR_{OPT}\cdot(1+\frac{C}{S_{g_{max}}-w_{k}}).

最后,合并上述认识,约束 KVPR_max = (W_before+d_k)/(S_before−w_k)。沿用 Graham 的证明[15],将这些界限代入分子,得到 KVPR_max ≤ KVPR_OPT × (1+C/(S_{g_max}−w_k))。

A.2.2 TP SupportA.2.2 张量并行支持

117

The model placement algorithm in Algorithm 1 seamlessly integrates models utilizing Tensor Parallelism (TP). We conceptualize a TP model requiring t​p​_​s​i​z​etp\_size GPUs as being composed of t​p​_​s​i​z​etp\_size distinct parts. For scheduling purposes, we create t​p​_​s​i​z​etp\_size entries in the sorted model list for such a model, assigning each entry 1t​p​_​s​i​z​e\frac{1}{tp\_size} of the original weight and request rate. A beneficial property emerges from this decomposition: since these entries have identical rksk\frac{r_{k}}{s_{k}} values, they remain adjacent after sorting. This adjacency increases the likelihood that, as the algorithm iterates, these parts are initially assigned to different GPUs due to rising KVPRs. To ensure the distribution, if assigning a TP part to the GPU with the minimum KVPR would result in collocating it with another part of the same original model, we instead assign it to the GPU exhibiting the second-lowest KVPR. Through this decomposition strategy and modified assignment rule, our algorithm effectively considers and manages the placement of TP models alongside single-GPU models.

算法 1 可无缝纳入 TP 模型。将一个需要 tp_size 块 GPU 的模型看作 tp_size 个不同部分;调度时,在模型排序列表中创建 tp_size 个条目,每个分得原权重和请求率的 1/tp_size。这样有个有利性质:各条目的 r_k/s_k 相同,排序后相邻。算法迭代时,随着 KVPR 上升,它们更可能初始分配到不同 GPU。为保证分散,若把某 TP 部分分到最低 KVPR 的 GPU,会与同一原模型的另一部分共置,则改分到 KVPR 第二低的 GPU。通过分解和修改分配规则,算法可在单 GPU 模型旁一并考虑、管理 TP 模型放置。

A.3 Elastic Memory OverheadA.3 弹性内存开销

原论文图表,见图注
Figure 14: Mean latency comparison.
图14:平均延迟比较。
118

To stress-test the worst case, we evaluate the system under a constant request rate without idle periods, eliminating opportunities for memory coordination through either time- or space-sharing. In this setting, static partitioning provides the strongest baseline, as it divides memory according to the steady request rate. Figure 14 presents a comparison between our system and static partitioning when serving two Llama-3.2-3B models on a single A100-40G GPU. In this experiment, the global scheduler does not alter placements and the GPU-local scheduler does not reorder requests, since all requests have equal priority. The only additional cost arises from the elastic memory manager, which dynamically maps and unmaps pages, unlike static partitioning that relies on pre-allocation. With optimizations such as buffer preallocation and contiguous layouts, this overhead remains modest: mean TTFT and TPOT increase by only 3–5% as request rates scale, demonstrating the efficiency of our system even under worst-case conditions.

为压测最坏情况,我们用恒定请求率、没有空闲期的负载,排除时间或空间共享协调机会。在这种情况下,按稳定请求率分内存的静态分区是最强基线。图 14 比较在单块 A100-40G 上服务两个 Llama-3.2-3B 模型的结果。全局调度器不改变放置,各请求优先级相同,本地调度器也不重排。额外成本只来自弹性内存管理器动态映射、解除映射,静态分区则预分配。通过缓冲预分配、连续布局等优化,开销保持适度:随请求率增加,平均 TTFT、TPOT 仅增加 3%–5%,说明即使最坏情形也较高效。

A.4 Sensitivity AnalysisA.4 超参数敏感性分析

原论文图表,见图注
Figure 15: Sensitivity to hyperparameters.
图15:超参数敏感性。
119

We analyze the sensitivity of Prism to two key hyperparameters: the model eviction idle threshold and the load monitoring window size with Hyperbolic and Chatbot Arena traces. The results are shown in Figure 15.

我们利用 Hyperbolic、Chatbot Arena 轨迹,分析 Prism 对两个关键超参数的敏感性:驱逐模型的空闲阈值、负载监测窗口大小。结果见图 15。
120

Idle Eviction Threshold. Figure 15(a) reports the mean TTFT as we vary the idle threshold, which dictates how long a model must remain inactive before being evicted. The results reveal a clear convex trade-off. When the threshold is too short (e.g., <40<40 s), the system becomes overly aggressive, evicting models during short inter-arrival gaps. This leads to instability and thrashing, where the system must frequently pay the high penalty of model reactivation for subsequent requests, thereby inflating TTFT. Conversely, when the threshold is too long (e.g., >80>80s), idle models hoard GPU memory that could otherwise be harvested. This resource locking prevents the scheduler from placing new active models or expanding the KV cache for concurrent requests, resulting in resource starvation and increased queuing delays. Empirically, a threshold of approximately 45 seconds achieves the optimal balance between minimizing reactivation overhead and maximizing resource reclamation.

空闲驱逐阈值。图 15(a) 改变模型需保持不活跃多久才驱逐的阈值,报告平均 TTFT。结果呈现明显的凸形权衡。阈值过短,例如小于 40 秒,系统过于激进,在短请求间隔中也驱逐模型,导致不稳定和抖动,后续请求频繁承担昂贵的重新激活成本,使 TTFT 膨胀。阈值过长,例如大于 80 秒,空闲模型则囤积本可回收的 GPU 内存,阻碍放置新活跃模型或扩大并发请求 KV 缓存,造成资源饥饿和排队延迟。经验上约 45 秒,能最好平衡重新激活开销与资源回收。
121

Load Monitoring Window Size. Figure 15(b) examines the impact of the sliding window size used to calculate the moving average of token rates for the KVPR. This parameter controls the sensitivity of the placement algorithm: a small window makes the scheduler sensitive to transient bursts, while a large window focuses on long-term trends. The results demonstrate that Prism is generally robust to variations in window size. We observe that a window size of approximately 60 seconds provides a stable estimation of memory pressure, effectively smoothing out short-term noise while remaining responsive enough to shift resources during sustained workload changes.

负载监测窗口。图 15(b) 考察计算 KVPR token 率移动平均的滑动窗口大小。它控制放置算法敏感度:小窗口敏感于瞬时突发,大窗口关注长期趋势。结果显示 Prism 对窗口变化整体稳健。约 60 秒的窗口能够稳定估计内存压力,平滑短期噪声,同时仍足够敏捷地在负载持续变化时调整资源。
原文:Shan Yu; Yifan Qiao; Mingyuan Ma; Yangmin Li; Shuo Yang; Xinyuan Tong; Yang Wang; Zhiqiang Xie; Yuwei An; Shiyi Cao; Ke Bao; Deepak Vij; Xiaoning Ding; Yichen Wang; Qingda Lu; Zhong Wang; Gao Gao; Harry Xu; Junyi Shu; Jiarong Xing; Ying Sheng,Prism: Cost-Efficient Multi-LLM Serving via GPU Memory Ballooning。原文链接 · CC BY 4.0。本页对原文进行了中文翻译、结构化、图像本地化及译注添加,原作者未背书本译稿;图内英文及参考文献保留原样。
↑