TECHNOLOGY

llm-perf: replay coding-agent workloads without losing the denominator

In this article
THE QUICK TAKE

Trace replay can expose session and cache behavior, but reconstructed prompts and unequal completed-call populations limit performance comparisons.

A coding agent makes a sequence of related requests: tool execution separates calls, conversation history grows, and repeated prefixes may remain cached. A benchmark drawing unrelated prompts can miss those properties. The llm-perf project provides a trace-replay mode for investigating them on llama-server and vLLM. Its value is a measurable workload reconstruction, rather than evidence that any particular server is faster.

A trace is a workload description

The converter uses the Azure coding-agent dataset, whose records describe sessions and model calls. Those operational observations characterize the supplied workload; they do not make the reconstructed requests equivalent to the original coding task. A server benchmark and an evaluation of whether an agent repairs software answer different questions.

Session timing and request dependencies matter. Replaying several independent sessions can expose competition for memory and scheduling, while sequential calls inside a session preserve a dependency that a flat request list loses. An apparent throughput advantage is useful only alongside completed-call coverage and waiting time. The inference measurement guide explains those measurement boundaries.

Reconstructed prompts have limits

llm-perf builds prompts using earlier messages, the tested server’s actual reply and filler to approach recorded sizes. It uses server tokenization and chat-template rendering. Consequently, it reproduces size and reuse structure rather than original prompt semantics. Template differences can move shared-prefix boundaries even when total lengths appear close.

The project reports reconstructed versus server-reported token counts and marks inferred reuse. Such diagnostics belong in the result: silently accepting a different rendered prompt changes the experiment. The documented conversion holds selected sessions in memory before sorting, so conversion resources also depend on the selected dataset. Its example memory observations describe particular inputs, rather than a general capacity guarantee.

Cache reuse needs observable counters

For vLLM, the documented replay path requires prefix caching and prompt-token details. Without cached-token reporting, the run cannot establish reuse; enabling metrics alone does not enable the caching mechanism. The vLLM metrics documentation distinguishes request waiting, prefill, decode, first-token latency and cache-related measurements. These are complementary observations, rather than interchangeable measures of speed.

A change in observed reuse can reflect workload composition, cache pressure or prompt reconstruction. The useful comparison joins calls by session and call identity across runs, then examines the same subset. Otherwise an overloaded run that never reaches later, longer calls can appear favorable because its summary measures an easier population. The KV-cache preemption explanation provides the memory-management context for that investigation.

A shared timeline still needs verification

The tool can record load-generator and server metrics into a common archive. That helps connect rising client latency with server-side waiting or memory pressure. However, an unavailable server metrics endpoint can leave an archive containing only the load generator; archive existence alone does not establish complete instrumentation.

A defensible report therefore retains the exact trace selection, server build, model, template, context allowance, cache state and per-call outcomes. Separate failed or unsent calls from completed ones, and distinguish a causal explanation from a temporal correlation. Repeating the comparison with a controlled low-load run helps determine whether the same calls changed behavior. The published functionality supplies this diagnostic route; it does not supply an independently verified performance improvement or a precise release date for the incoming topic.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles