Questions 16–20

What does retaining shared context buy?

Singleflight already coordinates one engine restoration. External retention supplies the missing read-once behavior. These five questions measure that gain, the cost of holding state, and the additional value of preparing it before arrival.

On this page
  1. Does keeping data in LMCache stop repeat SSD reads?
  2. Can the traces qualify family retention?
  3. Does holding the ancestor pay under pressure?
  4. Does model-driven branching leave room for better retention?
  5. Does loading shared context early actually help?

16. Does keeping data in LMCache stop repeat SSD reads?

Yes. We removed the repeated SSD reads and measured latency again. Section 15 prepares shared context in vLLM, but follow-up lookups can still reread that context from the SSD. Here we also keep a copy in LMCache, so those lookups find it in memory. Every measured group with retention reads the 48 MiB shared state from SSD exactly once, including preparation.

Is this section 15 retested with the read problem fixed?

It is a follow-up test of the fix, but it asks a narrower question. Both sides here prepare early, with a 250 ms head start. Both must finish warming before the follow-ups arrive. We compare keeping LMCache's copy against discarding that copy after loading vLLM.

ExperimentWhat changes between its controls?
Section 15Load when follow-ups arrive, or prepare early with different head starts.
Section 16, measured herePrepare early in both cases. Keep LMCache's copy or let later lookups reread SSD.
Section 20 completes the comparisonLoad on arrival versus prepare early, with one complete read of the shared context verified in both. Early preparation reduces waiting on both transfer paths in that controlled test.

Do not compare section 15's latency numbers directly with this table to claim the fix helped or hurt. These are different experiments. Section 20 makes the matched comparison with the read-saving behavior enabled in both approaches.

Host DRAM and DMA-BUF are different cache arrangements

External L1 means LMCache's in-memory cache outside vLLM. It is not the CPU's hardware L1 cache. Its memory can be host DRAM or a GPU buffer. The table tests retention off and on within each of these two paths:

PathWithout retentionWith retention
Host DRAMSSD data passes through temporary host-RAM buffers before loading vLLM's GPU cache.Keep the 48 MiB copy in host RAM. Later LMCache lookups hit DRAM.
GPU DMA-BUFSSD data enters a registered GPU buffer before copying into vLLM's GPU cache.Keep the 48 MiB copy in that GPU arena. Later LMCache lookups hit this separate GPU copy.

The retained host arm is NVMe-backed host-DRAM caching; DRAM is a useful retention tier, not just a transfer buffer. Both arms start with empty resident caches and fetch from NVMe during preparation. A separate DRAM-only offload baseline would start with the state already in host RAM. This is therefore not a pure DMA-BUF on/off comparison with identical memory placement. Keeping both paths in one table makes their different resource costs and results visible.

Two stopwatches: A's first token, and everyone's eighth token

For a four-request test, we submit A, B, C and D together. Each uses the shared context and generates its own eight-token output. For an eight-request test, there are requests A through H. The two timing columns answer different questions:

  1. How long does A wait for its first token? Start when A is submitted. Stop at A's first output token. This follows A, the first request submitted, even if B produces a token sooner.
  2. How long until every request has generated 8 tokens? Start when we begin submitting the group. Stop when the last request finishes its eighth token. If D finishes last, the timer waits for D. It does not add the four requests' individual times.
Made-up example to explain the timers — these are not benchmark results
EventTime after group submission begins
A, B, C and D are submitted together0 ms (A's stopwatch also starts here)
A produces its first token20 ms — A's first-token timer stops
A, B and C finish their eighth tokens50, 60 and 80 ms, respectively
D finishes its eighth token; everyone is now done100 ms — the whole-group timer stops

The table would report 20 ms and 100 ms for that example. Neither number includes the earlier 250 ms preparation interval. The separate warm-up request produces one preparation token; it is not A, B, C or D and does not stop either timer. These short outputs test serving behavior, not the time needed to write a complete useful answer.

What changed after the repeated reads were removed?

These are the measured results. Each cell shows without retention → with retention. The SSD column counts all reads for preparation and the follow-up group. Both stopwatches start with follow-up submission, after preparation. Lower is better.

Cache path / follow-upsSSD data read, MiBWait for A's first output token (ms)Wait until every request has generated 8 tokens (ms)
Host DRAM / 4240 → 4862.939 → 22.050148.575 → 101.262
Host DRAM / 8432 → 4840.792 → 40.578193.578 → 128.345
GPU DMA-BUF / 4240 → 4871.071 → 82.974181.381 → 170.288
GPU DMA-BUF / 8192–432 → 48124.600 → 136.622282.868 → 239.682

Fewer SSD reads do not make both stopwatches faster in every case. For example, with four requests on the GPU DMA-BUF path, A's first token arrives later: 71.071 → 82.974 ms. But the group reaches everyone's eighth token sooner: 181.381 → 170.288 ms. Both observations can be true. Across the four rows, A's first-token wait is mixed, while the median time until everyone has generated 8 tokens improves in every row. The published result data contains both measurements. There are five measured paired groups per case, after three warmups, with alternating order and one engine per path/group size. These are useful bounded observations, not a general latency or throughput guarantee.

For four follow-ups, the unretained path reads 240 MiB: 48 MiB for the warm request plus 48 MiB for each follow-up. Retention cuts this to one 48 MiB read for the entire group. Every follow-up reuses the already-loaded vLLM state; none needs another external load into vLLM.

The saving costs 48 MiB of additional occupied LMCache memory: host RAM in the staged path, GPU memory in the DMA-BUF path. The direct path therefore retains a second copy outside the one shared inside vLLM. Both controls configure a 512 MiB external arena and a 512 MiB engine KV pool; used external-cache bytes increase from zero to 48 MiB. This test applies no competing memory pressure.

Section 20 answers the next question. Once both approaches read the context only once, does loading early still help? Yes, in the controlled 100 ms head-start test: A's first-token wait and the time until every request has eight tokens both fall. The test verifies equal SSD bytes instead of assuming a cache setting prevents duplicate reads.

Where would RAID flash fit?

A striped SSD array is a future backing-store test. It could prepare a large context sooner or serve more cold groups at once. In this retained 250 ms control, the context is already ready and the follow-ups trigger no SSD reads. Faster flash therefore cannot remove a remaining SSD wait from their measured interval; it would need a shorter head-start or cold-demand experiment to show that benefit.

Keep three experimental choices separate: where data starts (resident DRAM, one NVMe device or striped NVMe devices), how it reaches the engine (host staging or a qualified GPU DMA-BUF path), and when preparation starts (on demand or early). A DRAM-resident baseline remains valuable alongside the flash paths.

A software RAID test does not need a hardware RAID card or HBA. Linux can stripe reads across two NVMe devices in software. Ordinary reads into host RAM do not require GPU DMA-BUF support. Sending those reads directly into a GPU buffer is the separate question: the selected RAID stack, each drive's mapping and the PCIe route must support this experimental path. A working single-drive DMA-BUF test does not prove that RAID works too.

Two-drive RAID 0 is a useful optional test of read parallelism for reconstructible cache data; it provides no drive-failure redundancy. First check the topology and existing support. If qualifying the direct path needs new RAID or driver code, defer that work to a suitably equipped storage lab. The single-drive prefetch comparison in section 20 already demonstrates a benefit without RAID.

How to project RAID's useful head start before testing it

An initial model is preparation time ≈ fixed work + bytes / effective bandwidth. The preparation wait remaining at arrival is approximately max(0, preparation time − available head start). This is a projection, not a measured request-latency model.

Assumed effective aggregate bandwidth48 MiB payload time only
6 GB/s8.39 ms
12 GB/s4.19 ms
24 GB/s2.10 ms

GB/s is decimal; MiB is binary. These illustrative rates are not RAID measurements or promises for a particular drive count. Measure aggregate delivery on the actual route, including PCIe limits, concurrency, chunk distribution and destination bandwidth. Fixed coordination, copying and warm-request model work still have to be paid. If fixed work exceeds the available head start, adding SSDs cannot make preparation finish in time.

Linux's striped-target documentation describes parallel use of multiple devices. The experimental DMA-BUF route also needs qualification through the selected RAID stack and each member's device mapping; single-device success does not establish that combination. See the kernel's P2PDMA topology and DMA-BUF mapping requirements.

Preparation accounting, correctness checks and reproduction commands

The experiment runs on RTX 4090 on October 17, 2026, using the same declaration and singleflight code in both controls. It starts with empty resident caches and keeps the NVMe index warm. The retained control invokes LMCache's warm-prefetch HTTP API and polls for completion, then submits the one-token engine warm request. HTTP submission, polling and engine warming all consume the 250 ms lead-time interval. The verifier requires warming to finish before follow-up release. Attained retained gaps are 250.004–250.117 ms. The whole-group timer includes submission and engine execution until the follow-ups finish. Preparation-to-completion time is separately recorded.

All 384 child and 68 warm continuations, including warmups and unused controls, match their references. All 3,140 chosen-token log probabilities match exactly, maximum delta 0.0. Instrumented warmups check restored model-KV digests and one ready engine ancestor. Every family's native registered route, bytes and drained ownership pass with no I/O evidence eviction. Four unused retained preloads each incur sixteen backend reads and one wasted declaration, without a child credit. Terminal cleanup empties external L1.

These are synthetic exact-prefix requests on RTX 4090, with fanouts four and eight, distinct 512-token tails, eight greedy child tokens, one warm token, batch-invariant arithmetic and two CPU threads. Each path/fanout uses one fresh storage owner and engine. Retained timing samples omit allocation observation hooks. Paired alternating arms improve the comparison, but five samples from one engine do not establish a general serving throughput gain or a causal latency difference between storage paths. Backend payload reads are not physical NVMe command counts.

Reproduce retained external-L1 prefetch

This uses the same pinned LMCache declaration branch and unchanged vLLM source as the preceding replay; the retained warm operation already exists there. No new kernel or driver interface is required. Use the prepared runtime and source instructions.

make defconfig-kmesh-retained-prefetch-cuda
make kmesh-restore-plan

# Set prepared model/source/interpreter paths as described in the README.
make kmesh-restore KMESH_RESTORE_PY=/path/to/prepared/python

KMESH_RESTORE_SECTION=retained KMESH_RESTORE_OUTPUT=/path/to/results \
  make kmesh-restore-verify
python tools/reproduce/kmesh_restore/publish_retained.py /path/to/results \
  --output public-results.json

Further residency work must count displaced cache hits and unused holds under trace-supported competing workloads. This control answers the storage read question with enough lead time; it does not answer that pressure question or establish cross-engine sharing.

17. Can the traces qualify family retention?

A family lease would protect vLLM's existing shared ancestor blocks between related requests. It would consume cache capacity that could serve other requests. The comparison must therefore count saved restoration or recomputation against displaced useful hits and unused holds. The external-L1 result above does not answer that engine-memory question.

The October 18 CPU audit of the public LMCache agent-trace corpus at its pinned revision finds 78 JSONL files, 1,915 unique parseable records, two exact duplicate records and 20 malformed nonempty lines. The malformed lines are in the MemGPT file. The Claude Code directory has capture tooling but no captured JSONL records. The source README labels PyCodeAGI as a synthetic pipeline.

None of the valid records supplies explicit parent links, invocation start and completion times, engine identity or physical cache events. There are zero observed invocation-lineage edges. Text-prefix overlap and spacing between record timestamps cannot establish fork gaps, simultaneous inference or eviction pressure. This audit therefore requires invocation capture before a trace-backed pressure comparison; it predicts no latency gain. The complete derived audit contains field coverage, counts and input hashes, without prompts or answers.

Reproduce the CPU audit

git clone https://github.com/LMCache/lmcache-agent-trace.git /path/to/traces
git -C /path/to/traces checkout 780bcc2979715150d8b9fd4737e026e625444cc9
make defconfig-kmesh-trace-audit
KMESH_TRACE_ROOT=/path/to/traces make kmesh-trace-plan
KMESH_TRACE_ROOT=/path/to/traces make
make kmesh-trace-test

Use Python 3.10 or later and a fresh output directory. No model or GPU is needed. The capture contract requires exact token IDs, explicit family and parent identities, terminal status and a shared clock domain. Even a complete invocation capture still needs physical block lifetimes, pool capacity, competing demand and eviction evidence. A controlled serving test can qualify a retention mechanism while leaving its production-workload benefit unresolved.

18. Does holding the ancestor pay under pressure?

The hold works, but it reduces total cached-token reuse in this controlled stress case. A bounded controller adds family references to vLLM's existing full ancestor blocks after the parent completes and before its request references are freed. It creates no second ancestor. The child later aliases those same physical blocks. Keeping them out of the eviction queue leaves less capacity for unrelated requests.

Measured on October 18, 2026, with Qwen2.5-0.5B-Instruct on a CUDA GPU, the experiment uses one synchronous eager engine, batch-invariant arithmetic, 16-token blocks and eight greedy output tokens per request. The pool has 129 physical blocks including one reserved null block. A 512-token ancestor occupies 32 blocks, or 25% of usable capacity. After the parent, the engine serves two passes over four unrelated 497-token prompts, then a child extending the parent's exact input and generated output with a 64-token tail. Each competing request needs 32 blocks with its continuation, so their working set fills the stock pool. This request order deliberately exposes capacity competition; it is not reconstructed from the public corpus.

ArmChild cached tokensCompeting cached tokens, both passesCombined cached tokensBlock evictions
Stock prefix cache481,9842,03262
Bounded family hold512128640149

Every one of the three alternating samples per arm has these counts. The hold saves 464 child-prefix tokens but displaces 1,856 competing cache-hit tokens, leaving 1,392 fewer cached tokens overall. The first competing pass is cold in both arms; the difference is in the second pass. These are cache-hit and eviction counts, not measured compute time, throughput or storage bytes. The samples share one engine and one fixed working set.

All 60 requests complete. All 240 paired generated tokens and their chosen log probabilities match exactly between stock and held arms. Each held child reuses the parent's exact 32 physical ancestor blocks with independent family and request references. All non-null references drain, and all 128 usable blocks return to the free queue. The capture records actual invocation boundaries, six exact parent-child edges, allocations, evictions and reference counts. The parent-to-child intervals include the competing requests, with no invented idle delay. Allocation observation remains active, so the durations are not a latency benchmark. The complete compact result retains every sample, runtime/source identities and original capture hashes.

Reproduce the controller and model capture

Use the prepared source, model and runtime instructions. The pinned vLLM serving source is unchanged. The controller and capture live in the reproduction harness; this is not a production scheduler integration.

export KMESH_RESIDENCY_SOURCE=/path/to/vllm
export OMP_NUM_THREADS=2 MKL_NUM_THREADS=2
make defconfig-kmesh-family-residency-cpu
KMESH_RESIDENCY_OUTPUT=/path/to/fresh-cpu-results \
  make KMESH_RESIDENCY_PY=/path/to/prepared/python

make defconfig-kmesh-family-residency-cuda
export KMESH_RESIDENCY_MODEL=/path/to/model-snapshot
export KMESH_RESIDENCY_OUTPUT=/path/to/fresh-serving-results
make kmesh-residency-plan
make KMESH_RESIDENCY_PY=/path/to/prepared/python
python -m tools.reproduce.kmesh_residency.publish /path/to/fresh-serving-results \
  --output public-results.json

CPU allocator checks cover overlapping families, bounded admission, generation-fenced release, expiry, cancellation and close. The model capture covers normal completion and physical aliasing. Expiry uses a 60-second deadline checked at invocation boundaries; caps on unique held blocks and active families bound residency and metadata. These limits are not a learned or trace-qualified selection policy.

The result supplies a concrete capacity-cost counterexample. It does not establish that all family retention loses, or that the hold is a useful default. No external storage connector, DMA-BUF route or cross-engine sharing is tested here. A production benefit still requires observed family timing and competing demand, with a policy that saves enough work to pay for displaced hits and unused holds. The trace gap in the preceding section remains open.

19. Does model-driven branching leave room for better retention?

Stock vLLM reaches the ideal exact-prefix cache ceiling in this unsuccessful local-model search. This capture lets a model generate arithmetic proposals, score candidate states and choose which states to extend. Later requests follow those choices. It answers whether stock prefix caching leaves exact-prefix reuse available to an ideal retention policy in this observed search, at the same physical cache capacity.

The workload uses the official Tree of Thoughts Game of 24 search at revision 8050e67d0e3a, with its original prompts, value memoization and dataset. We replace its model provider with Qwen2.5-7B-Instruct and take puzzles 0, 1 and 2 in file order. This bounded adaptation keeps two states, evaluates each once and allows 192 output tokens per call. It uses one synchronous eager vLLM engine, BF16, a 2,048-token context, 16-token cache blocks, temperature 0.7 and seed 123 plus the call index. All task outcomes count; this is not the paper's model or accuracy setup.

Search quality fails in this profile: zero of three puzzles produce a valid selected solution. Fifteen of the eighteen selections after the first step extend an earlier state only with whitespace. The upstream parser treats proposal lines, including blanks, as candidates; cached value scores can preserve these unchanged states. All 21 proposal replies and 81 of 152 value replies terminate at the 192-token cap. The verbose output, format mismatch and truncation are not separated by this run. It validates capture and cache accounting on those calls, but does not qualify a successful reasoning baseline or measure the model's general puzzle-solving ability. A separately declared profile that follows the search protocol is needed before drawing conclusions about useful reasoning workloads.

The October 20, 2026 (PDT) capture runs on a CUDA GPU with a configured 512 MiB cache and two CPU threads. The observed pool contains 585 blocks, including one reserved null block, leaving 584 usable blocks. The aggregate result records exact model, search, vLLM and runtime identities plus raw capture hashes. 173 model calls complete: 21 proposal calls and 152 value calls. Application memoization avoids 84 further value calls. The upstream driver treats 270 proposal lines as candidates and retains 24 across its steps. All failed tasks stay in the result.

Prefill means processing input tokens whose KV is not reused. The table counts those tokens, leaving output generation outside this metric.

Exact-prefix cache accountingTokens
Observed stock prefill4,605
Optimistic minimum prefill at the same capacity4,605
Maximum remaining prefill saving0 (0.0%)

The offline bound knows the complete future request order. It can retain full blocks independently of their prefix ancestors and ignores active-request pins. Generated full blocks enter as writes, and the final prompt fragment needed to produce next-token scores remains compulsory. These relaxations favor the ideal cache: the table gives an upper limit on possible token savings, not an implementable policy or a conversion into elapsed time. This closes further retention-policy comparisons for these captured calls at this budget. Successful reasoning workloads remain untested by this result.

A search parent is not automatically a reusable ancestor. All 170 recorded producer edges have known parents in one engine and clock domain. None preserves the parent's entire input and generated output as the child's exact prefix. The search prompts can rewrite a state for evaluation or extension, so a family label cannot justify sharing all of its KV. Application memoization avoids a call; candidate pruning does not cancel an inference request. This workload has one active call at a time and performs no live fork or cross-engine sharing.

All non-null references drain, and all 584 usable blocks return to the free queue; 1,290 cached blocks are evicted during the search. The complete invocation, search and physical allocator evidence passes consistency checks, and the CPU export regrades answers and recomputes the bound. Those checks do not independently replay tokenized search or authenticate execution. Source hashes and the admitted model run are checked separately. Capture observation and writes remain active, so durations are not latency results. No external cache connector or storage transfer participates here.

Reproduce the search and CPU evidence

Follow the pinned model, runtime and search preparation. The worker checks all eleven model/tokenizer hashes before allocation. Keep raw prompts, answers, token IDs and physical block identities with private evidence. The public exporter retains aggregate counts and capture hashes.

make defconfig-kmesh-tot-cuda
export KMESH_RESIDENCY_SOURCE=/path/to/vllm
export KMESH_RESIDENCY_WORKLOAD_SOURCE=/path/to/tot
export KMESH_RESIDENCY_MODEL=/path/to/model-snapshot
export KMESH_RESIDENCY_OUTPUT=/path/to/fresh-search-capture
export PYTHONPATH=/path/to/tot-deps:/path/to/vllm
export OMP_NUM_THREADS=2 MKL_NUM_THREADS=2
make kmesh-residency-plan
make KMESH_RESIDENCY_PY=/path/to/prepared/python

make kmesh-workload-test kmesh-headroom-test
make kmesh-headroom KMESH_HEADROOM_ROOT=/path/to/fresh-search-capture \
  KMESH_HEADROOM_OUTPUT=/path/to/fresh-headroom.json
python3 -m tools.reproduce.kmesh_residency.workload_publish \
  /path/to/fresh-search-capture --output public-workload-results.json

The profile has a 384-call limit, a 75-minute safety ceiling checked at call boundaries and a 120-second bound on each admitted invocation. Partial captures cannot qualify. This result concerns exact causal-prefix residency in these three sequential puzzles at this capacity. Approximate or position-independent recovery, cascade attention, storage latency and concurrent agent traffic need their own qualified tests. The remaining historical source work on multiprocess ownership and serial shifted restore continues independently of this retention decision.

20. Does loading shared context early actually help?

Why does this build on the earlier singleflight tests?

Singleflight was already enabled. External retention was the missing piece in the storage path. Singleflight lets related requests share one restored ancestor inside vLLM. In the earlier preloading tests, LMCache could still read that ancestor from SSD again when later lookups arrived. Keeping its external copy turns those lookups into memory hits.

This extends cascade's shared-prefix principle through offloading: the shared ancestor and private branches also guide restoration, external residency and advance preparation. The connection to cascade explains how these layers fit together. The combined performance benefit of cascade attention and these storage controls remains unmeasured.

How retention completes the existing singleflight path
ComparisonWhat was already workingWhat changed and what it showed
Shared-engine preloading without external retentionSingleflight is on. Follow-ups reuse one ancestor inside vLLM.External lookups can still reread SSD data. The four-child control, including its warm request, reads 240 MiB for a 48 MiB ancestor. Earlier first-token results are mixed.
Add external retentionThe same singleflight coordination and shared engine ancestor remain.Keep the 48 MiB copy in LMCache. SSD traffic falls from 240 to 48 MiB in that four-child control. All four group-completion medians improve in the small paired test; first-token results remain mixed.
Prepare the retained state earlySingleflight and retention are on in both controls. Each group reads exactly 48 MiB.Starting preparation 100 ms early reduces the first child's first-token wait by 47–50% and group eight-token completion by 9–13% versus retained demand.

The results build on each other: share one engine copy, retain the external copy, then prepare that state before the follow-ups arrive. The retention control directly measures the reduction in repeated SSD work. The larger comparison below keeps that read-once behavior in both controls and measures the additional benefit of starting preparation early. The older control has five measured pairs per case; the new comparison has 200 measured groups per control in each path and group size.

Yes. This is a clear benefit for early loading in the tested workload. Given 100 ms of advance notice, the first submitted request waits about half as long for its first output token. The whole group finishes its short, eight-token outputs about 9–13% sooner after arrival. Both host staging and DMA-BUF benefit. This comparison does not establish that DMA-BUF is faster than host staging.

What are we comparing?

Imagine four requests, A, B, C and D, that all need the same saved context. The context is 48 MiB of cached model state on an SSD. Each request adds its own input and asks the model to generate eight output tokens. A token is a piece of text, sometimes part of a word; eight tokens need not form a complete answer. We also test groups of eight requests.

Both approaches already read the SSD data only once. The benefit comes from doing preparation before the requests arrive. It is not a saving from eliminating extra SSD reads in only one side of the comparison. This is the comparison that sections 15 and 16 left open.

A concrete result: four requests using DMA-BUF

Start both stopwatches when the group is due to arrive. A is the first request submitted; it is not necessarily the first request to produce output.

What the stopwatch measuresLoad on arrivalLoad 100 ms earlyWait saved
Until A produces its first output token56.51 ms30.00 ms26.51 ms (46.91%)
Until A, B, C and D have each produced all 8 tokens117.89 ms104.06 ms13.84 ms (11.74%)

A starts producing text much sooner, and the group finishes a little sooner. Those are two different benefits. “About half the wait” describes A's first token; it does not mean every request improves by half or the whole job runs twice as fast. Values are means; savings are calculated before rounding.

Does the benefit hold across the tested cases?

Yes. All four combinations improve on both measures. Host staging moves SSD data through CPU RAM on its way to vLLM. DMA-BUF moves it into a separate GPU buffer, then copies it into vLLM's cache.

Transfer path / number of requestsReduction in A's first-token waitReduction in wait until everyone has 8 tokens
Host staging / 449.67%12.99%
Host staging / 849.36%8.67%
DMA-BUF / 446.91%11.74%
DMA-BUF / 848.15%8.69%

Each row compares 200 groups per approach, spread across ten fresh paired engine runs. The statistical intervals support improvements on both measures in every row. This is stronger evidence for this controlled workload than the small comparisons in sections 15 and 16. Full times and uncertainty intervals are available below.

The 100 ms is advance notice, not free work

The test tells the system when the requests will arrive. It starts early preparation 100 ms before that time. It does not postpone the requests until preparation finishes: any delay in submitting them still counts against the measured wait. The preparation includes loading, copying into vLLM and one real warm-up token. This measures the complete preparation method, not just SSD transfer speed.

An application needs an opportunity to do that work early. For example, it might know which context a follow-up will need while waiting for a tool. This benchmark supplies that knowledge; it does not demonstrate an application predicting it. Delaying useful requests to create a 100 ms gap would have to count as extra waiting.

The pilot tried 0, 25, 100 and 250 ms of notice. At 25 ms, preparation was not ready in any of its ten groups on either path. At 100 ms it was ready in all ten, so 100 ms was selected for the larger test. This is the shortest successful tested lead, not a measured minimum or the SSD's loading time. All 800 measured early-loading groups in the larger test were ready by arrival.

The tables count waiting after the scheduled arrival. The benchmark also records an earlier, fixed 250 ms interval before arrival. For the four-request DMA-BUF example, counting from that earlier start gives 367.89 ms versus 354.06 ms: the same roughly 13.84 ms saved, but about 3.8% of the longer interval. Neither percentage is a prediction for an entire real application workflow.

Why can early SSD loading look faster than data already in DRAM?

“Already in DRAM” means the saved state is in LMCache's CPU memory. It still has to be restored into vLLM's GPU cache after the requests arrive. Early loading from SSD has already done that restoration and the warm-up before arrival. These controls differ in how much work remains; they do not show that SSD is faster than RAM.

The “engine already resident” control starts with the state in vLLM's cache. It is the closer comparison for a fully prepared request. In the small four-request pilot, early loading and that control give similar first-token waits. The placement table below keeps the actual DRAM and GPU memory controls visible.

What this result establishes

KMesh can use advance notice to reduce waiting even after duplicate reads have been removed. The next question is how often a real application can supply useful notice, and whether the benefit survives competition for storage and GPU memory. A wrong hint still spends I/O, memory and model work without helping a follow-up.

The evidence here covers one small model, a 48 MiB shared context, four or eight requests, and eight-token outputs, with no competing families or memory pressure. It supports early preparation in that setting. It does not establish a production prediction policy, a general DMA-BUF latency advantage, or a combined speedup with Cascade attention.

Full timing results, confidence intervals and stopwatch definitions

Full measurements and uncertainty

Each path and group size has ten fresh paired engine-process blocks, three warmups and twenty measured groups per arm per block: 200 measured groups per arm in each row. Means give each process block equal weight. Intervals use 10,000 paired process-block bootstrap draws; children are not independent replicas. Positive improvement means less waiting. The intervals are nominal per endpoint, with limited independent evidence for tail behavior.

Transfer path / number of requestsLoad on arrival: A's first token (ms)Load early: A's first token (ms)Wait saved (ms), with 95% confidence intervalWait saved (%), with 95% confidence interval
Host-staged / 458.6429.5229.13 [28.09, 30.28]49.67 [48.34, 51.11]
Host-staged / 886.7743.9442.83 [41.39, 44.26]49.36 [47.94, 50.60]
DMA-BUF / 456.5130.0026.51 [25.33, 27.83]46.91 [45.45, 48.38]
DMA-BUF / 887.0845.1541.93 [40.35, 43.34]48.15 [46.64, 49.52]
Transfer path / number of requestsLoad on arrival: everyone has 8 tokens (ms)Load early: everyone has 8 tokens (ms)Wait saved (ms), with 95% confidence intervalWait saved (%), with 95% confidence interval
Host-staged / 4120.22104.6015.62 [14.67, 16.60]12.99 [12.26, 13.75]
Host-staged / 8144.80132.2512.55 [11.20, 13.83]8.67 [7.77, 9.50]
DMA-BUF / 4117.89104.0613.84 [12.91, 14.99]11.74 [11.01, 12.59]
DMA-BUF / 8145.25132.6312.62 [11.10, 14.21]8.69 [7.66, 9.76]

Both clocks start at scheduled arrival. A is the first child submitted. Times are host observations at the local synchronous engine caller, rather than internal GPU token-ready or remote network timestamps. Trial output is cumulative; preparation receives copied settings so offline generation cannot switch child delivery to final-only output. Whole-group completion stops when the caller observes the last child's eighth token; later terminal acknowledgements and ownership cleanup have separate clocks. Eight tokens need not form a complete useful answer. The aggregate record also retains every child's first-token and submission-delay observations, preparation costs, empirical percentiles and warmups.

All four path/group-size combinations meet the declared engineering rule on both endpoints. A useful engineering result requires at least 5% point improvement in one primary endpoint, its paired interval excluding zero, and the other endpoint's interval excluding regression larger than 5%. No failed trials are removed, and the fixed sample grid is not extended to obtain a favorable interval.

Pilot results: choosing the head start and comparing memory locations

Why the lead is 100 ms

The preceding pilot uses two fresh engine blocks per path, three warmups and five measured groups per control/block. Its sole selection rule is the shortest common lead ready by scheduled arrival in at least nine of ten measured groups on each path. Readiness, rather than latency gain, chooses the lead. Ready means both the external fill and engine warm have completed; the lead is not SSD latency.

LeadHost-staged readyDMA-BUF ready
0 ms0 / 100 / 10
25 ms0 / 100 / 10
100 ms10 / 1010 / 10
250 ms10 / 1010 / 10

The 0 ms hint is same-time coordination. These small readiness counts do not certify a readiness probability or a service-level objective. In confirmation, all 200 measured early groups in each row were ready by scheduled arrival. Each issued one warm request; none skipped it. Demand issued no warm request.

Where the data starts: pilot measurements

The table below retains the four-child pilot's placement controls, ten measured groups per row across two processes. The host-DRAM control starts with the ancestor in RAM. Its direct counterpart starts in the external GPU arena. They perform no trial SSD reads; each earlier 48 MiB placement fill is charged separately. The engine-resident reference also avoids external restoration. These pilot references are a different sample population from confirmation.

Path / starting placementMean wait for A's first token (ms)Mean wait until everyone has 8 tokens (ms)Trial / prior placement read (MiB)
Host-staged / NVMe demand55.97116.9548 / 0
Host-staged / NVMe, 100 ms early25.70100.7848 / 0
Host-staged / Host DRAM already resident44.02105.400 / 48
Host-staged / Engine already resident24.30101.710 / 48
DMA-BUF / NVMe demand57.23119.2648 / 0
DMA-BUF / NVMe, 100 ms early27.45102.4548 / 0
DMA-BUF / External GPU arena already resident41.07101.880 / 48
DMA-BUF / Engine already resident29.86103.280 / 48

Each process configures 512 MiB for the engine cache and 512 MiB for the external arena. Arena allocation and registration precede timed groups. The observed engine block pool is 511.875 MiB, including its reserved null block; observed external backing is 512 MiB. The external arena retains 48 MiB of ancestor objects. The engine has its own shared 48 MiB ancestor plus each child's private tail. Configured external placement is host memory for staging or GPU memory for direct I/O. The exported placement-size fields are configuration values; registered length and pinned-allocation peaks are not independently measured. Diagnostic engine occupancy follows allocation/free boundaries. External occupancy is sampled and can miss transients; payload byte-seconds are lower and upper bounds.

Exact setup, correctness checks and reproduction commands

The October 21, 2026 experiment uses one RTX 4090, Qwen2.5-0.5B-Instruct at revision 7ae557604adf67be50417f59c2c2f167def9a775, BF16, batch-invariant synchronous eager serving with two OpenMP/MKL threads. Each request shares the same 4,096 input tokens, adds 512 input tokens of its own and generates eight output tokens with greedy decoding. vLLM prefix caching supplies physical sharing. The KMesh connector coordinates one restoration; cascade attention remains a separate optimization.

Both arms retain the external copy and join overlapping fills. Demand starts at arrival and issues no extra warm request. Early loading starts 100 ms before arrival and uses a one-token engine warm request. That preparation token is charged separately. This tests the whole preparation path, including that warm request, rather than isolating raw DMA-BUF transfer time. Arrival is fixed 250 ms after the trace origin; slow preparation cannot move it. Every actual submission delay remains in the headline waits. An accepted warm request drains normally. If completion is observed after children are due, an unsubmitted warm is skipped.

Correctness and scope

Across qualification, pilot and confirmation, 12,320 child continuations and 1,080 warm continuations pass exact-token checks, with zero delta in 99,640 chosen-logprob comparisons. All 12,320 children first expose exactly one token before their eighth-token observation. Diagnostic warmups verify restored model-KV digests and one ready, physically shared 256-block ancestor. Both paths reject deliberate corruption. Resident references show zero trial storage reads, and every cold control shows the same 48 MiB payload work. An unused hint still pays for sixteen reads, retained occupancy and one warm token without serving a child. Ownership drains before objects are cleared. Backend payload operations are not physical NVMe command traces. Direct I/O bypasses the OS page cache; it does not prove cold flash or an empty SSD cache.

The DMA-BUF route transfers NVMe bytes into an external GPU arena, then copies/scatters them into vLLM. The host path uses registered host staging. This is an exact-prefix test without memory pressure, competing families or application-quality evaluation. It assumes advance knowledge of arrival. It does not qualify a forecasting policy, a general memory manager or a combined cascade/DMA-BUF speedup. The earlier unsuccessful reasoning capture and the historical multiprocess/shifted-restore work remain separate.

This comparison adds LMCache overlap joining and reuses the qualified vLLM branch. Use vLLM 1b76bf9dd9d52efbd75fb89bf2619898d8f01233 and LMCache fb71fb40abe8ca3fdbe2b0a6b4823332d1a76f37. The fixed-arrival reproduction instructions cover the pinned model, native build, qualified DMA-BUF kernel, three phases and CPU-only saved-capture verification. The measured knlp harness is e20a823b41bc304947968eae9498a85efe82fa6b. Prepare that environment and source checkouts, then run:

make defconfig-kmesh-prefetch-cuda
export KMESH_RESTORE_PY=/path/to/prepared/python
export KMESH_RESTORE_MODEL_DIR=/path/to/model-snapshot
export KMESH_RESTORE_VLLM_SOURCE=/path/to/vllm
export KMESH_RESTORE_LMCACHE_SOURCE=/path/to/LMCache
export PYTHONPATH=/path/to/LMCache:/path/to/vllm
make kmesh-restore-plan
make kmesh-restore
KMESH_RESTORE_PHASE=pilot \
  KMESH_RESTORE_OUTPUT=results/kmesh-prefetch/pilot make kmesh-restore
KMESH_RESTORE_PHASE=confirmation \
  KMESH_RESTORE_OUTPUT=results/kmesh-prefetch/confirmation make kmesh-restore

Every phase uses a fresh output directory. Pilot rechecks qualification; confirmation rechecks both admitting raw captures and freezes their source, model, native binaries, runtime and selected lead. The aggregate exporter checks those captures against the commit that actually ran and removes private paths and identities. Offline consistency checks do not independently authenticate hardware execution.