What is MemKV?
A distributed KV cache store for LLM inference that extends GPU memory onto NVMe.
Long contexts and many concurrent requests fill GPU high-bandwidth memory (HBM) with KV cache. When the cache no longer fits, the engine must run prefill again: the pass that computes the KV cache for every token in the prompt. Prefill then dominates each request, and throughput drops.
MemKV is a distributed store for KV cache. It keeps the cache on NVMe drives in a cluster of servers, so the engine reads a stored prefix back instead of computing it again. Throughput grows linearly as you add servers.
Under a production-shaped agentic workload, once the working set outgrows HBM, MemKV lets the same GPUs complete up to 3.4× the work and cuts continuing-turn tail latency up to 4.5×. Before that point, writing every block through to MemKV costs some throughput. The inference performance page has both results for eight models.
Supported inference engines
Each engine connects through its own storage interface:
- vLLM, unmodified, in three ways: behind LMCache, as a secondary tier under vLLM's native KV offloading, or as the offload medium itself. Only the third way moves blocks between the GPU and MemKV over RDMA with no CPU pool in between.
- sglang, unmodified, as a HiCache storage backend.
- NVIDIA Dynamo, through the same LMCache connector on a stock build, or through KVBM and NIXL, which needs a forked Dynamo build.
Key capabilities
- Zero-copy RDMA. Data moves directly between client host memory and NVMe over the DC transport. NICs other than Mellanox use the RC transport instead.
- RDMA control plane. On a host with an RDMA NIC, control messages also travel over RDMA. Only the first connection message uses TCP, because the RDMA connection does not exist yet.
- Full TCP transport. Where RDMA does not reach end to end, such as routed fabrics, cloud networks, or mixed NICs, MemKV runs the full data path over TCP. The client opens several connections to each server and spreads batched reads and writes across them.
- macOS support. MemKV runs beside an inference engine on a Mac, with file-mode storage and TCP, for development work.
- Authentication. Every message is signed with HMAC-SHA256 and a shared key. There is no unauthenticated mode.
- Extent-based block store. Large KV blocks are read and written in parallel.
- Linear scaling. Servers share nothing, so each server you add adds throughput.
Explore the docs
Quick Start
Install MemKV, initialize drives, and start the server.
vLLM + MemKV
Connect vLLM behind LMCache, as a secondary tier under native KV offloading, or as the offload medium itself.
sglang + MemKV
Attach MemKV as a HiCache storage backend, so KV pages move from the host cache into a shared cluster.
Dynamo + MemKV
Add the NIXL plugin to a Dynamo container so KVBM offloads evicted blocks to MemKV over RDMA.
CLI Reference
Every MemKV subcommand and flag: setup, start, doc, admin, and drive management.
Configuration
Reference for /etc/memkv/config.yaml, the client MEMKV_CONFIG file, and every MEMKV_* environment variable.
Monitoring
Health probes, Prometheus metrics, and Kubernetes integration.
Architecture
The three deployment shapes (distributed, co-located, file mode) and the shared-nothing design behind linear scaling.
Benchmarks
Measured 97.4 GB/s read peak on 2 servers — ~97% of 2× 400GbE line rate, with per-block-size numbers.
Inference Performance
What MemKV does to TTFT and served throughput under an agentic workload, for eight models from 8B to 405B, including the cost before the working set outgrows HBM.