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.”
| Tier | Typical role for a KV cache | Ballpark throughput | Feel, in the desk metaphor |
|---|---|---|---|
| On-package SRAM | Hottest 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 GPUs | Roughly several TB/s; Nvidia lists 3.35 TB/s for H100 SXM HBM3 | Still on the desk, a thicker stack |
| DDR5 | Host memory for active agent sessions that have left the GPU | 51.2 GB/s per DDR5-6400 DIMM | The desk drawer |
| PCIe Gen5 SSD | Long contexts that sit idle; a cheaper, denser pool | About 14.0 GB/s sequential (3.7× slower than that DIMM) | A filing cabinet down the hall |
| Network / RDMA flash | A shared pool that more than one server can reach | Depends on the fabric | A mail room the whole office shares |
| SATA SSD on an ODROID-HC1 | Model files and saved prompt caches on this small board | Roughly 300 MB/s typical; some published tests near 400 MB/s sequential | A local cabinet, behind a USB 3.0 bridge |
| USB 2.0 (HC1's external port) | Hubs, extra cards, accessories | Roughly 35–40 MB/s real-world | A slow walk down the hall |
| microSD / SD cards | Boot media on the HC1; a poor place to swap KV | Sequential can look fine; random I/O is poor | A 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:
- Samsung Exynos 5422: four Cortex-A15 cores (up to 2.0 GHz) plus four Cortex-A7 cores (up to 1.4 GHz)
- 2 GB of LPDDR3 RAM
- One external USB 2.0 host port
- A bay for a 2.5-inch SATA drive, connected on the board through a JMicron JMS578 USB 3.0-to-SATA bridge (this is not a native SATA controller; Hardkernel added the bridge so users would not have to hang a drive off a loose USB cable)
- A UHS-I microSD slot used as boot media
- Gigabit Ethernet, also on an internal USB 3.0 path, separate from the SATA bridge and from the external USB 2.0 port
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.
- One shared bus. The external port is USB 2.0. Every card on the hub shares that single pipe. Extra cards add capacity, not bandwidth. Real throughput on USB 2.0 is typically about 35–40 MB/s for the whole bus, not 35–40 MB/s per card.
- SD cards are a poor random I/O device. A KV cache restore, a swap, or a prompt-cache load is a lot of small reads and writes. SD and microSD cards are built for large sequential transfers (camera photos, boot images). Their random IOPS are weak, and cheap cards vary widely.
- No RAID-style escape from the bus limit. Striping cards behind one USB 2.0 hub cannot go faster than the hub's host port. You would still be waiting on a ~40 MB/s pipe, and you would add CPU and protocol overhead for the privilege.
- Swap and wear. Using the cards as swap, or as a hot KV backing store, means frequent small writes. That wears consumer flash and can stall the board when 2 GB of RAM is already tight. It is a good way to wear out cards and a bad way to make inference faster.
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
- Put a 2.5-inch SSD in the SATA bay for model files and saved prompt caches. That uses the internal USB 3.0 bridge, not the USB 2.0 port.
- Leave the microSD card as boot media, not as a scratch disk for KV or swap.
- Use zram if you need a little compressed breathing room in the existing 2 GB. That stays in RAM; it does not invent a faster bus.
- Choose a smaller quantized model and a shorter context. On this board, that is the main way to keep the KV cache in the desk drawer. The earlier tuning note found Q4_0 faster than Q8_0 here, and a companion assembly-versus-C experiment on the same hardware is about compute, not about storage tricks.
- For real scaling, use a board with more RAM, a native NVMe path, or a GPU. llama.cpp's RPC mode can split a model across machines, but it does not lift the RAM cap on each box, and a cluster of HC1s still talks over Ethernet, with the usual latency and failure caveats. It is a way to share weight memory, not a way to make a USB hub of SD cards behave like HBM.
Sources and related pages
- Watch the SemiAnalysis video on LinkedIn — the reference post for this page.
- Skip the DRAM Tier — vLLM blog, 23 November 2026 (URL checked when this page was built).
- ODROID-HC1 specifications: ODROID Magazine and CNX Software's launch write-up, which also describes the JMicron JMS578 USB 3.0-to-SATA bridge and typical throughput.
- HBM example: Nvidia's published 3.35 TB/s HBM3 figure for the H100 SXM.
- On this site: llama.cpp tuning on the ODROID-HC1, assembly versus C for AI, analog and in-memory AI chips, graphics cards and GPUs, AI and Super Intelligence, as official U.S. sources use the terms, and AI tools.
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.