Mode:
Text:
webcentive
webcentive - home  | Analog AI chips  | llama.cpp on the ODROID-HC1

KV cache swapping: what slows a faster decode chip

Decode chips keep getting faster. SemiAnalysis argues that the next bottleneck for agent-style inference is not raw token rate, but how quickly a model can put its working memory back on the chip after a pause. This page explains that claim in plain language, lists the memory tiers involved, and then asks what the same idea means on a small home-lab ARM board running llama.cpp — including whether a USB hub of SD cards would help. (It would not.)

Watch the SemiAnalysis video on LinkedIn. The notes below summarize the caption in our own words and add context. They are not a transcript, and the video is not embedded here.

What a KV cache is

A language model does not reread the entire conversation from scratch at every new word. As it works through a prompt, it stores a compact running summary of what it has already seen: the keys and values from each attention layer. That table is the KV cache. The next token can reuse it instead of repeating the earlier work.

The cache is not free. It grows with context length, with the number of layers, and with how wide those layers are. On a datacenter GPU it often fills high-bandwidth memory (HBM) before the model weights do, especially once many sessions are open at once. On a small CPU board it lives in ordinary RAM and competes with the model file itself.

Why agents change the picture

A chatbot that answers in one pass can keep that cache warm on the chip until it is done talking. An agent works in turns. It may write a little, call a tool or a browser, wait, then continue from the same long prefix. While it waits, the serving stack often evicts that session's cache to make room for someone else. The next turn has to fetch the cache back, or recompute it, before useful decoding can resume.

SemiAnalysis's point is that this fetch-and-restore step is becoming the thing to measure. Faster decode shortens the queue of work sitting on the chip, so a slow restore is no longer hidden behind other tokens. The wait becomes visible.

Memory tiers, from the chip to the hallway

Think of the cache as papers the chip is using. The closest stack is on the desk; the next is a drawer; older piles go to a cabinet down the hall. SemiAnalysis puts the metaphor this way:

“DDR5 is the desk drawer; an SSD is the filing cabinet down the hall.”

On-package SRAMchip-local, smallest
HBM on the GPUroughly TB/s class
DDR5 DIMM51.2 GB/s at DDR5-6400
PCIe Gen5 SSDabout 14 GB/s sequential
HC1 SATA SSDroughly 300 MB/s typical
USB 2.0 / SDroughly 35–40 MB/s shared
A sketch of relative closeness and throughput, not a laboratory plot. Bar lengths are indicative. Bandwidth figures are explained in the table below.
Memory and storage tiers that can hold a KV cache, or a saved copy of one
TierTypical role for a KV cacheBallpark throughputFeel, in the desk metaphor
On-package SRAMHottest working set, kept next to the decode chip. SemiAnalysis cites Nvidia's LPX as pairing 128 GB of SRAM with 12 TB of DDR5.Chip-local (highest)The papers already on the desk
HBM (on the GPU package)Active weights and KV on datacenter GPUsRoughly several TB/s; Nvidia lists 3.35 TB/s for H100 SXM HBM3Still on the desk, a thicker stack
DDR5Host memory for active agent sessions that have left the GPU51.2 GB/s per DDR5-6400 DIMMThe desk drawer
PCIe Gen5 SSDLong contexts that sit idle; a cheaper, denser poolAbout 14.0 GB/s sequential (3.7× slower than that DIMM)A filing cabinet down the hall
Network / RDMA flashA shared pool that more than one server can reachDepends on the fabricA mail room the whole office shares
SATA SSD on an ODROID-HC1Model files and saved prompt caches on this small boardRoughly 300 MB/s typical; some published tests near 400 MB/s sequentialA local cabinet, behind a USB 3.0 bridge
USB 2.0 (HC1's external port)Hubs, extra cards, accessoriesRoughly 35–40 MB/s real-worldA slow walk down the hall
microSD / SD cardsBoot media on the HC1; a poor place to swap KVSequential can look fine; random I/O is poorA messy cabinet with a sticky drawer

The DDR5-6400 figure is exact arithmetic: 6,400 million transfers a second times 8 bytes is 51.2 GB/s, the official peak of one module. The 14.0 GB/s PCIe Gen5 SSD figure, and the 3.7× comparison, are the numbers SemiAnalysis published; they sit close to typical advertised sequential rates for a PCIe 5.0 x4 drive (the raw link is about 15.8 GB/s). USB 2.0 High Speed is officially 480 Mbit/s, or 60 MB/s before protocol overhead; 35–40 MB/s is a typical real-world range, not a measurement from this page. The HC1 SATA path is discussed below.

The SemiAnalysis argument, in brief

On HBM GPUs, a slow cache fetch can be hidden while other work is still queued on the chip. As decode gets faster, that queue shrinks, and the fetch is what you wait on. The response they describe is to keep a large, relatively fast DRAM pool next to the decode chip for sessions that are still active, and to use SSDs for long contexts that are idle. They give Nvidia's LPX as an example of a rack that puts a large SRAM pool beside a much larger DDR5 pool, which they say can hold KV cache. Those LPX capacities (128 GB of SRAM and 12 TB of DDR5) are SemiAnalysis's figures, not a datasheet we re-measured here.

SSDs, in that telling, are the right home for context that can wait. DDR5 is the right home for an agent that is about to speak again, because one DIMM already moves several times the sequential bandwidth of a fast SSD.

A comment worth noting: skip the DRAM tier?

A related public write-up, Skip the DRAM Tier on the vLLM blog (23 November 2026; the URL resolved when this page was built), asks whether a large NVMe pool can stand in for a large DRAM pool for agent KV. In their tests with vLLM and AMD's MoRI UMBP, a 1.8 TB NVMe pool matched a 1.8 TB DRAM pool to within about 1% throughput on the traces they published, with only a small DRAM buffer in front of the drives. That does not cancel SemiAnalysis's bandwidth math for a single active session. It suggests that, at cluster scale, with enough parallelism and careful overlap, a well-built flash pool can keep the GPUs busy even when the official sequential rate of a drive is lower than DRAM.

Another idea that comes up in the same discussion is RDMA network flash: NVMe (or a similar flash pool) reached over a remote-DMA fabric, so every server in the rack can share one cache store instead of keeping a private DRAM copy. Shared storage of that kind can raise hit rates across machines. It is not a faster drawer than local DDR5; it is a bigger cabinet the whole office can reach. Whether it wins depends on the fabric, the software, and how long a session can wait.

How this looks on an ODROID-HC1

The same tradeoff shows up, at a much smaller scale, on a home-lab ARM board running llama.cpp. Take the ODROID-HC1, a stackable board from Hardkernel. Published specifications, checked against Hardkernel and contemporary reviews, are:

In llama.cpp on this board, the model weights and the KV cache both live in that 2 GB of RAM. Context length is therefore capped by whatever RAM remains after the operating system and the model. Earlier notes on this site, from llama.cpp tuning on the ODROID-HC1, used a 0.5 B Q4_0 model that occupied about 403 MiB — already a large slice of 2 GB once the OS is counted. A longer context, or a larger model, leaves less room for the cache, and the run hits the wall sooner.

llama.cpp can write a prompt cache to disk (--prompt-cache, and related slot save/restore on the server) so a later turn can reload the KV instead of prefilling the same prefix again. That is the desk-drawer-versus-filing-cabinet tradeoff in miniature. RAM is the drawer. A SATA SSD in the bay is the cabinet: slower than RAM, but local, and on the board's USB 3.0 SATA path rather than the external USB 2.0 port. Published figures for that JMS578 path are typically around 300 MB/s, with some tests near 400 MB/s sequential. That is in a different class from the 35–40 MB/s you can expect from the external USB 2.0 port, and it is still far below a modern PCIe SSD, let alone DDR5.

Would a USB hub with multiple SD cards help scale AI performance?

No. Plugging a hub of SD cards into the ODROID-HC1's external USB port will not meaningfully scale llama.cpp, token rate, or usable context.

The SATA bay is the faster storage path on this board, and it is already spoken for by one 2.5-inch drive. The hub does not get you onto that path.

Better options on a small board

Sources and related pages

This is a reference note, not an endorsement of any vendor. Webcentive is not affiliated with SemiAnalysis, Nvidia, vLLM, Hardkernel or llama.cpp. Bandwidth numbers marked “roughly” or “about” are typical published figures, not bench results from this page. Last checked 5 December 2026.


webcentive ask Google Bing DuckDuckGo
© 2026-present webcentive.com