M10-036M10: Engineering Deep-Dive & Technical BQAI Infra Deep-Dive & Postmortem BQHard
⚡Flashcard Drill➔Mastery:
AI Infra Deep-Dive: Solving KV Cache Exhaustion & Preemption Thrashing in vLLM
🎯 Active Recall Self-Check (Draft First, Verify After)
Login-free practice tracker: recall core answer, audit pitfalls, and log review status.
Step 1 · Draft your concise answer & assumptions
Step 2 · Check Pitfalls & Follow-up Inquiries
📐 Mathematical Definition
⚡ One-Sentence Core Answer
Catch silent KV cache saturation and preemption/recomputation thrashing via
num_preemptions telemetry, then stabilize P99 TPOT using Chunked Prefill and KV-budgeted admission control.📌 Key Takeaways
- •Symptom: normal average latency masked sudden 5-second P99 TPOT freezes during bursty long-document traffic
- •Telemetry Culprit:
gpu_cache_usage_percpinned at 99.8% whilenum_preemptions_totalspiked—growing decode sequences constantly preempted and recomputed KV blocks - •Three-Part Fix: enabled Chunked Prefill to bound per-step compute, activated APC prefix sharing (-35% KV pressure), and added KV-headroom admission control
- •Impact: eliminated 5s freezes, dropped P99 TPOT from 420ms to 55ms, and boosted sustainable concurrency 40%
📐 Mathematical Derivations
Max concurrency obeys ; GQA plus FP8 KV quantization reduces by 4-8x.
🏭 Production Trade-offs
Queueing excess requests cleanly at the gateway beats admitting them into a 99%-full GPU pool only to trigger PCIe swap or recomputation thrashing.
⚠️ Common Interview Pitfalls
- ✕Advertising
max_model_len=128Kwithout KV-aware concurrency admission limits - ✕Tracking mean TPS while ignoring
num_preemptionsand P99 inter-token latency spikes
🎯 Interviewer Follow-up Inquiries
- ?How do you validate that FP8 KV Cache quantization doubles capacity without degrading long-context Needle-in-a-Haystack accuracy?
- ?How does the router track live per-replica KV headroom without stale cache herd effects?
⚡
Test muscle memory on this topic via 3-Layer Flashcards
Active Recall: Mentally formulate Prompt ➔ Math Derivation ➔ Benchmark Implementation in 3 minutes.
📚