# KVStash > KVStash is a self-hosted KV-cache store for vLLM and SGLang. It keeps the attention cache of long prompts across restarts and shares it across servers, with DRAM, NVMe and S3 tiers over plain TCP. Key facts: - 524,231-token prompt: 474 s recomputed to 2.77 s read from KVStash (medians across machines), 145.6-194.2x across 6 machines; passkey answers correct and identical to vLLM's own cache on every machine. Conditions: vLLM 0.25.1 with the KVStash native connector, GLM-4-9B-chat-1M (fp8 KV cache), one NVIDIA L40S per machine, store on the same host over TCP, 6 Modal machines, 4 Nov 2026. Median of 5 timed requests per machine. Raw data and checker: https://kvstash.com/benchmarks/vllm-524k/ - 110k-token prompt: 20.8 s to 1.5 s; 13‑19x faster time to first token than recomputing, across 8 runs on separate machines (median about 14x). Conditions: SGLang 0.5.15.post1, Qwen2.5-7B-Instruct BF16, one L40S, KVStash on the same host, default settings, median of 5 reads per point after a verified cache flush. Run r20261029-sweep1, 29 Oct 2026. - After a server restart: p99 TTFT 9.02 s to 0.80 s (mean 3.08 s to 0.34 s, 99% of prompt tokens reused, 3x input throughput). Conditions: L40S, 8k-token shared prefixes, 512 requests, concurrency 16, SGLang 0.5.15.post1 + Qwen2.5-7B BF16, 29 Oct 2026, one pass. Both modes: SGLang host pool 48 GB. The KVStash side also has an 80 GiB DRAM store on the same machine that the baseline does not, and a raised response budget. With default settings, on a smaller workload (32 groups, two passes): mean 1.9 s to 0.5 s, p99 8.3 s to 1.2 s. - Engines: SGLang (HiCache storage tier, GPU-tested 0.5.15.post1 and 0.5.23) and vLLM (native KV connector, GPU-tested 0.25.1, 0.27.1 and 0.33.0). LMCache plugin exists; LMCache 0.5.6 returned wrong KV from its own CPU tier in our tests. NVIDIA Dynamo/NIXL planned. - Next to vLLM's own caches (Study 3, vLLM 0.33.0, same L40S GPUs): while the engine runs, its GPU cache and CPU tier are faster than KVStash; after a restart they are empty and KVStash serves the prompt. Details: https://kvstash.com/benchmarks/engine-caches/ - Runs over plain TCP on ordinary cloud GPUs; no RDMA. Tiers: DRAM, NVMe, S3. Self-hosted. The daemon is a free download: https://kvstash.com/docs/install/ - Contact: rudray@kvstash.com ## Product - [KVStash: KV-cache store for vLLM and SGLang](https://kvstash.com/): What KVStash is, measured results with conditions, how it fits under vLLM and SGLang. - [KV cache benchmarks: vLLM and SGLang TTFT, restarts and load](https://kvstash.com/benchmarks/): Index of KVStash benchmark studies, how they are measured, and what is not tested yet. - [KVStash changelog: site, studies and connectors](https://kvstash.com/changelog/): Dated list of KVStash releases, studies and site changes. - [About KVStash: the company and how we work](https://kvstash.com/company/): Who builds KVStash, what it is, and the rules we follow before publishing a number. - [Rudray Mehra, founder of KVStash](https://kvstash.com/company/rudray-mehra/): Founder profile: Rudray Mehra, founder of KVStash, leads product and engineering. - [Contact KVStash: discuss your inference workload](https://kvstash.com/contact/): How to contact KVStash, what to include, what happens next, and the free Design Partner Measurement offer. - [Guides: running KV-cache reuse in production](https://kvstash.com/guides/): Step-by-step guides for operators running vLLM or SGLang who want to keep and reuse KV cache across restarts and servers. - [KVStash integrations: SGLang, vLLM and LMCache](https://kvstash.com/integrations/): Status matrix for every engine integration (tested, path exists, planned), latest tested vs latest released versions. - [LMCache remote storage plugin: lmcache-kvblockd](https://kvstash.com/integrations/lmcache/): The LMCache plugin path for KVStash: configuration keys, the remote_url pitfall, and its status: not recommended with LMCache 0.5.6, which returned wrong answers from its own cache in our GPU test. - [SGLang HiCache storage backend: KVStash setup](https://kvstash.com/integrations/sglang/): How KVStash plugs into SGLang HiCache as the storage tier, the flags, measured results and known limits. - [vLLM KV connector for KVStash: setup and limits](https://kvstash.com/integrations/vllm/): The native vLLM connector for KVStash: configuration, the 131k-token reload results with captions, the vLLM 0.27 layout change and limits. - [Learn: KV cache, offloading and reuse guides](https://kvstash.com/learn/): Index of KVStash guides on the KV cache, offloading, restarts, sizing and alternatives. - [How KVStash works: a KV-cache store under your engine](https://kvstash.com/product/): KVStash keeps KV-cache blocks outside the engine, in DRAM, NVMe and S3, and serves them to any server over TCP. Architecture, tiers and failure behaviour. - [KV cache research notes from KVStash](https://kvstash.com/research/): Index of KVStash research posts. - [KV cache cost savings: GPU time saved per reuse](https://kvstash.com/savings/): How avoided prefill turns into GPU time and money: measured worked example, formula, load-test throughput effect and the cases where savings are nil. - [KV cache reuse use cases: agents, documents, restarts](https://kvstash.com/use-cases/): Where KV-cache reuse from a store pays off (agents, documents, restarts, fleets), the closest measured result for each, prompt layout rules and a fit checklist. ## Documentation (install, configure, connect an engine) - [KVStash documentation](https://kvstash.com/docs/): Index of the KVStash docs: quickstart, how it works, engine connectors, production setup and reference. - [kvblockd configuration reference](https://kvstash.com/docs/configuration/): All daemon settings with defaults: listeners, protocol limits, DRAM, eviction, NVMe, S3, environment variables and flags. - [Connect vLLM, SGLang or LMCache to KVStash](https://kvstash.com/docs/connect-an-engine/): Chooser for the vLLM connector, the SGLang HiCache backend and the LMCache plugin, with status and a verification checklist. - [How KVStash works: blocks, keys and tiers](https://kvstash.com/docs/how-it-works/): Concepts: block keys, namespaces, tiers, the lease and pin ladder, S3-FIFO eviction, and why engines treat every failure as a cache miss. - [Install the KVStash daemon and adapters](https://kvstash.com/docs/install/): What each install channel contains, how to run the daemon under systemd or in a container, and which Python package each engine needs. - [Run KVStash on Kubernetes with Helm](https://kvstash.com/docs/kubernetes/): The kvblockd Helm chart: one StatefulSet, values reference, NVMe persistence, S3 with IRSA, hugepages, and how engines reach the service. - [kvbctl command reference](https://kvstash.com/docs/kvbctl/): Every kvbctl command and flag, token handling, key conventions and exit codes. - [Monitor KVStash with Prometheus and Grafana](https://kvstash.com/docs/monitoring/): Metric reference for kvblockd, scrape config, Grafana dashboard notes, and alert suggestions. - [KVStash Python client (kvblockd package)](https://kvstash.com/docs/python-client/): The kvblockd Python client API with examples, connection pooling, timeouts and checksum behaviour. - [Quickstart: run KVStash on one machine](https://kvstash.com/docs/quickstart/): Step by step: start kvblockd with the DRAM tier, put and get a block with kvbctl, read /metrics and /healthz. - [Size KVStash and tune the network](https://kvstash.com/docs/sizing-and-network/): Capacity math for the arena and NVMe tier, deployment shapes, sysctls, socket buffers and measuring the network ceiling with iperf3. - [Configure DRAM, NVMe and S3 tiers](https://kvstash.com/docs/storage-tiers/): How to size and configure each tier, demotion and promotion rules, the S3 lifecycle rule, and what survives a restart or device loss. - [Tenants, tokens and network security](https://kvstash.com/docs/tenants-and-security/): Namespace identity, token hashing, quotas (DRAM enforced), the admin plane, and the network rules for the data, metrics and admin ports. - [Troubleshoot KVStash](https://kvstash.com/docs/troubleshooting/): Symptom, cause and fix for the daemon and each engine connector. ## Benchmarks (dated, with raw data) - [vLLM 0.33 after a restart: KVStash next to vLLM's own KV caches](https://kvstash.com/benchmarks/engine-caches/): Study 3: KVStash next to vLLM 0.33.0's own GPU prefix cache and CPU offloading, before and after an engine restart, 8k-110k and 524k tokens; per-request data. - [SGLang restart and load test with a KV cache store](https://kvstash.com/benchmarks/restart-and-load/): Study 1b: SGLang bench_serving load with KVStash on L40S and H100, restarts, shared stores, store killed mid-load, and a bug we found and fixed. - [SGLang long-prompt TTFT: 110k tokens in 1.5 s](https://kvstash.com/benchmarks/sglang-110k-prompt/): Study 1a: TTFT by prompt length (8k to 110k) on SGLang 0.5.15.post1, recompute vs KVStash, with setup, correctness and limits. - [vLLM 524k-token prompt after a restart: 474 s to 2.77 s](https://kvstash.com/benchmarks/vllm-524k/): Study 2: 524,231-token prompt on vLLM 0.25.1 + KVStash, GLM-4-9B-1M fp8 KV, per-machine TTFT, passkey and same-cache answer checks, Prometheus counters, raw data and checker. ## Guides and explainers - [Keep KV cache across vLLM and SGLang restarts](https://kvstash.com/guides/keep-kv-cache-across-restarts/): How to keep KV cache across inference server restarts: vLLM tiers, LMCache, PegaFlow, Lifeboat Cache, Mooncake, SGLang HiCache L3, KVStash; measured p99 TTFT 9.02 s to 0.80 s after a restart; checklist. - [KV cache offloading: GPU, DRAM, NVMe and S3 explained](https://kvstash.com/learn/kv-cache-offloading/): Pillar guide: where the KV cache can live, when reloading beats recomputing (with a worked 110k-token example), how vLLM, SGLang, LMCache, Mooncake, Dynamo and KVStash do it, how to measure it. - [What is a KV cache? Definition, size and reuse](https://kvstash.com/learn/what-is-kv-cache/): Definition of the KV cache, a diagram, the per-token size formula with a Qwen2.5-7B BF16 example (57,344 bytes per token), prefix caching, FAQ. ## Comparisons - [KV-cache store comparisons](https://kvstash.com/compare/): Index of KVStash comparison pages. - [LMCache alternatives: 8 KV-cache options compared](https://kvstash.com/compare/lmcache-alternatives/): Neutral comparison of LMCache alternatives (where it sits, tiers, transport, RDMA, engines, licence, maturity), with sources and where KVStash does not fit. ## Tools - [KV cache tools](https://kvstash.com/tools/): Index of KVStash tools. - [KV cache size calculator (GQA, MLA, FP8)](https://kvstash.com/tools/kv-cache-calculator/): KV cache size calculator with verified model configs (Llama 3.1, Qwen2.5, Mistral 7B, GLM-4-9B, DeepSeek-V3 MLA, Gemma 2 9B), the formula, and a recompute vs read-back estimate. ## Research posts - [How we measure KV cache value: method and checks](https://kvstash.com/research/how-we-measure-cache-value/): The measurement method behind KVStash results: baselines, verified flush, counters, repeats across machines, same-split output checks, failure cases, and what is not measured. - [When context reuse is worth it: KV cache store fit](https://kvstash.com/research/when-context-reuse-is-worth-it/): Exact-prefix reuse, engine caches first, read cost by prompt length, retention vs durability, and five questions to decide on a KV-cache store. - [Where the 12x went: profiling a 110k-token KV read](https://kvstash.com/research/where-the-12x-went/): Profile of a 110k-token prefix read from KVStash under SGLang: client fan-out, SGLang STORAGE_BATCH_SIZE, the two-copy model, and the spread across 8 runs. ## Policies - [Privacy notice: no cookies, no analytics](https://kvstash.com/privacy/): kvstash.com sets no cookies and runs no analytics or tracking scripts. What the server logs record, how we handle your emails, and how to ask for deletion. - [KV cache security: authentication, tenancy, integrity](https://kvstash.com/security/): KVStash security model: deployment boundary, HELLO authentication, namespaces and quotas, block checksums, S3 credentials, what is not claimed, vulnerability reporting.