KV cache research notes

What we learned measuring KVStash under SGLang and vLLM: where the read time goes, when a KV-cache store is worth running, and how we check that a number means what it says.

  1. Profiling

    Where the 12x went

    Our first 110k-token reads from KVStash under SGLang were 11 to 12.5x faster than recompute, slower than SGLang's own host memory. We profiled the request until a simple sum explained all of it.

    0.87 s measured, against 0.865 s predicted by a three-term sum
  2. Decision guide

    When context reuse is worth it

    Repeated text is not enough. A store pays off when an exact prefix comes back after the engine has lost it, and reading it beats recomputing. How to check each condition on your traffic.

    5.3x to 13.7x read against recompute, 8k to 110k tokens, one L40S
  3. Method

    How we measure cache value

    Verified flushes, medians of 5, store and engine counters, same-split output checks and failure tests: the method behind every KVStash number, and what it does not cover yet.

    12 / 12 outputs identical to SGLang's own cache at the same reuse split

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