Editor’s introduction
The study evaluates BLIS, a deterministic CPU-only discrete-event simulator that models the full LLM serving pipeline—including admission control, routing, scheduling, and cache management—using analytical functions and learned coefficients. Two policies developed in simulation—admission and flow control—were validated on real hardware and integrated into llm-d. The study notes that prediction accuracy degrades when unmodeled features are present, such as specific model behaviors or hardware-specific effects. These represent coverage gaps rather than structural flaws, suggesting future extensions could improve the simulator’s scope without redesigning its core architecture.
Introduction
Deploying a large language model (LLM) inference platform requires choosing routing policies, admission behavior, batching settings, and KV-cache reuse strategies under concrete time-to-first-token (TTFT), inter-token latency (ITL), throughput, and cost constraints. These choices are coupled. A routing policy that improves prefix-cache hit rates can concentrate load on a subset of instances; a chunk size that helps one workload can hurt another; an admission policy that sheds load too late lets queues grow deep enough to degrade the traffic it protects. Teams must predict these coupled effects before committing GPU capacity or promoting a change to production. Confirming these tradeoffs reliably means measuring them on a GPU cluster: one workload evaluation (e.g., 10,000 requests at 10 requests per second (rps) served by Llama-2-70B on NVIDIA H100 nodes) takes roughly 18 minutes of sustained GPU time, plus provisioning, download, and warm-up. A meaningful exploration repeats this across hundreds of configurations, policies, and workloads, so the aggregate cost, not any single run, makes broad exploration impractical.
The second is policy evolution: exploring routing, admission, and batching alternatives before investing the engineering effort to implement and validate candidates on a GPU cluster. Evaluating policy variants (an admission curve that sheds load under saturation, a routing weight that rewards prefix-cache reuse, a chunk size that governs prefill/decode interleaving) across workload suites is routine in serving-system development, and each evaluation on a GPU cluster takes hours. With a simulator, broad exploration happens locally on a CPU, and cluster validation is reserved for the small set of policies or configurations that simulation identifies as worth the cluster time.
Existing tools occupy different points in an accuracy, cost, and coverage tradeoff, and each addresses a subset of this problem (§2). Benchmarks such as inference-perf and GuideLLM run the real system and define ground truth, but evaluate one configuration at a time, so exploration cost scales linearly with the number of candidates. Closed-form estimators such as llm-optimizer predict without profiling but ignore continuous batching, KV-cache pressure, and queueing, mispredicting by 20–90% under load; execution-modeling tools such as Vidur, AIConfigurator, and LLMServingSim model execution more faithfully (median error 17–619%, highest outside the regime each was calibrated for) but depend on profiling and cannot cover hardware absent from their profiled set without a fresh calibration run. These tools leave two gaps, which motivate our two technical contributions. First, accuracy and generalization are in tension: predicting a new model or GPU without re-profiling requires a latency model derived from architectural and hardware specifications, with coefficients fit once, not re-fit per configuration. Second, the stages of the serving pipeline (admission, batching, queueing) are coupled: each shapes the load the others see. A tool that models them in isolation, or reasons only about steady-state averages, cannot reproduce the load-dependent dynamics (§2.2); capturing them at speed without GPUs requires simulating the pipeline end to end.
The LLM Serving Pipeline
An LLM serving instance generates each response autoregressively in two phases with distinct performance characteristics. The prefill phase processes the full input prompt in parallel and is compute-bound; the decode phase then produces output tokens one at a time, and because each step reads the entire key-value (KV) cache from GPU memory, it is memory-bound. The KV cache stores the attention state for every token generated so far. It is allocated in fixed-size blocks and grows with sequence length, so an instance’s finite GPU memory bounds the number of requests it can serve concurrently. To raise utilization, modern engines use continuous batching. A step is one model forward pass over the current batch, producing one token for every decoding request. All requests in a batch share a single forward pass, so per-step latency is governed by its most expensive operation: a large prefill co-scheduled with many decodes raises the latency of every request in the step. Chunked prefill, as in Sarathi-Serve, splits long prefills into smaller units interleaved with decode steps to bound this effect. When the KV cache saturates, the engine preempts running requests and frees their blocks; a preempted request must later recompute or reload its evicted KV state before it can resume.
At cluster scale, a deployment comprises many such instances behind a shared admission and routing layer. Admission control gates incoming requests, a router selects a target instance for each admitted request (using policies such as load balancing or prefix-aware placement), and per-instance scheduling orders the local wait queue. Disaggregated deployments further split the prefill and decode phases across separate instance pools so that each can be provisioned and scaled independently. These admission and routing decisions operate on periodic snapshots of instance state (queue depth, KV-cache utilization, in-flight count) that are stale: by the time one is acted upon, the state it describes may already have changed, particularly under shifting load.
Why Modeling Is Hard: Coupled Dynamics
Cross-request coupling. Requests in a batch share one forward pass, so a step costs the maximum over its operations, not their average. One long prefill chunk stalls every decode it shares a step with, an effect chunked prefill bounds but does not remove. Continuous batching changes this composition every step, so per-request latency depends on the entire arrival pattern, not isolated requests. Steady-state analysis, which assumes a fixed or average batch, misses it.
KV-cache cascades. Memory pressure couples requests through a feedback loop: when the KV cache fills, the engine preempts running requests, and recomputing their evicted state on re-admission adds load that raises pressure further. One large request entering a nearly full instance can thus cascade into preemptions that degrade many co-located requests; the effect is non-linear in load, absent below the memory limit and growing with the number of evictions beyond it.
Stale-snapshot feedback. At cluster scale, admission, routing, and flow-control decisions act on the stale snapshots of §2.1, creating feedback of their own. When several requests arrive within one snapshot interval, a load-balancing router sends them all to the instance that looks least loaded; the resulting overload raises its latency, yet the stale snapshot keeps attracting traffic until it refreshes, and saturation thresholds lag for the same reason. Because these loops interact, a deployment’s behavior depends on the joint configuration of its policies, not any one alone.
Existing Approaches
Benchmarks. Tools such as inference-perf and GuideLLM run the real system and report ground-truth measurements, but they measure rather than predict and exploring an alternative policy requires redeploying the system under test. They serve as the reference against which predictive tools are validated.
Closed-form estimators. They predict latency and throughput analytically rather than by simulating execution. llm-optimizer includes an estimator that works from hardware specifications, requiring no profiling of the target model or GPU. Its estimator reasons about isolated requests and static bottlenecks at a fixed, steady-state operating point, and ignores continuous batching, KV-cache pressure, or queueing.
Simulators. They model the system’s execution more directly but differ in both scope and method: discrete-event simulators (Vidur, LLMServingSim) advance through individual request-arrival and batch-step events and so reproduce queueing and batch dynamics, whereas steady-state estimators (AIConfigurator) compute latency analytically at a fixed operating point without unrolling those events. Vidur simulates a cluster of replicas behind a global request router and predicts per-operator runtimes with a random-forest model fit per (model, GPU, TP) configuration, so TP communication is absorbed into the profiled operator times rather than simulated explicitly. Its replica scheduler follows Sarathi-Serve, a vLLM fork whose chunked-prefill scheduling and KV-cache management differ from current production engines; it does not model admission control or prefill/decode disaggregation. AIConfigurator profiles individual operators (GEMM, attention, communication, MoE) per GPU type and precision into a performance database, then composes the interpolated operator times for a given architecture and tensor-parallel degree to estimate end-to-end latency; it explicitly models prefill/decode disaggregation. As a steady-state estimator it computes latency at a fixed concurrency, so it does not capture how batch composition and queue depth evolve under load, and falls back to speed-of-light estimates for hardware absent from the database. InferSim takes the same profiled-operator approach and likewise omits cluster-level queueing, so AIConfigurator represents this class in our evaluation. LLMServingSim 2.0 extends the original to heterogeneous and disaggregated infrastructure; we evaluate 2.0 (§4). Both model multi-instance serving with profiled kernel timings, request routing, and KV-cache pressure handled by swapping blocks to host memory, and, unlike Vidur, simulate inter-GPU communication and its overlap with compute explicitly rather than folding it into the kernel profiles; neither models admission control or queue-full rejection. Each tool captures a subset of the pipeline; in our evaluation their median end-to-end error spans 17% to 619% (§4), reaching the upper end outside the regime a tool was calibrated for. Vidur and LLMServingSim require re-profiling for each new model, GPU, or TP, restricting coverage to already-profiled configurations; AIConfigurator profiles only per GPU type and precision, deriving unseen models and parallelism degrees analytically, but cannot cover a GPU absent from its database.
Simulation Pipeline
Engine layer. At an instance, an admitted request enters a wait queue ordered by the scheduling policy (first-come-first-served, priority, or shortest-job-first). Batch formation then admits requests from the wait queue up to the configured limits on running requests and scheduled tokens, allocating KV-cache blocks for each. When the KV cache cannot satisfy a new allocation, the policy preempts running requests to free blocks, selecting victims by arrival order or priority. A preempted request must later recompute its evicted KV state before resuming, exactly the cascade described in §2.2. Step execution calls the latency model of §3.2 on the formed batch, advances the clock by the predicted step time, and schedules the next step. Long prompts are split across steps by chunked prefill, interleaving a large prefill with ongoing decodes rather than stalling them in one step. The engine maintains a work-conserving invariant: if the wait queue is non-empty after a step completes, a subsequent step is always scheduled, so the instance never idles while work is pending.
Data plane. At cluster scale, a request first passes admission control, which may gate or shed it based on the current router view of cluster load. Admission policies range from admitting all traffic to saturation-based flow control. An admitted request is then routed by a scorer framework that combines weighted signals (queue depth, KV-cache utilization, prefix affinity, and load balance) into a per-instance score, the same composition used by the production llm-d router. These decisions read periodically refreshed snapshots of instance state (queue depth, KV utilization, batch size, in-flight count) rather than instantaneous truth, reproducing the staleness-induced feedback of §2.2. A cluster-level event queue orchestrates the per-instance queues so that this coupling across instances is simulated rather than approximated.
Workload generation. The pipeline is driven by one of three workload sources. Synthetic workloads draw arrivals from a configurable process (Poisson, gamma, Weibull, or constant) with prompt- and output-length distributions and per-request SLO tiers (critical, standard, sheddable). Trace replay reissues captured request traces with either their original timing or simulation-computed timing. Closed-loop session workloads model multi-turn conversations in which each follow-up arrives a think-time after the previous response completes.
Experimental Setup
Models. We select six models spanning dense and MoE architectures, 8B–141B parameters, and distinct attention mechanisms: four dense models (Llama-3.1-8B, Qwen3-14B, CodeLlama-34B, and Llama-2-70B) and two MoE models (Mixtral-8x7B, 47B total/13B active; Mixtral-8x22B, 141B total/39B active). None of these six models appears in the training set used to fit BLIS’s coefficients; the two sets are disjoint by design (§3.3), so the evaluation tests generalization to unseen parameter counts and model families within the dense (multi-head and grouped-query attention) and mixture-of-experts transformer classes BLIS covers (§3.2).
Hardware. Experiments run on three NVIDIA GPU types spanning distinct memory-bandwidth, compute, and interconnect profiles: H100-80GB SXM (NVLink), A100-80GB SXM (NVLink), and L40S (48 GB, PCIe), testing whether the latency model generalizes across hardware generations without per-GPU re-profiling.
BLIS and Vidur replay full per-request traces. LLM-Optimizer and AIConfigurator are steady-state estimators that do not natively accept request-rate inputs; we derive their concurrency parameters via throughput-matching (Appendix C), whose discretization residual (mean 8.7% and 12.3%) is well below their latency prediction error, so the translation is not the source of their inaccuracy. LLMServingSim runs its cycle-level simulator with the analytical ASTRA-Sim backend on a proportionally sampled 1,000-request subset per experiment, since the full 10k+ request workloads are infeasible at cycle granularity, and is compared against vLLM ground truth on that subset.
Why Policy Evolution Requires BLIS
BLIS models the coupled dynamics of distributed LLM serving and exposes each policy axis (admission, routing, scheduling) as a pluggable interface mirroring a distributed inference stack: a deployment composes named, weighted scorers as in llm-d, so a policy studied in simulation transfers smoothly. This makes BLIS a suitable inner loop for a policy-evolution workflow in which human operators or AI agents explore, evaluate, and refine serving policies.
This binary threshold fires only at deep queues and near-full KV caches, so critical-tier requests admitted just before it suffer elevated TTFT from contention with queued sheddable traffic (§2.2). A policy shedding sheddable traffic gradually, before the threshold, protects critical-tier latency. The design space spans the shedding-curve shape, the saturation definition, and threshold parameters.
Simulation-driven policy evolution. Evolving a better policy on real hardware is impractical: a single workload evaluation on a GPU cluster takes 17–42 minutes (measured on H100 nodes running Qwen3-14B with 10,000 requests), and evaluating many candidate policies across multiple workloads multiplies this cost. In BLIS the same evaluation completes in seconds.
Discussion and Limitations
The accuracy study (§4) characterizes where BLIS’s predictions degrade; this section addresses the simulator’s broader limitations to be addressed in future work. Most limitations below are matters of coverage rather than of design: each unmodeled feature maps to a specific model term or module (§3), so adding it extends BLIS rather than restructuring it.
Interconnect and parallelism. BLIS reduces communication to a bandwidth-based analytical term (§3) that omits three effects. Topology is invisible, so peers sharing an NVLink domain, a rack, or a cross-rack path are modeled identically. Contention is under-modeled, since each transfer is assumed to see full bandwidth; this is why the all-reduce term under-estimates NVLink contention at higher tensor-parallel degrees (§4.6) and would diverge further on shared cross-node links. Latency variability is absent, as a deterministic constant cannot reproduce jitter from queueing or congestion. A topology- and contention-aware term would close these, with larger gains across nodes. In terms of parallelism, the main gap is expert parallelism, where the all-reduce term does not capture all-to-all dispatch and would enter as a separate term (pipeline and hybrid parallelism are likewise unmodeled).
Model, hardware, and workload scope. Our evaluation covers dense and mixture-of-experts transformers on NVIDIA GPUs (H100, A100, L40S), drawn largely from a few popular model families (Llama, Qwen, Mistral), under ServeGen and Azure traces (§4.1). Within this family BLIS generalizes to unseen models and GPUs without re-fitting, since the basis functions read their inputs (FLOPs, memory traffic, layer and head counts) from the HuggingFace config.json and GPU datasheet (§3.3); a new architecture adds a basis term while existing coefficients stay valid (Appendix F). Generalization may weaken where those inputs no longer capture execution: state-space models and RWKV carry recurrent state in place of the KV cache, and multi-head latent attention reshapes the per-token cache, neither of which the current decode term models. Non-NVIDIA accelerators (AMD GPUs, TPUs) are untested, and the NVIDIA-fit overhead terms would likely need re-fitting per vendor. Workloads with extreme characteristics absent from our traces (e.g., very long multi-turn conversations or bursty order-of-magnitude spikes) may also exhibit different error profiles.


