Evaluating and Optimizing LLM Serving Performance at Peak Hours: Metrics, Load Testing, and Engineering Practices
This article explains how to assess large language model serving performance under peak load instead of relying on isolated throughput or token-volume claims. It covers the meaning of tokens per second, a practical metric set for user experience and system capacity, common causes of peak-hour variability, realistic load-test design, engineering optimizations such as context budgeting and bounded queues, and how to turn speed goals into acceptance criteria for production services.
1. From Call Volume to Verifiable Service Performance
Technical discussions about large language model (LLM) services often mix two types of information: cumulative token usage over a period, and generation speed achieved during peak hours. The former reflects service scale; the latter describes output efficiency under specific conditions. They are related, but neither can prove the other.
Source material may provide call-volume rankings, while a headline may emphasize peak-hour generation speed. Without the test time window, input and output lengths, concurrency level, and statistical method, it is not possible to confirm how a specific service performs under high load. A more useful technical question is therefore not “which model is more popular,” but “how can we determine whether an LLM service can consistently meet experience requirements during business peak hours?”
Cumulative call volume may come from many short requests or from a small number of long-text tasks. It may include interactive question answering or background batch processing. Different workloads place different pressure on the system. A total volume alone cannot be used to infer per-request waiting time, let alone tail latency, failure rate, or answer quality.
For developers and enterprise users, performance evaluation should start from the business task: how long users can wait, how long a typical answer is, how many tasks enter the system at the same time, and whether the system can recover safely after a timeout or failure. These questions determine metric selection and optimization priorities.
2. Understanding What Tokens per Second Actually Means
A token is the basic unit of text processed by a model and does not map fixedly to a character, a word, or a punctuation mark. Different tokenization methods, languages, and content types change the number of tokens corresponding to the same text. Therefore, tokens per second cannot be directly treated as characters per second.
For a single request, output generation speed can be approximated as:
Output generation speed = number of output tokens ÷ corresponding generation time
The key issue is where “generation time” starts and ends. Some measurements start when the request is sent; others start when the first output token arrives. Some include queuing and network time; others count only the model decoding phase. If the definitions differ, two speed numbers are not directly comparable even when they use the same unit.
Suppose a test target is 70 to 80 tokens per second. This can only be treated as a performance range to be verified, not as a confirmed service commitment. Even if the actual output phase reaches that range, users may still perceive slow responses if requests wait in a queue for a long time.
When interpreting generation speed, at least the following conditions should be stated:
- How long the input context is, and whether it contains extensive conversation history or reference material.
- How output length is distributed, and whether there are obvious long-text tasks.
- How many requests are executing and waiting at the same time.
- Whether the metric comes from a single test, an average, or a specific percentile.
- Whether failed, timed-out, and early-terminated requests are included.
- Whether measurement occurs at the client, service entry point, or inference execution layer.
Without these conditions, a speed number is better used as an observation clue than as a basis for capacity planning.
3. Building a Metric System That Covers User Experience and System Capacity
3.1 Time to First Token: How Soon Users See the First Content
Time to first token (TTFT) is the time from sending a request to receiving the first output token. It usually includes network transmission, ingress processing, queuing, input processing, and initial generation.
For streaming question answering, TTFT directly affects how users perceive response speed. A high subsequent generation speed cannot fully offset a long initial wait. Interactive services should therefore treat TTFT as an independent metric rather than focusing only on final average speed.
3.2 Output-Phase Speed: Whether Generation Remains Smooth After the Answer Starts
Output-phase speed concerns how efficiently content is produced after the model begins responding. In addition to average speed, the time intervals between adjacent output chunks should also be observed.
If the overall average speed is high but the output process frequently has long pauses, user experience may still be poor. This can be related to scheduling contention, network buffering, or client-side processing. Server-side and client-side records are needed to locate the cause; not all of it should be attributed to the model.
3.3 End-to-End Latency: When the Task Is Actually Complete
End-to-end latency is the total time from sending a request to receiving the complete result. For structured extraction, batch analysis, or workflows that need the full result before proceeding, it is often more important than TTFT.
The following relationship helps frame the issue:
End-to-end latency ≈ TTFT + subsequent output time
This is only an approximation. Real systems may also include result parsing, business validation, and other processing steps. If the object being evaluated is a complete business workflow, these steps should be included in measurement.
3.4 System Throughput: How Much Work the System Can Complete Overall
Single-request generation speed and total system throughput are not the same metric. System throughput usually describes the number of requests processed or tokens generated per unit of time.
A service may increase total throughput by processing more requests concurrently while reducing the speed of individual requests. Evaluation reports should therefore provide both single-request experience and system processing capacity, avoiding the use of one total to hide problems in the other dimension.
3.5 Tail Latency, Failure Rate, and Quality
Averages can easily hide a small number of severe timeouts during peak periods. In practice, evaluation should combine median latency, higher-percentile latency, timeout ratio, throttling ratio, and successful completion rate.
At the same time, speed evaluation cannot be separated from answer quality. If speed improves by shortening necessary context or truncating output too early, but this causes omissions, errors, or invalid formats, the optimization has not truly improved business outcomes.
4. Why Performance Fluctuates During Peak Hours
LLM inference typically includes two main phases: input processing and step-by-step output generation. Input processing requires understanding existing context, while output generation requires continuously producing subsequent tokens. Their resource usage patterns and durations differ.
Long-context requests may increase input-processing time and consume more memory resources; long-output requests continuously occupy generation capacity. If many long requests arrive together, subsequent short requests may be affected.
In addition, inference services often use batching to improve resource utilization. Scheduling multiple requests together can help increase overall throughput, but if waiting to form a batch takes too long, or if tasks within a batch differ too much, TTFT or output intervals may increase. The actual effect depends on the implementation; larger batches are not automatically better.
Request arrival patterns also matter. Requests that arrive steadily and requests that arrive in a short burst can produce very different queuing behavior even when their average per-minute counts are the same. When load approaches the system’s sustainable processing capacity, a small increase in traffic can cause a significant rise in waiting time.
Therefore, “stable during peak hours” should mean that, under an explicit traffic model, request-length distribution, and quality requirement, the service can keep latency, failure rate, and throughput within acceptable ranges. It should not mean merely that a single request achieved a fast output speed.
5. Designing Load Tests That Reflect Real Business Workloads
5.1 Build Request Samples Instead of Preparing Only Fixed Questions
Load-test samples should cover short question answering, long-document analysis, multi-turn conversation, and long-output tasks from real business scenarios. For each task type, measure input length, output length, and occurrence ratio, then construct a mixed workload.
If the same short question is repeated throughout the test, results may be affected by caching or highly regular input and may not represent real business traffic. Test data should also avoid sensitive information and must have lawful permission for use.
5.2 Test Both Concurrency Level and Request Arrival Rate
Fixed-concurrency tests are useful for observing resource utilization and throughput changes at different concurrency levels, but they do not fully simulate scenarios in which real users continue to arrive.
Requests should also be issued at a preset rate, with short traffic bursts added. Record both the number of requests actually sent and the number that could not be sent as planned, so that the load-test client does not become the bottleneck and cause the service pressure to be underestimated.
5.3 Advance the Test in Phases
The test can be divided into four phases: warm-up, steady state, burst, and recovery.
- The warm-up phase observes initialization effects and allows the running state to stabilize.
- The steady-state phase obtains sustainable latency, throughput, and resource metrics.
- The burst phase checks queuing, throttling, and timeout behavior.
- The recovery phase verifies whether backlog can be cleared promptly after traffic falls.
Observing only the peak period is not enough. If a backlog persists long after the peak ends, the impact on subsequent users will continue to grow.
5.4 Keep Statistical Definitions Consistent
Client-side measurement is suitable for reflecting user experience, while server-side measurement is suitable for analyzing internal bottlenecks. The two should complement each other. When recording time intervals, use a monotonic clock suitable for measuring elapsed time to avoid results being affected by system time adjustments.
A streaming output chunk does not necessarily equal one token. When calculating token speed, prefer trusted usage records or a consistent tokenization definition; do not directly treat the number of chunks as the number of tokens.
All failed and timed-out requests should be included in the report. Counting only successful requests can make performance under high load appear better than it really is.
6. Engineering Optimization for Peak Load
6.1 Control Context and Output Budgets
Prioritize removing duplicate history, irrelevant material, and unnecessary prompt content. For long sessions, history can be organized according to task needs, but key facts, constraints, and sources should be retained to prevent necessary conditions from being lost after compression.
The output budget should also match the task. Simple queries do not need long explanations, while complex analysis should not be forcibly compressed into unsupported conclusions for the sake of speed. The goal is to reduce wasted work, not to sacrifice useful information.
6.2 Separate Streaming Display from Complete-Result Validation
Interactive interfaces can use streaming display to reduce perceived waiting, but in structured tasks, receiving partial content does not mean obtaining a valid result.
Writes, approvals, or other operations should be performed only after the result is fully received and has passed format, field, and business-rule validation. If the connection is interrupted, the result should be explicitly marked as incomplete to avoid mistaking a partial answer for a successful output.
6.3 Set Bounded Queuing and Overload Protection
Unbounded queuing does not create additional processing capacity; it only turns resource shortages into longer waiting times. The system should limit queue length according to the waiting budget allowed by the business and adopt explicit rejection, deferral, or degradation strategies under overload.
Different scheduling strategies can be used for real-time interaction and background batch processing, so that long background tasks do not crowd out critical interactive resources. Priorities should be determined by business value and fairness requirements, not merely by pursuing the best numbers for one class of requests.
6.4 Keep Retries Controlled to Avoid Amplifying Congestion
Repeatedly retrying immediately after a request fails may further increase peak pressure. Limit the number of retries and total elapsed time, and use gradually increasing waits with appropriate random jitter to reduce synchronized retries.
Processes involving external writes or state changes also need idempotency controls. Model-request retries and business-operation retries should be designed separately to prevent a single user intent from triggering multiple actual executions.
6.5 Plan Capacity Based on Measured Results
Capacity planning needs to consider request arrival rate, input and output lengths, service time, and resource headroom. Under stable conditions, the average number of in-flight tasks in the system is related to the arrival rate and average dwell time, but this relationship cannot replace real load testing, nor can it precisely predict tail behavior during traffic bursts.
Actual planning should identify the sustainable load range through load tests, then reserve headroom for traffic fluctuations, maintenance, and failure recovery. Autoscaling should also be evaluated together with resource preparation time; new capacity cannot be assumed to take effect instantly.
7. Turning Speed Goals into Acceptable Service Requirements
An executable performance target should not be just a sentence about “how many tokens per second are generated.” It should include applicable tasks, context-length ranges, output-length ranges, request arrival patterns, latency percentiles, success rates, and quality acceptance criteria.
After launch, the service should continuously record queue waiting, input-processing time, TTFT, output intervals, end-to-end latency, and error types, and analyze them separately by task type. Only then can performance degradation be attributed to the network, queuing, inference resources, or business post-processing.
The core of LLM peak performance is not the isolated pursuit of a larger speed number. It is ensuring timely responses, correct output, controllable failures, and predictable capacity under real business load. By evaluating call scale, single-request speed, and overall service stability separately, and then connecting them through consistent measurement and engineering governance, teams can form reliable technical judgments and production-readiness criteria.
