# Prefix-cache check: warm and cold prompts on an RTX 6000 Ada

Measured: 24 November 2026

This directory records a check made after the three A40 engine tests. It
measures how much the prefix cache flattered the published A40 figures, by
running vLLM, SGLang and TensorRT-LLM on one RTX 6000 Ada twice: once with the
A40 method exactly, and once with every prompt new.

## Why the check was needed

The A40 tests used `vllm bench serve --dataset-name random --seed 0`. A fixed
seed produces the same prompt sequence every time, so:

- each concurrency level reused the prompts of the level before it (the 80
  prompts at concurrency 8 begin with the 50 used at concurrency 1, and so on
  up to 64);
- the second sweep repeated the first exactly.

All three engines had prefix caching on by default (vLLM prefix caching,
SGLang's radix cache and TensorRT-LLM KV cache block reuse). Repeated prompts
therefore skipped much of their prompt processing. The published A40 tables
come from the second sweep, so they describe a warm cache, not unique traffic.

The engines' own counters on this card confirm it:

- vLLM: last logged prefix cache hit rate of 59% after the standard runs, and
  0.4% after the cold run. vLLM computes this rate over its most recent
  requests rather than the whole run, so read it as a level, not a total.
- SGLang: 464,107 cached prompt tokens against 652,572 new over the standard
  runs (41.6%), and 2,052 cached tokens over the cold run.
- TensorRT-LLM does not log a comparable counter.

## Method

- Provider: RunPod Secure Cloud, on-demand, US-KS-3
- Hardware: one NVIDIA RTX 6000 Ada Generation, 48 GB, driver 595.112.07. All
  three engines ran on this same physical card, one at a time.
- Image: `nvcr.io/nvidia/tensorrt-llm/release:1.2.1`. vLLM 0.34.0 and SGLang
  0.5.23 ran in their own virtual environments on top of it.
- Model: `Qwen/Qwen2.5-7B-Instruct` in BF16, engine defaults
- Load generator: `vllm bench serve` 0.34.0, `/v1/completions`, 512 input and
  256 output tokens, `random_range_ratio 0.0`, concurrency 1, 8, 32 and 64,
  prompts = max(10 x concurrency, 50)
- Per engine, in order: one first-request probe, sweep 1 and sweep 2 with
  `--seed 0` (the A40 method), a server restart to empty the cache, then a
  cold sweep with `--seed 1000 + concurrency`, so every level had its own
  prompts.

SGLang 0.5.23 depends on a pre-release package (`flash-attn-4>=4.0.0b18`), so
it was installed with pre-releases allowed for that package only.

## Results: second sweep (warm) against cold

| Engine | Concurrency | Warm tok/s | Cold tok/s | Change | Warm p99 TTFT | Cold p99 TTFT | Warm p99 ITL | Cold p99 ITL |
| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
| vLLM | 1 | 58.20 | 57.71 | -0.8% | 60 ms | 90 ms | 17.8 ms | 18.1 ms |
| vLLM | 8 | 447.25 | 406.09 | -9.2% | 129 ms | 581 ms | 20.1 ms | 19.7 ms |
| vLLM | 32 | 1,522.76 | 1,132.08 | -25.7% | 395 ms | 2,254 ms | 28.8 ms | 277.3 ms |
| vLLM | 64 | 2,095.23 | 1,633.08 | -22.1% | 2,483 ms | 4,316 ms | 283.1 ms | 286.6 ms |
| SGLang | 1 | 59.03 | 58.96 | -0.1% | 73 ms | 103 ms | 17.6 ms | 17.7 ms |
| SGLang | 8 | 434.96 | 409.15 | -5.9% | 565 ms | 571 ms | 18.9 ms | 19.5 ms |
| SGLang | 32 | 1,237.72 | 1,150.95 | -7.0% | 2,022 ms | 2,104 ms | 22.3 ms | 23.6 ms |
| SGLang | 64 | 2,042.17 | 1,646.32 | -19.4% | 4,035 ms | 4,088 ms | 27.4 ms | 28.2 ms |
| TensorRT-LLM | 1 | 58.47 | 57.96 | -0.9% | 67 ms | 115 ms | 20.9 ms | 21.0 ms |
| TensorRT-LLM | 8 | 445.30 | 403.50 | -9.4% | 120 ms | 618 ms | 21.9 ms | 22.5 ms |
| TensorRT-LLM | 32 | 1,230.50 | 1,134.89 | -7.8% | 2,069 ms | 2,125 ms | 26.2 ms | 27.4 ms |
| TensorRT-LLM | 64 | 2,076.95 | 1,654.47 | -20.3% | 2,111 ms | 4,129 ms | 153.2 ms | 76.2 ms |

`summary.csv` has every run, including both standard sweeps and the
first-request probes, with median TTFT and TPOT.

## What the check shows

- **Throughput at high load was flattered by about a fifth.** At concurrency
  64, cold throughput was 19% to 22% lower than warm for all three engines. At
  concurrency 1 the cache made under 1% of difference.
- **With unique prompts, the engines tied.** Cold throughput at concurrency
  64 was 1,633, 1,646 and 1,654 tokens per second, a spread of 1.3%.
- **The first-token ordering under load was a cache effect.** Warm, vLLM had
  the shortest p99 time to first token at high load. Cold, all three were
  within about 7% of each other at concurrency 32 and 64, and vLLM was not the
  fastest.
- **vLLM's tail-latency spikes are real.** Its p99 inter-token latency stayed
  near 280 ms with cold prompts at concurrency 32 and 64, while SGLang stayed
  under 30 ms. The spike at concurrency 32 vanished only in the warm second
  sweep, where almost no prompt processing remained.
- **TensorRT-LLM's warm-up stall repeated.** Its first request after start-up
  waited 81.3 seconds for its first token. After the restart for the cold
  sweep, the first requests were served normally.

## Boundary

This check ran on an RTX 6000 Ada, not an A40. The A40 was out of stock on
RunPod Secure Cloud on the evening of the test, so its cold figures are
estimated from this card, not measured. The raw JSON exports, with
per-request timings, will be published with the RTX 6000 Ada reports; the
`raw_file_sha256` column lets them be checked against this summary.
