Pacer
LLM inference scheduling · built from scratch

Pacer

An LLM server whose scheduler knows how sure it is. It predicts every step's latency, bounds the prediction with an online conformal guarantee, and keeps users inside their latency targets when the hardware slows down mid-run.

85%of in-flight requests within SLO during a real noisy-neighbour slowdown. Best standard scheduler: 49%.
8.5–10.4%steps over the latency bound on real hardware, against a 10% target. The guarantee held.
+49%capacity at 90% SLO attainment over the best fixed chunked-prefill budget (7.00 vs 4.71 req/s).
0.94worst-case share of the best policy's capacity across six workloads. Best fixed budget: 0.70.
Step latency trace · p90 per second

The hardware gets 1.5× slower at second 26

The problem

Every batch is a trade between two kinds of user

Continuous batching runs prompt processing (prefill) and token generation (decode) in the same GPU step. Each prompt token you add makes the step slower for everyone already generating. Each one you hold back delays somebody's first token. vLLM and TensorRT-LLM settle this with a fixed token budget per step and a hand-tuned safety margin.

The right budget depends on the model, the accelerator, the SLO and the traffic, and it moves. A roofline analysis of Llama-3-8B puts the free prefill headroom at about 200 tokens on an A100 and about 600 on an L4. At run time, co-tenants and throttling change step latency by tens of percent. A scheduler that packs steps up to its latency prediction is exactly the scheduler that breaks when the prediction goes stale.

How a scheduling step works

Predict, bound, size, order. Every few milliseconds.

1 · predict

Physics-shaped latency model

Seven features with physical units: GEMM tokens, prefill attention FLOPs, decode KV bytes, padding, per-sequence cost. Non-negative least squares. 7.3% error, and 4.4% on step sizes it never saw.

2 · bound

Online conformal risk control

After each step it records actual ÷ predicted and updates its bound with adaptive conformal inference. The long-run miss rate converges to 10% for any sequence of ratios, drift included.

3 · size

Model-predictive budget

Binary search for the largest prompt chunk whose bounded latency still meets the time-per-token SLO. A dot product per probe, microseconds per decision.

4 · order

Moore-Hodgson queueing

The exact algorithm for minimising missed deadlines on one machine decides which prompts to serve first. Hopeless prompts wait, so savable ones make it.

bound: α(t+1) = α(t) + γ · (α − 1[actual/predicted > q(t)]) budget: max c such that q(t) · predicted_latency(decodes + chunks(c)) ≤ SLO_tpot
Real engine · steady state

Capacity at 90% SLO attainment

Requests per second a 4-core CPU sustains with at least 90% of requests meeting TTFT 2 s and TPOT 100 ms. One run each; an earlier run measured the fixed budget at 5.36.

Simulator · six workloads

Worst case across workloads

Capacity as a share of the best policy, minimum over Poisson at three SLOs, bursty arrivals and the Azure chat and code production traces. The simulator matches the real engine within 3.3 points on average.

Real engine · noisy neighbour

Requests within SLO during the slowdown

SchedulerIn driftOverall
Fixed budget 12847.7%71.5%
Fixed 128 + deadline order48.6%72.0%
Pacer, offline calibration37.6%66.0%
Pacer, online calibration85.3%92.0%
600 profiled steps

Latency model error

ModelRandom splitExtrapolating
Roofline + 2 scalars50.2%81.0%
Gradient-boosted trees17.9%50.8%
Linear + tree residual9.9%5.0%
Physics-shaped linear7.3%4.4%

Mean absolute percentage error. Extrapolation trains on steps of at most 512 tokens and tests on larger ones.

What didn't work

A clever scheduler without calibration is a liability

Pacer with offline calibration had the best steady-state capacity and the worst result under drift: 37.6%, below every static baseline. It fills each step right up to the bound it believes, so once the machine slows, every step overshoots. Static budgets survive by accident, because they leave slack nobody planned. Online calibration is what turns the model-predictive idea from fragile into robust.

Spending banked time-per-token slack on larger prompt chunks never helped across six scenarios and sometimes hurt, so it is off by default and reported as a negative result.

Scope

What was measured, and what wasn't

Read more