LLM Inference Cost, Throughput, and Stability: A Practical Benchmarking Methodology
A practical methodology for evaluating large language model inference services beyond advertised per-token pricing. Learn how to normalize costs to a common baseline, break down the bill using cache hit rate and output ratio, measure throughput and time-to-first-token separately, attribute performance degradation, and design routing, fallback, and capacity-reservation layers for production. Includes a sample workload analysis and a vendor evaluation checklist.
1. The Problem: Why a Low Unit Price Rarely Means Low Cost
When teams evaluate a large language model (LLM) inference service in real engineering work, the most common mistake is looking only at the published price. The actual bill is determined by four variables working together: the input-to-output token ratio, cache hit rate, request concurrency within a given period, and how the service performs at different times of day. Ignore any one of these variables and the “price per million tokens” metric becomes seriously misleading.
This article analyzes a typical high-intensity usage sample: over a continuous development cycle running from a weekend into the next day, roughly 180 million tokens were consumed at a real cost of about 31 CNY. That works out to roughly 0.17 CNY per million tokens on average. Using 1 billion tokens as a common baseline, the cost is about 170 CNY. This conversion is itself the first step of any selection process — only when different billing schemes are brought onto the same baseline does comparison mean anything.
2. Normalizing the Cost Model: Turning the Bill into a Comparable Formula
2.1 A Common Baseline and a Four-Part Breakdown
Convert every candidate service to “total cost per 1 billion tokens” and break it down along the following structure:
total cost = input tokens × input price × (1 - cache hit rate) × cache discount+ input tokens × input price × cache hit rate+ output tokens × output price+ time-of-day factor (off-peak / peak)
Cache hit rate and output ratio are the two variables with the largest leverage. In the sample above, the output ratio was only about 0.6% and the cache hit rate exceeded 90%, which means cost was determined almost entirely by input tokens that missed the cache. With the same workload, if the cache hit rate drops from 93% to 60%, total cost can rise several times over — which explains why two teams using the same service can arrive at completely different unit prices.
2.2 An Observability Blind Spot to Watch For
If the service side does not expose a metric for cache hit rate, users are left with only the rough result of “total tokens × unit price” and cannot locate where a cost anomaly comes from. For that reason, observability should enter the evaluation sheet on equal footing with price: does the service break down input and output tokens separately, does it expose cache hit metrics, and does it provide per-request usage detail? Without these fields, cost optimization is guesswork.
2.3 Cross-Comparison with Higher-Tier Models
On the same baseline, price mid-to-low-tier and high-tier models separately. Mid-to-low-tier models may be roughly on par with a comparable tier from another vendor off-peak, but can double at peak times; high-tier models run about three times the former off-peak and up to six times at peak. The conclusion is not “which one is cheaper” but that comparing prices alone is meaningless — time-of-day distribution and cache characteristics have to be factored in.
3. Performance Measurement: Throughput, Time-to-First-Token, and Reasoning Visibility
3.1 Measure Three Metrics Separately
- Output throughput (tokens/s): steady-state generation speed, which determines completion time for long-text tasks.
- Time to first token (TTFT): the time from sending a request to receiving the first token, which determines perceived interactivity.
- Reasoning-phase speed: for models with a reasoning process, internal reasoning tokens are often generated significantly slower than the final output.
The sample observations: off-peak overall throughput fluctuated between 50–55 tokens/s, which is “slow but acceptable.” Once the morning peak began, the reasoning phase dropped to 4–9 tokens/s and the final output to 12–25 tokens/s. That decay is close to an order of magnitude, enough to stretch a task that finished in 30 seconds into several minutes.
3.2 Attribution: Rule Out the Client First, Then Suspect the Server
The first principle of investigating performance anomalies is controlling variables. A workable troubleshooting order:
- Using the same client and network, issue parallel requests to another model tier or another service and confirm the baseline throughput is normal (in the sample, the control group held steady at 125–135 tokens/s).
- Check whether a single request is triggering rate limiting — if concurrency is far below the documented limit (for example, the limit is 50 while only 1 request is in flight), rate limiting can essentially be ruled out.
- Observe whether the decay correlates strongly with time of day; if it reproduces at the same hours every day, it points to server-side capacity rather than a network-path issue.
- Retain the raw time-series data as evidence for later capacity negotiations or architectural fallback.
3.3 Observability Is Itself a Product Capability
An easily underestimated experience point: when the reasoning process “types out” characters at an extremely slow rate, a UI that shows neither the reasoning chain nor the live rate leaves users unable to distinguish “the model is thinking” from “the connection has dropped.” When evaluating a toolchain, treat “visible intermediate process + live rate + explicit error states” as a hard requirement — this reduces wasted engineering time more than any UI polish.
4. Production Architecture Responses: Routing, Fallback, and Capacity Reservation
Single-model dependency is fragile at peak times. A practical engineering approach has three layers:
# Illustrative: model routing based on time of day and observed throughputdef pick_model(task, hour, observed_tps):if task.kind == "long_context" and observed_tps > 40:return "mid_tier" # steady-state throughput meets target; use the cost-effective tierif hour in PEAK_HOURS or observed_tps < 15:return "fast_fallback" # degrade to the low-latency tier at peakreturn "high_tier" # keep the high tier for complex reasoning tasks
- Routing layer: split traffic by task complexity so that simple extraction, formatting, and summarization tasks do not consume high-tier quota.
- Fallback layer: trigger on live throughput and TTFT to switch automatically to a backup service, avoiding tasks hanging for long periods.
- Capacity layer: reserve quota for critical paths and bring cache hit rate into monitoring and alerting — an abnormal drop in hit rate often shows up before an anomaly on the bill.
5. Conclusion and Checklist
Price is only the entry ticket. What really determines cost per task is cache hit rate, output ratio, and time-of-day distribution; what really determines user experience is throughput stability and the observability of intermediate processes. Fix the following fields in your evaluation sheet: baseline-normalized unit price, input/output ratio, cache hit statistics, off-peak and peak throughput, TTFT, concurrency limit versus actual concurrency, and error-state visibility. Measure these clearly, and only then ask “which one is the better deal” — that is an evidence-based engineering judgment.
