arXiv(opens in a new tab)cs.OSSep 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2609.04774

Adaptive Context Parallelism for Production LLM Serving

Jiarui Guo, Rongle Wang, Peijun Huang, Zongwei Lv, Ziqing Wang, Kan Liu, Tao Lan, Lin Qu, Xiaolin Wang, Tong Yang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Jiarui Guo Peking University

Rongle Wang Peking University

Peijun Huang Peking University

Zongwei Lv Peking University

Ziqing Wang Alibaba Group

Kan Liu Alibaba Group

Tao Lan Alibaba Group

Lin Qu Alibaba Group

Xiaolin Wang Peking University

Tong Yang Peking University

ABSTRACT

As LLM context windows expand and input sequences grow longer, serving systems face increasing computational and memory demands. Context parallelism (CP), which partitions the input sequence across multiple ranks to parallelize the computation, has therefore become increasingly important for efficient LLM serving. However, existing CP-enabled systems either rely on static CP configurations or adjust the CP degree only for active requests or batches. In this paper, we present Vertumnus, an adaptive CP serving system designed for heterogeneous and evolving workloads. At the request level, Vertumnus routes requests among workers with different CP degrees using a placement cost that combines predicted queuing delay, cache-aware prefill time, and GPU-time cost. At the cluster level, Vertumnus adapts the worker composition through seconds-scale split and merge operations as workload demand changes. Vertumnus further introduces a global prefix-cache management policy that coordinates cache placement and replication among workers with the same or different CP degrees, preserving cache locality as request assignments and worker composition change. Experiments on a 64-GPU cluster with public and production workloads show that, under the highest evaluated loads, Vertumnus reduces mean TTFT by up to 28.1% and improves token-weighted SLO attainment by up to 13.3 percentage points over the strongest baseline.

1 INTRODUCTION

Recent years have witnessed remarkable advances in large language models (LLMs), driven by rapid improvements in model capabilities, context length, and model scale [1-3]. LLMs are now powering a diverse range of applications, e.g. conversational assistants [4], retrieval-augmented generation [5], long-document understanding [6], and autonomous agents [7]. As LLMs become deeply integrated into products and enterprise workflows, LLM inference is increasingly delivered as a continuously available online service rather than executed only as isolated offline tasks [8, 9], placing LLM serving on the critical path of production applications.

Therefore, efficient LLM serving systems have become a critical component of modern AI infrastructure [10-12]. In production, the workloads handled by these systems exhibit three important characteristics. ① Request lengths are highly heterogeneous. Conventional question-answering requests may contain only a few hundred tokens, whereas document analysis, retrieval-augmented generation, and complex agentic requests may contain tens of thousands of tokens or more [13]. ② Workloads are temporally dynamic. Both the request arrival rate and the composition of short and long

requests can change substantially over time [14, 15]. ③ Prefix reuse is becoming increasingly prevalent. Shared system prompts, multi-turn conversations, and agent/subagent workflows often produce long repeated prefixes, making prefix caching critical for avoiding redundant prefill computation [16-18]. Efficiently serving such workloads requires matching computational resources to both individual requests and evolving aggregate demand, while exploiting prefix reuse and maintaining overall GPU efficiency.

These requirements become particularly demanding for long-context requests. As context lengths continue to grow, context parallelism (CP)1^1 has emerged as an important technique for accelerating long-context processing [19-21]. In CP, the input tokens of a request are partitioned across multiple ranks, each mapped to one GPU, and the attention computation is distributed among these ranks. This allows long requests to exploit the compute capacity of multiple GPUs and reduce per-GPU memory pressure, potentially reducing time-to-first-token (TTFT) at the cost of additional cross-GPU communication and a larger resource footprint.

Like workload intensity and prefix-cache locality, the CP degree is an important factor that a serving scheduler must consider. Different CP degrees induce different request latency, communication overhead, GPU consumption, and aggregate serving capacity. However, to the best of our knowledge, the current landscape leaves three important gaps. First, most existing LLM serving systems either lack support for CP or do not treat the CP degree as a first-class scheduling dimension [22-24]. Their scheduling policies typically optimize request characteristics, cache locality, or worker load without modeling how these factors interact with the CP degree. Second, systems that support CP commonly determine each worker's CP degree at deployment time [25]. When workers with multiple CP degrees coexist, GPUs are statically partitioned among persistent CP workers. Since requests are usually routed using offline profiles and length-based rules, such static provisioning cannot adapt the worker composition to workload evolution. Moreover, routing solely by input length may be suboptimal, as it ignores worker-specific prefix reuse and current load. Third, although recent systems dynamically adjust CP at request, batch, or iteration granularity, their adaptation is tied to active executions rather than a persistent worker composition [26, 27]. Therefore, they do not determine how a fixed GPU budget should be distributed across CP degrees as aggregate demand evolves. Moreover, transient rank groups hinder prefix reuse because they provide no stable workers for retaining cached prefixes and routing future requests.

1^1Some early works use sequence parallelism (SP) to refer to attention-level sequence partitioning, which we call CP. In this paper, CP partitions the input sequence and attention computation across ranks, whereas SP refers to partitioning the activations of non-matrix-multiplication operations, such as LayerNorm and dropout, along the sequence dimension.

Kan Liu (liukan.lk@alibaba-inc.com) and Tong Yang (yangtong@pku.edu.cn) are corresponding authors.

Figure

Figure 1: An example of context parallelism when C=4C = 4.

To address these limitations, we propose Vertumnus2^2, an adaptive serving system that treats the CP worker composition as a cluster-wide, dynamically controllable resource. Vertumnus coordinates CP execution at two timescales. At the request level, its scheduler routes each incoming request among persistent CP workers by minimizing a model-based placement cost, which combines predicted queuing delay, cache-aware prefill time, and the GPU-time cost of the selected CP degree. At the cluster level, Vertumnus monitors workload conditions and reconfigures the worker composition within seconds; it uses in-place split and merge operations that require neither process restarts nor model-weight reloads. To maintain cache locality under heterogeneous and changing CP degrees, Vertumnus further provides a global prefix-cache manager that coordinates prefix placement, replication, and reclamation among workers with the same or different CP degrees. Together, these mechanisms allow Vertumnus to improve serving capacity under a fixed GPU budget while satisfying service-level objectives (SLOs) under dynamic and prefix-intensive workloads.

In general, the paper makes the following contributions:

  • We develop a cache-aware prefill-time model and incorporate the CP degree into request scheduling across heterogeneous workers. The scheduler jointly accounts for worker load, prefix reuse, CP-dependent performance, and GPU-time cost.

  • We design a cluster-level controller that adjusts the CP worker composition as the workload changes. It splits and merges workers within seconds to better match the available parallel capacity to current serving demand.

  • We design a global prefix-cache manager that preserves locality as request assignments and CP worker composition change. It adapts prefix placement and replication within and across CP degrees as reuse patterns evolve.

  • We implement Vertumnus and evaluate it with public and production workloads. The results show that Vertumnus reduces mean and P90 TTFT by up to 28.1% and 55.0%, respectively, and improves token-weighted TTFT SLO attainment by up to 13.3 percentage points.

References (70)