KacheDB Documentation
The High-Performance, Zero-Copy In-Memory Engine for Redis-Compatible Caching & LLM KV-Cache Offloading
π Welcome to the KacheDB Documentation
KacheDB is an open-source, next-generation in-memory storage engine engineered from first principles in Rust. It bridges the gap between traditional microsecond application caching (Redis / Valkey workloads) and multi-gigabyte tensor state offloading for Large Language Model (LLM) inference engines (vLLM, SGLang, PyTorch).
πΊοΈ Documentation Sitemap
π Getting Started
- Quickstart Guide: Build from source, run via Cargo or Docker, and query via CLI.
- kachedb-cli User Guide: Interactive terminal REPL and built-in throughput benchmark harness.
- Server Configuration & Tuning: Worker threads, CPU pinning, memory pool sizing, and kernel bypass settings.
β‘ Command Reference
- Core Key-Value Commands:
GET,SET,MGET,MSET,DEL,EXISTS,INCR,DECR,APPEND,STRLEN,DBSIZE,TYPE,FLUSHDB,FLUSHALL,PING. - TTL & Key Lifecycle Commands:
EXPIRE,PEXPIRE,EXPIREAT,PEXPIREAT,TTL,PTTL,PERSIST, and the background Timing Wheel. - SIMD Semantic Vector Commands:
VADD,VSEARCH,VADD_BATCH,VSEARCH_BATCH,VDEL,VSTATS,VINDEX, ARM NEON / AVX2 kernels. - Server Observability & Introspection:
INFO,COMMAND DOCS,HELLO 2/3,AUTH,CLIENT SETNAME/GETNAME/ID/LIST,BGREWRITEAOF,QUIT.
ποΈ System Architecture
- System Architecture Overview: High-level system design, thread-per-core model, and the physical memory hierarchy.
- 2 MB Megaslab Memory Engine: Slotted slab bump allocator, 64-byte cache-line alignment, and S3-FIFO quota manager.
- Token Radix Prefix Tree: Hierarchical
&[u32]token prefix tree, sub-microsecond prefill lookup, and Epoch RCU concurrency. - Zero-Copy Shared Memory IPC: POSIX
/dev/shmlock-free ring buffers and PCIe line-rate tensor sharing.
π€ Production Integration Guides
- vLLM Integration Guide: Drop-in PagedAttention KV connector for vLLM inference servers.
- SGLang Integration Guide: RadixAttention tree-branching prefill offloading with SGLang.
- Semantic Caching Guide: High-throughput sync and async prompt caching with
kachedb-pyand FastEmbed/HuggingFace.
π Performance & Benchmarks
- Consolidated Master Benchmark Report: Criterion micro-benchmarks, latency percentiles, and hardware comparisons against Redis 7.4, Valkey 8.0, and DragonflyDB.
- Benchmark Artifacts & Logs: Raw test outputs, multi-phase scaling reports, and reproducibility scripts.