Load Testing a Local LLM: Latency and Speed

Vladimir Lomtev•
Load Testing a Local LLM: Latency and Speed

A local LLM load test should show how much correct work the server can perform at an acceptable latency and failure rate. To do that, you lock down the model, hardware, request lengths, cache mode, and arrival profile. One tokens-per-second number without those conditions does not describe service readiness.

Prepared by AI Studio by Vladimir Lomtev on November 14, 2026, for developers and operations teams. This is a guide to organizing measurements, not a publication of our own hardware results. There are no GPU rankings or made-up benchmarks below. Servers should be tested only in an authorized environment; do not run the training scenario on someone else’s or a production endpoint without an agreed testing window.

Contents

What exactly to test

Separate two questions: does the model solve the task correctly, and does the system handle the required traffic? The first requires gold-standard examples and scoring rules. The second requires measuring latency, throughput, queueing, and errors. A fast wrong answer should not count as a successful business operation.

There are also different system boundaries. A test of the engine itself may not include OCR, document search, the gateway, or agent tools. For the user-facing promise, you need an end-to-end application test. It is convenient to start with the model server, then add the other components and compare each one’s contribution.

For quality checks, use your own LLM benchmark methodology. For server-side measurement, vLLM provides Benchmark CLI, which has separate test types built in.

Start by defining acceptance criteria

Before you begin, document the user expectation. For chat, that may be a time-to-first-token limit; for field extraction, it may be full completion within a set time; for overnight archiving, it may be processing the full volume by a specified deadline. The thresholds are set by the process, not by a template copied from someone else’s benchmark.

It is useful to separate normal operation from overload. In normal operation, the service should meet the agreed SLOs. Under overload, it should cap the queue and return a clear rejection instead of building up an endless backlog. Recovery after the load is removed is also part of the test.

Set the criteria in advance so you do not choose a convenient metric after seeing the result. If you first promised a fast chat experience and then showed only overall archive throughput, the acceptance task has not been completed.

Which metrics to record

Metric Unit How to interpret
Incoming load Requests per second How much work the client is sending
Successful throughput Successful requests per second How much the system actually completes
TTFT Milliseconds or seconds Time to first token at the chosen boundary
End-to-end latency Milliseconds or seconds Time until the response is complete
Output throughput Tokens per second Total generation during the window
Errors and timeouts Count and rate Work that cannot be hidden from the report
Queue and memory Requests, bytes, pool utilization Explanation for the degradation

Always record the denominator for rates. “2% error rate” should mean a specific number of errors out of a specific number of requests sent over a known period. Separate client timeouts, server rejections, and responses that failed content checks.

Quantiles are calculated from individual observations. For each run, specify the number of requests and the duration of the window. Do not treat the average of several p95 values as equivalent to the overall p95: when combining runs, you need the raw observations or correct histogram aggregation.

Environment card

Before measurement, save:

  • model, revision, weight format, and tokenizer;
  • engine, image, and launch configuration;
  • GPU, number of devices, driver, and interconnect;
  • context size, output limit, and generation parameters;
  • cache rules and the warm-up procedure;
  • request submission method and client limits;
  • state of neighboring processes and the selected test window.

The environment card helps distinguish a tuning effect from an environment change. If the second run used a different model or a neighboring process freed up memory, you cannot attribute the entire result to a single engine flag.

The approach to resource calculation is complemented by the article on quantization and memory. In a load test, you need not only a weight estimate, but also the actual behavior of active sequences.

How to prepare the request stream

Start with a distribution of real tasks. Separate short questions, long documents, and requests with long outputs. If you have a shared system prompt or a reusable document, preserve that characteristic. It affects the ability to reuse computation.

Synthetic sequences are useful for isolating factors: identical input and a fixed output let you compare configurations. But such a test does not prove quality and does not always reproduce a production cache. Label it as synthetic in the report.

For production text, use an approved anonymized set. Do not send internal documents to a public load generator or an external tracing system without an agreed policy. Also check stored outputs: the test log sometimes contains the same sensitive information as the original request.

Open- and closed-loop load models

In a closed-loop setup, a fixed number of clients send the next request only after the previous one completes. If the server slows down, the clients automatically reduce their rate. This mode is useful for studying concurrency, but it can hide behavior under an independent incoming stream.

In an open-loop setup, requests arrive at a set rate regardless of whether earlier ones have finished. If capacity is insufficient, the queue grows or rejections begin. This is useful for evaluating peaks, but it requires limits on duration and volume so the test remains manageable.

The number of concurrent connections does not replace a rate description. In the protocol, specify both values and the generator’s behavior when the limit is reached. Make sure the client machine itself does not become the network, CPU, or result-processing bottleneck.

Cold and warmed-up modes

A cold start may include loading weights and preparing the runtime. A warmed-up model is already in memory. Prefix cache can additionally reuse shared input. These states need to be separated, not averaged together by accident.

In the documentation vLLM Benchmark CLI it is explicitly noted that prompts can be reused across tests. So rerunning the same data may measure a different mode. If the goal is a test without reuse, define a reset procedure or change the dataset; if the goal is a working repeatable flow, keep the repetition realistic.

Also check recovery after a restart. A service may meet its SLO in steady state, but take a long time to get back there after an update. For a process with strict expectations, this affects failover capacity.

Example of a synthetic vLLM test

This example is designed for a local test server that serves local-qwen, and an installed compatible vLLM CLI. First, check the available options:

vllm bench serve --help

Then run a small pass without predeclared results:

vllm bench serve \
  --backend openai-chat \
  --base-url http://127.0.0.1:8000 \
  --endpoint /v1/chat/completions \
  --model local-qwen \
  --tokenizer Qwen/Qwen2.5-1.5B-Instruct \
  --dataset-name random \
  --random-input-len 256 \
  --random-output-len 64 \
  --num-prompts 40 \
  --request-rate 1 \
  --save-result \
  --result-dir ./benchmark-results

These are training-sized settings: 256 input tokens, a target output of 64 tokens, 40 requests, and a rate of about one request per second, according to the tool's behavior. They are not a recommended production workload. For a secured server, pass the key using a supported CLI method without putting the secret into a published log. Parameter details are in the vllm bench serve help text.

Save the tool version together with the result. Before copying the example to another version, verify the backend names, tokenizer parameters, and the random-sequence generation mode.

How to scale up the load

First run a single request and verify correctness. Then measure a small steady stream. After that, increase one parameter at a time: rate, number of clients, or request length. Do not change everything at once, or the cause of degradation will remain unclear.

Find the range where latency starts to grow faster than incoming traffic. Compare it with queueing, memory, prefill time, and decode time. For production capacity, choose the mode that meets the SLO with the needed headroom, not the maximum throughput achieved.

After the peak, reduce the load and observe recovery. If the queue does not shrink, processes remain in an error state, or the client keeps retrying failures, that is a separate acceptance finding. Automatic retries can amplify overload, so test their behavior separately.

How to read the results without drawing the wrong conclusions

High GPU utilization does not equal a good user experience. A device can stay busy while a significant share of requests are waiting or timing out. Conversely, low utilization may be caused by a light stream, not a malfunction.

A lower average latency does not prove improvement in heavy scenarios. Look at individual request classes and the tail of the distribution. If quality or output length changed, explain that first and then compare speed.

For reproducible optimization, use this experiment log:

Date and configuration:
Hypothesis and the single meaningful change:
Request set and cache rules:
Proposed and completed load:
TTFT, total time, errors, memory:
Quality check:
Decision and output limit:

You can copy this template for each run. It does not require you to invent a final speedup percentage: the conclusion comes after measurement.

What should remain after the test

Save the original configuration, dataset description, generator parameters, raw results, and a short decision. Define the acceptable throughput, overload conditions, and the way to return to a stable mode. If the model, context, or hardware changes significantly, repeat the check.

Server-side metrics supplement, but do not replace, client-side measurements. For vLLM, use the Production Metrics descriptionand for the overall system use the material on monitoring LLMs and agents.

The mechanisms behind server settings are explained in the guide to engines and inference acceleration. Before choosing hardware, it is useful to review the comparison of self-hosted inference and API.

Frequently asked questions

Is one request enough to test speed?

It is useful for minimal diagnostics, but it does not describe queueing, parallelism, caching, or peak behavior. For acceptance, you need an agreed-upon traffic stream.

Why is the test faster than the real application?

It may not include data preparation, search, gateway, external tools, or the network path. Compare the measurement boundaries and sequence lengths.

Can different engines be compared?

Yes, if the model, hardware, dataset, and generation rules are fixed. Differences in weight format and functions need to be disclosed so the result applies to specific configurations.

What p95 should be considered good?

The one that matches the task and user expectation at the given traffic level. There is no universal value for chat, voice service, and overnight archiving.

How Vladimir Lomtev's AI studio helps verify performance

Vladimir Lomtev's AI studio can connect process auditing, preparation of control data, and testing of the selected LLM option before integration. For load testing, that means defining the acceptance criterion, reproducing the working scenario, and checking the result as part of the running system.

The first step is to choose the process, its current latency, volume, and acceptable share of manual rework. Discuss the task.

How to accept a server based on test results

Accept the configuration that preserves quality and meets the agreed latency and error limits on the production traffic stream. Document cold start, overload, and recovery separately. The test result should make it possible to repeat the measurement and explain what load the system can truly handle.

Request an audit

Share your contact details and we will follow up.

← All articles

Comments (0)

Loading comments…

Leave a comment
No registration required

Book a strategy call
for agentic operations

Tell us which workflow you want to improve. We will map feasibility, risks, and the fastest MVP path.

By submitting, you agree to our privacy policy

Contacts

Global Operations

Serving U.S. clients remotely
with private cloud and on-prem options

Strategy calls by request

We respond after reviewing your workflow context.

info@agentsunrise.pro

For partnership inquiries

Have a proposal?

Write to us in messengers

© 2026 AgentSunrise