vLLM 0.33 after a restart: KVStash next to vLLM's own caches
Same GPU, same prompts, vLLM 0.33. While the engine runs, its own GPU cache and CPU tier are faster than KVStash. Both live inside the engine process, so a restart empties them. After a clean restart of the vLLM process, with the KVStash store kept running in the same container, a 110k-token prompt took 22.0 s to recompute and 1.53 s to read back from KVStash; with the store on a separate AWS instance over a 25 Gbit/s link it took 3.03 s. Study 2's 524k-token prompt took 483 s to recompute and 3.7 s from KVStash.
Last updated
-
22.0 s→1.53 s
Qwen2.5-7B, 110k-token prompt, after a clean restart of the vLLM process with the store kept running in the same container: recomputed, or read back from KVStash over loopback (median of 15 requests on 3 GPUs; 4.5-14.3x faster from 8k to 110k, after the first request). No other store that survives a restart was measured.
-
483 s→3.7 s
GLM-4-9B-chat-1M (fp8 KV), Study 2's 524k-token prompt: computed by a stock engine (481-486 s), or read back from KVStash after the same kind of restart (3.58-3.89 s). 2 GPUs, one request of each per GPU, medians of the two shown; recompute in eager mode as in Study 2, not tuned.
-
0.81 s vs 1.52 s
vLLM's own CPU tier against KVStash while the engine runs, 110k tokens: the engine's tier is faster until a restart empties it.
- vLLM 0.33.0 with the vllm-kvblockd 0.2.0 release candidate (PyPI has 0.1.2), one L40S per engine, measured 9 November 2026 on Modal.
- Text prompts, tokenization included.
- Store in the same container, over loopback TCP.
GPU cache, CPU tier and KVStash, 8k to 110k tokens
vLLM's built-in CPU offloading and the KVStash store got 56 GiB each. Each cell is the median of 15 requests in 3 containers on 3 GPUs (the first-request row: 3); the smaller line is the range.
Figure 1Time to first token on vLLM 0.33
Log scale: each step to the right is a multiple, not an amount.
| Where the prompt's KV came from | 8k tokens | 32k tokens | 110k tokens |
|---|---|---|---|
| Recomputed (stock vLLM) | 0.62 s0.62-0.64 s | 3.41 s3.33-3.54 s | 22.0 s21.4-23.3 s |
| vLLM's GPU prefix cache | 0.046 s0.041-0.049 s | 0.099 s0.089-0.10 s | 0.28 s0.25-0.30 s |
| vLLM's CPU tier, engine running | 0.096 s0.080-0.098 s | 0.26 s0.20-0.27 s | 0.81 s0.55-0.87 s |
| vLLM's CPU tier after a restart (empty: recomputed) | 0.64 s0.61-0.65 s | 3.46 s3.29-3.68 s | 22.1 s21.2-23.5 s |
| KVStash, engine running | 0.14 s0.11-0.15 s | 0.46 s0.34-0.47 s | 1.52 s1.08-1.68 s |
| KVStash, after a restart | 0.14 s0.11-0.15 s | 0.46 s0.34-0.47 s | 1.53 s1.08-1.64 s |
| KVStash, first request of each length after a restartleft out of the row above; the 8k one is the first after the engine starts and carries a one-time cost | 0.63 s0.43-0.67 s | 0.49 s0.35-0.49 s | 1.54 s1.10-1.57 s |
| First request with vLLM's CPU tier on (writes it) | 0.64 s0.63-0.65 s | 3.43 s3.40-3.70 s | 21.9 s21.1-22.7 s |
| First request with KVStash on (writes it) | 0.68 s0.67-0.70 s | 3.58 s3.54-3.66 s | 22.4 s21.9-24.0 s |
- vLLM 0.33.0 (official image), vllm-kvblockd 0.2.0 (release candidate); kvblockd 0.2.3, DRAM arena only, documented connector defaults.
- Qwen2.5-7B-Instruct, BF16, YaRN x4 (131,072-token context).
- One L40S per container, 3 containers, 5 prompts per length per container. vLLM CPU tier: --kv-offloading-size 56.
- Engine running: GPU prefix cache reset, engine kept running.
- After a restart: new engine process, store kept running.
Study 2's 524k-token prompt on vLLM 0.33
The same model, prompt (SHA-256 795ab1d2), fp8 KV and block size as Study 2, now on vLLM 0.33 with the released daemon and the vllm-kvblockd 0.2.0 release candidate, next to vLLM's own caches.
Figure 2524,231-token prompt on vLLM 0.33
| Where the prompt's KV came from | GPU 1 | GPU 2 |
|---|---|---|
| Recomputed (stock vLLM) | 481.0 s | 485.9 s |
| vLLM's GPU prefix cache | 0.92 s | 1.14 s |
| vLLM's CPU tier, engine running | 1.84 s | 2.07 s |
| KVStash, engine running | 3.42 s | 3.24 s |
| KVStash, after a restart | 3.58 s | 3.89 s |
Every request returned its passkey; where the row says KVStash, 524,224 tokens came from the store (8,191 blocks of 64, 21.47 GB at 40,960 bytes per token in fp8). Questions 2-4 got the same answer from the GPU cache, the CPU tier and KVStash (question 1 was asked only of the recompute and the first write). After a restart the release candidate read the prompt back in 3.58-3.89 s; Study 2's build on vLLM 0.25.1, a new engine reading the same prompt back, took 2.45-3.24 s across its six runs (data on that page).
- vLLM 0.33.0, THUDM/glm-4-9b-chat-1m (rev f8579ac0), fp8 KV, block 64, eager mode, max-num-batched-tokens 16384 (as in Study 2, not tuned for recompute); vLLM CPU tier and KVStash 32 GiB each; 2 L40S GPUs in separate containers.
- Each request is the 524,231-token prompt plus one passkey question (524,256 tokens).
- Per GPU: recompute and KVStash after a restart 1 request each, GPU cache and CPU tier 3, KVStash with the engine running 2.
The store on a separate instance, over a 25 Gbit/s link
An AWS g6e.8xlarge runs vLLM; a c7gn.8xlarge (a different instance family, so a different physical host) runs only the KVStash daemon, in the same availability zone. Before the run, iperf3 measured 4.96 Gbit/s with one stream, 19.86 with four and 24.85 with sixteen from the store to the engine: the GPU instance's 25 Gbit/s limit.
-
21.5 s→3.03 s
The store on a separate AWS instance over a 25 Gbit/s link, 110k-token prompt after a vLLM restart: recomputed, or read from the other instance (3 requests; 2.4-7.1x faster from 8k to 110k, after the first request after the restart, which at 8k took 1.78 s against 0.61 s to recompute).
Figure 3Same instance and separate instance, AWS
| Where the prompt's KV came from | 8k tokens | 32k tokens | 110k tokens |
|---|---|---|---|
| Recomputed | 0.61 s0.61-0.62 s | 3.32 s3.30-3.33 s | 21.5 s21.5-21.6 s |
| vLLM's GPU prefix cache | 0.047 sall 0.047 s | 0.10 sall 0.10 s | 0.29 sall 0.29 s |
| KVStash in the same instance, after a restart | 0.13 s0.12-0.13 s | 0.33 s0.33-0.34 s | 1.14 s1.04-1.16 s |
| KVStash on the other instance, after a restart | 0.26 sall 0.26 s | 0.91 s0.90-0.92 s | 3.03 s2.96-3.29 s |
| KVStash on the other instance, engine running | 0.26 s0.26-0.27 s | 0.91 s0.89-0.91 s | 3.08 s2.99-3.18 s |
| KVStash on the other instance, first request of each length after a restart | 1.78 sone request | 0.92 sone request | 3.13 sone request |
Over the network the 110k-token prompt (about 6.3 GB of KV) came back in 3.03 s, 7.1x faster than recomputing and 2.7x slower than from the same instance. With its default 4 streams the connector reads at about the 2.48 GB/s that four TCP streams carried in our own link test; the link carries more with more streams (iperf3 above). vLLM's CPU tier and a recompute after a restart were not measured on AWS.
- g6e.8xlarge (1x L40S, 25 Gbit/s) engine, c7gn.8xlarge (Graviton3E, 100 Gbit/s) store (KVStash 56 GiB, no evictions), us-east-1a, same AZ, no placement group. vLLM 0.33.0 (official image), vllm-kvblockd 0.2.0 (release candidate) with documented defaults (4 streams, 1 GiB write queue, nothing dropped); Qwen2.5-7B-Instruct, BF16, YaRN x4 (131,072-token context).
- 3 prompts per length plus a first one per length left out.
- Measured 9 November 2026.
Setup
- Engine
- vLLM 0.33.0 (official image), vllm-kvblockd 0.2.0 (release candidate)
- Store
- kvblockd 0.2.3, DRAM arena only, documented connector defaults; kvblockd Python client 0.2.0; same container over loopback TCP in Figures 1-2, a separate instance in Figure 3
- Models
- Qwen2.5-7B-Instruct, BF16, YaRN x4 (131,072-token context) (Figure 1); THUDM/glm-4-9b-chat-1m rev f8579ac0, fp8 KV, block 64 (Figure 2)
- GPU
- One L40S 48 GB per engine, on Modal (Figures 1-2); one L40S in an AWS g6e.8xlarge (Figure 3)
- Prompts
- Distinct passkey prompts of about 8k, 32k and 110k tokens, no shared prefix between prompts; the first prompt of each length warms that shape and is left out (Figure 1); Study 2's 524,231-token prompt with five passkeys (Figure 2)
- Tier sizes
- vLLM CPU tier (--kv-offloading-size) and KVStash store: 56 GiB each in Figure 1, 32 GiB each in Figure 2.
- Engine settings
- Figure 1: vllm serve with --revision, --max-model-len 131072, --hf-overrides for YaRN, --enable-prompt-tokens-details, defaults otherwise (CUDA graphs on, GPU memory utilization 0.9). Figure 2: --kv-cache-dtype fp8, --block-size 64, --max-num-seqs 1, --max-num-batched-tokens 16384, --gpu-memory-utilization 0.92, --enforce-eager.
- Connector and daemon
- vllm-kvblockd with endpoint, namespace and token only (defaults: 4 streams, 1 GiB write queue); kvblockd DRAM arena 56 GiB (Figure 1) or 32 GiB (Figure 2), hugepages off, no NVMe or S3 tier.
- Network run
- Figure 3 on AWS: g6e.8xlarge (1x L40S, 25 Gbit/s) and c7gn.8xlarge (Graviton3E, 100 Gbit/s), us-east-1a, same AZ, no placement group; vLLM 0.33.0 official image, same release files and settings as Figure 1.
- Measured
- 9 November 2026: Figures 1 and 2 on Modal (one container per GPU), Figure 3 on AWS. Run ids m1-b, m5-a, m5-p and m6-a in the downloads; an earlier run, m1-a, used the same protocol on one container, and its KVStash arm did not start (the connector refused a local model path under offline mode), so it is not shown.
Method
- Each container runs every arm of its study, one after the other, on its own GPU (UUIDs in the downloads): same GPU, same prompts, same settings apart from the cache tier. Order: stock vLLM, CPU tier, KVStash. The profile run m5-p ran only KVStash arms.
- Prompts (Figure 1): distinct passkey prompts of about 8k, 32k and 110k tokens that share no prefix. Each container runs one more prompt per length than the counts given: the first of each length is left out of the medians and has its own row. The very first request after an engine starts (an 8k prompt) carries a one-time cost, mostly on the KVStash path.
- Time to first token is measured on a streamed request from sending it to the first token arriving, with the prompt sent as text: tokenizing is included in every arm, which narrows the visible gap between cache paths.
- "Engine running": vLLM's /reset_prefix_cache drops the GPU prefix cache and keeps connector tiers; the prompt is then sent again to the same engine.
- "After a restart": the engine process is stopped and a new one started in the same container with the same settings; the KVStash daemon keeps running.
- A request counts only if vLLM's and the store's counters show where its KV came from: GPU, CPU tier or KVStash. Requests that fail the check are left out of the medians; the JSON counts them per cell.
Limits of this study
- While the engine runs, vLLM's own GPU cache and CPU tier are faster than KVStash (110k tokens: 0.28 s, 0.81 s and 1.52 s).
- Writing to KVStash slows the request that first computes a prompt by 2-9%; vLLM's CPU tier by at most 3% (last two rows of Figure 1).
- The first request after a restart pays a one-time cost: 0.43-0.67 s at 8k tokens, against 0.14 s later and 0.62 s to recompute. The first request ever written to KVStash took 1.09-1.26 s at 8k, against 0.68-0.74 s for the first recompute. On AWS (Figure 3) the first request after a restart took 1.78 s from the other instance and 1.85 s from the same instance at 8k, against 0.70 s for the first recompute, and the first write 2.19 s.
- GPUs differ: in Figure 1 one reported a PCIe x16 link and two x8, and both CPU tiers were faster on the x16 one. Medians mix all GPUs; the per-request file has each.
- Two models: Qwen2.5-7B-Instruct (BF16, YaRN to 131k context) in Figure 1, GLM-4-9B-chat-1M (fp8 KV) in Figure 2; one L40S per engine; tensor parallel 1; one request at a time; store on the same machine over loopback TCP except in Figure 3.
- At 524k tokens the release candidate on vLLM 0.33 read the prompt back after a restart in 3.58-3.89 s, slower than Study 2's build on vLLM 0.25.1 (2.45-3.24 s, same prompt, a new engine reading it back). In a separate run (m5-p, one GPU, one request after a restart each) the read took 4.07 s with the default settings, 4.95 s with Study 2's connector settings (8 streams) and 4.38 s with 16 streams, so the settings do not explain the gap. A read right after a restart is also the first request after the engine starts.
- vllm-kvblockd 0.2.0 is the release candidate of the next PyPI upload (PyPI has 0.1.2); kvblockd client 0.2.0 and daemon 0.2.3 are released.
- Not measured: vLLM's CPU tier and KVStash together, other persistent vLLM connectors, eviction under memory pressure, a store on another host over a faster link or a placement group, prompts that repeat only in part, load from many concurrent requests, the NVMe and S3 tiers.
- Figure 2 ran vLLM in eager mode with 16,384-token batches, as Study 2 did; recompute was not tuned.
Check it yourself
Every timed request with its answer and the counter check, and the medians the tables show.
Questions about this study
Changelog. 10 November 2026: first publication; Figures 1 and 2 measured on 9 November on Modal, Figure 3 on 10 November on AWS.
Is KVStash faster than vLLM's own cache?
No, not while the engine holds the prompt. At 110k tokens vLLM's GPU prefix cache returned the first token in 0.28 s and its CPU tier in 0.81 s, against 1.52 s from KVStash with the engine running: 1.5-1.9x the CPU tier's time to first token and 3.0-5.5x the GPU cache's from 8k to 110k. Taking away the time a GPU-cache hit also needs (tokenizing, scheduling, the last block), KVStash's load path took 1.9-2.3x as long as the CPU tier's. At 524k tokens, median per GPU: GPU cache 0.92 s and 1.14 s, CPU tier 1.84 s and 2.07 s, KVStash 3.42 s and 3.24 s. Those engine tiers live inside the engine process, so a restart empties them.
Then when does KVStash help?
When the engine process restarts and the store keeps running: a clean stop and start of the same engine with the same settings, with the store in the same container (Figures 1 and 2) or on another instance (Figure 3). The daemon is a separate process (a sidecar or its own service), so it keeps running when the engine is restarted or upgraded. With the store in the same container that was 4.5-14.3x faster than recomputing from 8k to 110k tokens on Qwen2.5-7B (after the first request), and 125-134x on the two GPUs at 524k on GLM-4-9B-chat-1M. vLLM's built-in CPU offloading does not survive a restart; other vLLM connectors that persist KV were not measured. Every counted read hit; Figure 1 filled about 48 of the 56 GiB in each tier, and eviction under memory pressure was not exercised. Not measured here: a crash or replacement of the host (a DRAM-only store does not survive losing its own host), a new replica or a second engine reading what another wrote, and workloads where only part of the prompts repeat.
Did both sides get the same memory?
Yes: vLLM's CPU tier (--kv-offloading-size) and the KVStash store had 56 GiB each in Figure 1 and 32 GiB each in Figure 2. That counts the KV pools only, not the connector's write queue (1 GiB by default) or the daemon's own memory.
Did reading the cache back change the answers?
Every prompt hides an 8-character passkey and asks for it at the end, and every request that counts returned its passkey. The full 16-token answer is a stricter test, and it varies even without a cache. Matches with the container's first recompute: 8k: KVStash 13 of 15, GPU cache 13 of 15, CPU tier 13 of 15, second recompute 13 of 15; 32k: KVStash 7 of 15, GPU cache 11 of 15, CPU tier 6 of 15, second recompute 7 of 15; 110k: KVStash 12 of 15, GPU cache 12 of 15, CPU tier 12 of 15, second recompute 10 of 15. At 524k the recompute answered question 1 and the cache paths questions 2-4; each of those got the same answer from the GPU cache, the CPU tier and KVStash. The per-request file has each answer.
What about a store on another machine?
Figure 3 puts the store on a separate AWS instance, 25 Gbit/s away: a 110k-token prompt came back in 3.03 s after a restart, against 21.5 s to recompute and 1.14 s with the store on the same instance. The time grows with the KV bytes divided by the link speed; a faster link might shorten it (not measured). More connector streams did not help over loopback in Figure 2's profile run.
Why vLLM only?
This page covers vLLM 0.33. SGLang results are in Studies 1a and 1b on the benchmarks page. LMCache and other stores were not measured here.
Can I check these numbers?
Yes. The per-request file has every timed request: arm, prompt, container, time to first token, the answer, whether it matched the recompute, and whether the counters showed the KV coming from where the arm says. The JSON has the table cells and the GPU (UUID and PCIe width) behind each container. All 562 requests, first requests included, passed the counter check (0 failed). The tables are medians of those rows, computed by script.
Bring one workload. We will measure it with you.
Tell us your engine, model, GPUs and where context repeats or gets lost. We reply with what we would measure, what success looks like, and when KVStash is not worth it.
Or write to rudray@kvstash.com