vLLM PagedAttention Concurrency & QPS Calculator
Calculate maximum concurrent requests, aggregate tokens/sec, and sustained QPS from leftover vLLM PagedAttention KV cache VRAM.
Input Parameters
Calculated Output
Primary Result
—
Adjust inputs to recalculate immediately.
vLLM KV Pool & Concurrency Scaling (80GB A100, 16 GiB Model)
Lowering --max-model-len or enabling --kv-cache-dtype fp8 directly multiplies concurrent stream capacity.
| Configuration | KV Cache Dtype | Avg Seq Len | Max KV Tokens | Max Concurrent Streams |
|---|---|---|---|---|
| Default FP16 KV | FP16 (2B) | 4,096 tok | ~451,700 tok | 110 concurrent |
| FP8 KV Cache | FP8 (1B) | 4,096 tok | ~903,400 tok | 220 concurrent |
| Long Context FP16 | FP16 (2B) | 16,384 tok | ~451,700 tok | 27 concurrent |
| Long Context FP8 | FP8 (1B) | 16,384 tok | ~903,400 tok | 55 concurrent |
Formula & Engineering Methodology
vLLM allocates a fixed fraction (gpu_memory_utilization) of total VRAM, subtracts weights and CUDA graph buffers, and treats the remaining pool as paged KV blocks. Maximum theoretical QPS divides aggregate batched output throughput by average completion length.
kv_pool_gib = (gpu_vram_gib * gpu_mem_util) - weights_gib - overhead_gib
max_kv_tokens = (kv_pool_gib * 1073741824) / (2 * layers * kv_heads * head_dim * kv_bytes)
max_concurrency = floor(max_kv_tokens / avg_seq_len)
qps = (max_concurrency / (tpot_ms / 1000)) / avg_output_tokens
Variable Definitions
gpu_mem_util: vLLM --gpu-memory-utilization cap leaving headroom for PyTorch allocator spikes.tpot_ms: Observed per-token inter-token latency under batch load (1000/TPOT = per-user tok/s).
Practical Note: At very high concurrency (>128 streams), attention kernel compute and prefill chunking saturate before KV memory runs out, causing TPOT to rise.
Frequently Asked Questions
What does gpu_memory_utilization=0.92 leave unallocated?
It reserves 8% of GPU VRAM for NCCL, driver allocations, and transient PyTorch buffer spikes outside vLLM's managed KV block pool.
Why does PagedAttention prevent out-of-memory fragmentation?
Unlike older static allocators that pre-reserve max_model_len contiguous tensors per request, PagedAttention allocates non-contiguous 16-token blocks on demand.
Does enabling FP8 KV cache degrade throughput?
On Hopper/Ada GPUs (H100, L40S, RTX 4090), FP8 KV reduces memory traffic and doubles concurrency with negligible latency overhead.