Skip to content

Add blog post: KV caching on Valkey - #642

Draft
cnuthalapati wants to merge 3 commits into
valkey-io:mainfrom
cnuthalapati:blog/kv-caching-on-valkey
Draft

cnuthalapati wants to merge 3 commits into
valkey-io:mainfrom
cnuthalapati:blog/kv-caching-on-valkey

Conversation

@cnuthalapati

Copy link
Copy Markdown
Contributor

Closes #639.

Adds a Technical Deep Dive on using Valkey as a shared L2 KV cache tier for large language model (LLM) inference, sitting behind vLLM and LMCache.

What the post covers

  • Why prefill dominates time to first token, and what a KV cache checkpoints.
  • Why the GPU-memory (L0) and host-memory (L1) tiers evict under real traffic, and why peer-to-peer sharing between GPU nodes does not fix it.
  • A five-step setup on the open-source stack, vLLM plus LMCache pointed at Valkey, including how to confirm the cache is actually engaged.
  • Benchmark results on Llama-3.1-70B across two GPU nodes with a three-shard Valkey 9 cluster, plus sizing and tuning guidance.

Scheduling

Set with draft = true and date = 2026-09-03, so the daily publish job picks it up on that date. Opening this as a draft PR while we settle the items below.

Open items

  • No author photo for @omerrubi-amzn yet. His bio is in place; the photo is optional per CONTRIBUTING-BLOG-POST.md and can follow.
  • Length is ~2,900 words against the 500-1,200 guidance. Happy to cut if reviewers want it shorter; the setup walkthrough and the best-practices section are the two blocks that could move to a follow-up post.

Validation

Builds clean with Zola 0.22.1, matching the version pinned in .github/workflows/zola-deploy.yml. Confirmed that draft = true holds the post out of a normal build, that all three figures resolve, that both tables and all seven code fences render, and that the three author pages link correctly.

All commits are signed off per the DCO.

Adds a Technical Deep Dive on using Valkey as a shared L2 KV cache tier
for LLM inference, behind vLLM and LMCache.

The post covers why the GPU-memory (L0) and host-memory (L1) tiers evict
under real traffic, what a shared external tier changes, a five-step
setup on the open-source stack, benchmark results on Llama-3.1-70B
across two GPU nodes, and sizing and tuning guidance.

Scheduled with draft = true and date = 2026-09-03.

Signed-off-by: Chaitanya Nuthalapati <cnu@amazon.com>
Signed-off-by: Chaitanya Nuthalapati <cnu@amazon.com>
Signed-off-by: Chaitanya Nuthalapati <cnu@amazon.com>
@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@valkeyrie-ops
valkeyrie-ops Bot requested a review from a team August 24, 2026 19:50

@pnbrown pnbrown left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read through it quickly.

Also curious if there's a place to tie in other Valkey content like this blog: https://valkey.io/blog/modern-ai-workloads-mapping-to-valkey/

You can self-host open-weight LLMs on GPUs for better cost economics, accuracy, control, or data privacy.
Unlike traditional applications that benefit from scaling economies, LLM inference costs scale directly with your application, and the biggest line item is the GPU bill.

A surprising share of that bill is spent on work the model has already done, reprocessing prompt instructions, tool definitions, and conversation history on every call.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be a colon after done

That takes sub-millisecond operations and read bandwidth that grows as you add shards, which is exactly what a Valkey cluster provides.
Object and file storage have their place, but not on the first-token path.

We benchmarked Valkey to quantify the impact.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably have a caveat for those controlling where they're running their apps? Maybe the have only one server?

Could we also talk about the differences in speed between HBM and running on Valkey? Might be an important distinction.

Maybe also worth mentioning the size of models and how much is being kept in the relative caches


**Where it will not help.**

- If your whole working set fits in GPU and CPU memory, you do not need an L2 yet. Little is evicted, so there is little to reload. Come back when traffic grows.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That actually may address one of the earlier points.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BLOG POST] Get 50% more out of your LLM GPUs with KV caching on Valkey and LMCache

3 participants