DEV Community

Mingxin Technology
Mingxin Technology

Posted on • Originally published at mingxinstorage.xyz

KV Cache Reuse in Multi-Turn Dialogue: A Deployment Case Study

KV Cache reuse in multi-turn dialogue scenarios reduces first-token latency by 26–32% and improves throughput by 29–40% (measured, reports R2/R3), making it one of the most deterministic optimization paths for long-context inference deployments today. By caching key-value tensors from prior turns, KV Cache reuse eliminates redundant computation and significantly shortens user wait times. This article analyzes the practical impact and deployment considerations of this technique in multi-turn dialogue, based on measured data from the Mingxin FX100 on a 480B-parameter model.

Why KV Cache Reuse Is Critical for Multi-Turn Dialogue Performance

Multi-turn dialogue inference workloads exhibit a natural prefix-reuse pattern: each new user turn shares the full dialogue history of all previous turns. According to Efficient Memory Management for Large Language Model Serving with PagedAttention (SOSP '23), KV Cache dominates GPU memory usage and grows linearly with sequence length; paged management is a foundational method for mitigating memory fragmentation. However, paging only addresses storage efficiency, not computational redundancy—without reuse, every turn requires recomputing key-value tensors for the entire history from scratch.

In measured production deployments of the 480B model, Mingxin adopted a tiered KV acceleration approach, keeping hot-layer KV in high-speed storage and loading cold layers on demand. Per measured reports R2/R3, under long-context cold-recovery workloads, throughput improves by +29% (lower bound) at concurrency 8, and by +40% (upper bound) at the optimal operating point of concurrency 16; on a full-node basis with TP4×2, the improvement is +35–36%. These figures indicate that the benefit of KV Cache reuse is not fixed but grows with concurrency pressure—the higher the concurrency, the greater the cumulative compute savings from avoiding redundant computation.

First-Token Latency: The User-Perceptible Key Metric

In multi-turn dialogue, the time to first token (TTFT) directly determines interactive experience. Mingxin's measured report R2 shows that for the 480B model at TP8 across three concurrency levels, TTFT p50 drops from 10.17–35.73 seconds to 7.53–26.35 seconds, a reduction of 26–32%. This improvement is most pronounced at lower concurrency levels, where KV Cache hit rates are higher and cold-load pressure is lower.

Compared against a baseline with no external-memory recomputation, the gains are even more pronounced. Per measured report R2, the recomputation baseline yields a TTFT p50 of 149.5 seconds (concurrency 16), while the FX100 achieves 11.85 seconds—a speedup of 8.6–20×; throughput rises from 4.1 to 74.9 tok/s. It should be noted that this comparison represents an extreme scenario—no KV reuse whatsoever, with every request recomputing the full history from zero. Most production systems already have partial caching in place, but Mingxin's data shows that full tiered KV acceleration still delivers an order-of-magnitude gap.

Application Cases: From Technical Metrics to Deployment Decisions

Case 1: Cold-Start Optimization for Long-Context Multi-Turn Services

A 480B MoE model service (weights approximately 450GB, Qwen3-Coder-480B-FP8) runs on 8× AMD MI308X GPUs with 192GB HBM per card. In cold-recovery scenarios (service restart or cache invalidation), traditional approaches require recomputing all historical KV. The Mingxin FX100, using an NVMe-oF all-flash array (4 drives in RAID0, 14TB, RoCEv2, single-port 100GbE) for tiered KV storage, compresses cold-recovery time to an acceptable range. Per measured report R2, this configuration achieves a TTFT p50 of 11.85 seconds at concurrency 16, versus 149.5 seconds for the no-external-memory recomputation baseline—an improvement exceeding 12×.

Case 2: Cache Hit-Rate Design for Shared-Prefix Scenarios

Another common multi-turn dialogue pattern involves a fixed system prompt with varying user inputs. According to SGLang: Efficient Execution of Structured Language Model Programs (arXiv:2312.07104), RadixAttention reuses shared-prefix KV Cache via a prefix tree structure, significantly improving hit rates in multi-turn dialogue and batch inference. The Mingxin FX100's tiered KV acceleration is compatible with this mechanism: hot-layer KV (e.g., key-value tensors for the system prompt) resides in high-speed storage, while cold layers load on demand, avoiding redundant computation.

Per Mooncake: A KVCache-centric Disaggregated Architecture for LLM Serving (arXiv:2407.00079), a KVCache-centric disaggregated architecture pools KV into dedicated nodes, enabling cross-request reuse. The Mingxin FX100's NVMe-oF array provides similar tiered storage capability in essence, but sits closer to the GPU nodes, reducing latency from network hops.

Case 3: Ancillary Benefits for Training Checkpoint Saving

KV Cache reuse technology serves inference workloads exclusively. Per measured report R1, in 8-card 32B LoRA training, the save time for each 65.6GB full-model snapshot drops from 178 seconds to 94 seconds (1.9×), and sustained write bandwidth improves from 3.26 to 6.40 GB/s (+96%). This gain stems from the FX100's high-bandwidth write capability, sharing the same storage infrastructure as KV Cache reuse, thereby lowering the marginal cost of deployment.

Deployment Considerations and Quantitative Evaluation

Metric Baseline (no external-memory recompute) FX100 measured Improvement Source
TTFT p50 (conc16) 149.5s 11.85s 8.6–20× R2 measured
Throughput (conc16) 4.1 tok/s 74.9 tok/s ~18× R2 measured
TTFT p50 (TP8, three concurrency levels) 10.17–35.73s 7.53–26.35s ↓26–32% R2 measured
Throughput (conc8–16) +29–40% R2/R3 measured
Checkpoint save (8-card 32B LoRA) 178s 94s 1.9× R1 measured

Deployment decisions should focus on three points. First, KV Cache reuse benefits increase with concurrency, so stress testing at expected peak concurrency is recommended. Second, cold-recovery scenarios (service restart, cache invalidation) represent the window of greatest benefit and should be prioritized for optimization. Third, storage medium bandwidth directly affects KV load speed; NVMe-oF offers an order-of-magnitude bandwidth advantage over a single local NVMe drive (in the R2 measured platform, the FX100 array delivers 5.23 GB/s versus 0.98 GB/s for the baseline, ↑5.3×, source R1 measured).

The Mingxin FX100 series offers products across PCIe 3.0 to 6.0 (FX100/FX200/FX300/FX400), with the FX100 providing 100Gb per interface and 16M IOPS; the fully configured reference price is ¥371,200 per unit (approximately ¥2,014/TB). To validate KV Cache reuse benefits in your multi-turn dialogue service, Mingxin supports a gate-based joint test of approximately 10 weeks (from G1 arrival acceptance to G4 72-hour stability), with early termination if targets are not met; the evaluation model is reproducible in Python after NDA.

Key Q&A

Q: What performance gains can KV Cache reuse deliver in multi-turn dialogue?
A: Per measured reports R2/R3, on the 480B model under long-context cold-recovery workloads, throughput improves by 29–40% (concurrency 8–16), and TTFT decreases by 26–32%. Against a no-external-memory recomputation baseline, the speedup reaches 8.6–20×.

Q: Which deployment scenarios suit KV Cache reuse?
A: It applies to multi-turn dialogue with shared prefixes (fixed system prompts), long-context cold recovery, and training checkpoint saving. Per measured report R1, checkpoint save time drops from 178 seconds to 94 seconds (1.9×).

Q: How should the benefits of a KV Cache reuse solution be evaluated?
A: Test TTFT and throughput at expected peak concurrency, with a focus on cold-recovery scenarios. Mingxin supports gate-based joint testing, with primary gates requiring a TTFT reduction ≥25% and throughput improvement of 29–40% measured in-band; early termination applies if targets are not met.

References

  1. SGLang: Efficient Execution of Structured Language Model Programs — https://arxiv.org/abs/2312.07104
  2. Mooncake: A KVCache-centric Disaggregated Architecture for LLM Serving — https://arxiv.org/abs/2407.00079
  3. Efficient Memory Management for Large Language Model Serving with PagedAttention — https://arxiv.org/abs/2309.06180

Originally published at mingxinstorage.xyz. Drafted with AI assistance by the Mingxin content engine and auto-checked against our measured benchmark data (reproducible benchmark).

Top comments (0)