LLM Local Inference Performance Benchmarking and Bottleneck Analysis
This article explains why strong single-concurrency benchmark numbers often fail to translate into production readiness for locally deployed large language models. It defines key metrics such as prefill, decode, TTFT, throughput, and length decay, then walks through observed patterns showing that compute is rarely the constraint while memory bandwidth and scheduling are. You will learn how to attribute bottlenecks across the hardware, runtime, and request layers, how to design a reproducible evaluation matrix with orthogonal variables, and which optimizations to prioritize when reducing time to first token.
1. Why Good Benchmark Numbers Do Not Mean Production-Ready
When teams deploy large language models locally, they often run into an awkward situation: throughput and latency look excellent at single concurrency, but as soon as real business traffic arrives, time to first token spikes and overall throughput drops by half. Recent local measurements on a new-generation large model’s official release confirmed this again—in some load ranges, it performed even worse than a lighter version in the same family.
This does not mean the model has “regressed” in capability. A more accurate explanation is that inference performance is determined jointly by model architecture, weight precision, VRAM bandwidth, batching strategy, context length, and concurrency scheduling. Changing any one of these can significantly reshape the performance curve. The value of benchmarking, therefore, is not to deliver a “good or bad” verdict, but to pinpoint which segment the bottleneck occurs in.
2. Defining the Metrics First
A rigorous evaluation must be built on consistent definitions; otherwise the numbers cannot be compared across runs.
- Prefill: The stage that processes the input prompt. It is compute-intensive, primarily bound by compute capacity, and sets the lower bound on time to first token.
- Decode: The token-by-token generation stage. It is memory-access-intensive, primarily bound by VRAM bandwidth, and determines sustained output speed.
- TTFT (Time To First Token): The time from request submission to receiving the first token, equal to queue wait time plus prefill time.
- Throughput (tok/s): Tokens processed per unit time. Distinguish between single-concurrency peak and multi-concurrency aggregate values.
- Length decay: The change in processing capacity as context grows from 2k to 32k.
A common mistake is reporting only the single-concurrency peak. In real business, user requests stack up, so the “decay curve under concurrency” carries more engineering value than a “peak number.”
3. Four Patterns from the Measurements
The following are typical shapes observed in this local stress test (values are for trend illustration only; actual results vary with hardware and configuration):
| Observation Dimension | Observed Behavior |
|---|---|
| Prefill single-concurrency peak | ~757 tok/s at 4k context; sustained 629–758 tok/s across 2k–32k, with no clear length decay |
| Prefill decay under concurrency | ~30%–45% drop at 2 concurrency, ~50% at 4, up to ~63% at 6 (688 down to 228 at 2k) |
| Decode single concurrency | 23.8–28.7 tok/s, small fluctuation, good stability |
| Decode under concurrency | Falls into 8–18 tok/s; a dip of 8–11 tok/s appears with long prompts at 4–6 concurrency, recovering to 20–28 at 32k (high noise) |
| Time to first token | Rises linearly with context; ~51.5s at single concurrency at 32k, climbing to ~186.4s at 6 concurrency |
Four conclusions can be drawn:
- Prefill has ample compute; length is not the main enemy. Throughput stays roughly flat from 2k to 32k, indicating that attention computation and VRAM capacity are not yet hard constraints in this range.
- Concurrency is the main killer of prefill. At 6 concurrency, nearly two-thirds of capacity is consumed by scheduling overhead and resource contention, suggesting the batching strategy or VRAM bandwidth is nearing its limit.
- Decode enters a memory-access bottleneck zone. Stable at single concurrency but collapsing at higher concurrency is a classic sign of “bandwidth being spread thin.”
- Queueing, not computation, dominates time to first token. Of the 186s TTFT at 32k and 6 concurrency, most time is spent waiting for scheduling rather than in actual forward computation.
4. Root-Cause Attribution: Three Layers
Layer 1: Hardware. During decode, every generated token requires a full read of model weights and the KV Cache, so VRAM bandwidth sets the theoretical ceiling. Longer context means a larger KV Cache and higher bandwidth pressure, which explains the dip under long prompts.
Layer 2: Runtime. Strategies such as continuous batching, chunked prefill, KV Cache quantization, and paged management directly determine actual throughput under concurrency. If the scheduler uses a naive “first come, first computed” policy, long requests block short ones and create head-of-line blocking.
Layer 3: Request. Default client timeouts, retry storms, and lack of rate limiting can amplify a queueing problem into an avalanche.
5. A Reproducible Evaluation Plan
Split the evaluation into four orthogonal experiment groups, changing only one variable per group:
# Illustration: evaluation matrix design (pseudocode)matrix = {"context_len": [2048, 4096, 8192, 16384, 32768],"concurrency": [1, 2, 4, 6, 8],"output_len": [128, 512],"precision": ["fp16", "int8"], # depends on hardware support}# Repeat each group 3 times and take the median; discard the first warm-up round# Record: TTFT, Prefill tok/s, Decode tok/s, VRAM usage, error rate
Key practices:
- Warm-up and isolation: Run several warm-up rounds before formal sampling to avoid contaminating data with the first weight load.
- Median over mean: Long-tail jitter can significantly inflate the mean, so reporting the median and P95 is more reliable.
- Fix output length: Otherwise Decode metrics are not comparable.
- Record resource levels synchronously: VRAM usage, bandwidth utilization, and GPU utilization should be observed in alignment with throughput.
6. Optimization Path
If the goal is to reduce time to first token, the recommended priority is:
- Cap the maximum context per request, and segment or summarize overly long inputs as preprocessing.
- Enable chunked prefill to slice long requests and prevent them from monopolizing compute for extended periods.
- Introduce priority queues and rate limiting to protect the latency experience of short requests.
- Quantize or apply paged management to the KV Cache to relieve VRAM bandwidth pressure.
- Select model sizes by business tier: use lighter model specifications for latency-sensitive scenarios, and reserve large specifications for offline batch processing.
For cloud deployment, you can combine a container platform to host inference services, object storage to hold model weights, a logging service to collect stress-test details, and monitoring and alerting to set thresholds on TTFT and throughput—turning a one-off stress test into continuous performance baseline management.
7. Conclusion
The real value of this measurement data is not in declaring a particular version “underwhelming,” but in clearly illustrating the typical bottleneck migration path of large models in local deployment: compute is not the bottleneck; bandwidth and scheduling are. For engineering teams, building an evaluation system with consistent definitions, orthogonal variables, and repeatable execution matters far more than chasing single-point peak numbers.
