A single-machine, no-RDMA demo of the Ollama connector from
PR #2800: a prefill worker publishes a prompt's
KV pages into a real Mooncake Store; a second request that shares the prompt's prefix reloads those pages over TCP
and skips prefill for the shared tokens. All figures below are measured on this run.
Page keying (real connector code). Token ids are split into fixed pages; each page key is a
SHA-256 hash chain seeded with the model name (ollama/prefix). A shared token prefix yields
identical keys, so pages are reusable across requests; any earlier divergence changes every later key.
Prefill → Store.StoreComputedPrefix checks batch_is_exist and
publishes only missing pages with batch_put_from (put-if-absent, so a peer's pages are never
clobbered).
Store → Decode.LoadCachedPrefix takes the longest contiguous cached run and
pulls it with batch_get_into, leaving only the divergent tail for the runtime to compute.
Verified. Loaded bytes are compared against what prefill published — on both a
2,048-token realistic layout and the tiny layout from the PR's own example
(3/4 pages shared).
Honest boundaries
Store, transfer engine and TCP transport are real (Mooncake wheel), running single-machine with no RDMA.
Page keys are produced by the connector's real Go keying code (ollama/prefix via prefixgen).
Orchestration (put-if-absent / longest-present-run) mirrors connector.go; the literal Go binary needs the C++ store compiled (follow-up, OOMs on this 11 GB host).
KV page bytes are deterministic stand-ins for llama.cpp KV tensors; tensor wiring and scheduler PD routing are the PR's tracked follow-ups.
End-to-end LLM TTFT needs a running model (Ollama not installed here); reported numbers are KV reuse cost, hit rate and prefill work avoided, not model TTFT.
KV layout per page: 28 layers × 4 KV heads × 128 head-dim, 256 tokens/page,
fp16 → 14 MB/page. Publish 112 MB in 338 ms.
Store: Mooncake Store (mooncake-transfer-engine wheel, real master+client). Reproduce with bash demo/run_demo.sh.
Generated 2026-07-09T17:59:10+0800 on LAPTOP-JHMCRIFR from demo/bench-results.json.