Intermediate 12 minDaily plan

vLLM: monitoring performance with Prometheus

Two mini PCs are connected by network cables on a workbench.

vLLM and Prometheus are a natural pair: the vLLM server exposes its internal counters in Prometheus format, with no extra exporter needed. This guide explains which metrics to watch (waiting requests, latency, tokens, KV cache), how to collect them, which PromQL queries to write, and how to use them for diagnosis. The metric names come from vLLM's design documentation; since they change from one version to the next, the guide also shows you how to verify them on your own server.

By Mohamed Meguedmi·Update 2026-11-28·Tested on Windows, macOS, and Linux

#Why monitor a vLLM server

A vLLM server shared by multiple people or applications rarely degrades all at once. The queue grows, the KV cache fills up, requests get preempted and then recomputed, and the first token takes longer and longer to arrive. Without metrics, you only see the result: users complaining about a "slow" assistant, with no way of knowing whether the problem comes from the GPU, the configuration, or a client sending oversized prompts.

vLLM's metrics answer these questions with numbers from your own server. They don't replace a benchmark: they describe what's happening in production, with your model, your prompts, and your traffic. So this guide gives no reference throughput and no "normal" threshold: those values depend entirely on your hardware and your load, and you need to establish them yourself.

i
Sources and versions
The metric names in this guide come from the "Metrics" design page in the vLLM documentation (latest branch, accessed 30/10/2026: https://docs.vllm.ai/en/latest/design/metrics/). That page describes the V1 engine and flags renames and deprecations. We did not test this procedure on a QuelLLM server for this guide, so check each name against your version with the command in the next step before you build a dashboard or an alert.

#Prerequisites

The complete kit for building your own AI assistant.

Benefit from our experience and a guided path to build your local assistant and use your AI every day.

  • Lifetime online access
  • PDF + files
  • Refunded within 30 days
A working vLLM server
Launched with vllm serve and the OpenAI-compatible API. The companion guide “Déployer vLLM en production” covers installation and launch options.
Prometheus
Installed as a binary or via the official prom/prometheus Docker image. The web UI listens on port 9090 by default.
curl
To read the raw endpoint and verify metric names.
Optional: Grafana
For dashboards. Prometheus alone is enough for queries and alerts.
Optional: a GPU exporter
vLLM doesn't publish GPU temperature, power, or clock speed. For those values, add something like the DCGM Exporter from NVIDIA.

#Step 1: Read the /metrics endpoint

vLLM's OpenAI-compatible server exposes its metrics at the /metrics path, on the same host and port as the API. With vllm serve, the default port is 8000. Start your server as usual, for example:

Terminal — launch vLLM (example)
vllm serve Qwen/Qwen2.5-7B-Instruct --host 127.0.0.1 --port 8000

Then, from the same machine, check the installed version and the list of metrics actually exposed. The # HELP and # TYPE lines give the exact name, a description, and the type (gauge, counter, or histogram).

Terminal — check the version and names
python -c "import vllm; print(vllm.__version__)"
curl -s http://127.0.0.1:8000/metrics | grep -E '^# (HELP|TYPE) vllm:'
# Valeurs actuelles des jauges principales
curl -s http://127.0.0.1:8000/metrics | grep -E '^vllm:(num_requests_running|num_requests_waiting|kv_cache_usage_perc)'

Note the version and save the output of the first grep command to a dated file: that's your baseline. After each vLLM update, rerun it and compare the two lists with diff. A dashboard that suddenly shows "No data" is very often caused by a rename.

!
If no vllm: metrics show up
First, check that you're querying the right port and that the server has finished loading the model (the /health endpoint responds once it has). Next, check that you haven't passed the --disable-log-stats option: it turns off engine statistics collection, and depending on the version, the vllm: metrics may then disappear from /metrics.

#Step 2: Key vLLM metrics for Prometheus

All engine metrics have the vllm: prefix and a model_name label, which lets you tell apart multiple models served on the same Prometheus instance. Other labels may appear depending on the version and configuration. Prometheus allows colons in names; there's nothing unusual about them.

#Current state: queue and KV cache

vllm:num_requests_running (gauge)
Number of requests the engine is currently processing, that is, those in the batch being executed.
vllm:num_requests_waiting (gauge)
Number of requests received but not yet scheduled. This is the most direct indicator of saturation: a value that stays above zero means demand exceeds capacity.
vllm:kv_cache_usage_perc (gauge)
KV cache usage, expressed as a fraction between 0 and 1 despite the perc suffix (1 means 100%). It replaces the old, deprecated name vllm:gpu_cache_usage_perc.
vllm:cache_config_info (gauge)
Info metric: its labels reflect the cache configuration (block size, number of blocks, etc.). Useful for linking a graph to the effective configuration.

#Counters: tokens, completed requests, preemptions

The documentation refers to counters without a suffix; the Prometheus Python library appends _total when exposing them. Use the name with _total in PromQL.

vllm:prompt_tokens_total
Cumulative number of prompt tokens processed (prefill phase).
vllm:generation_tokens_total
Cumulative number of generated tokens. Its rate of change gives the generation throughput actually observed on your server.
vllm:request_success_total
Completed requests, with a finished_reason label (for example stop, length, or abort, depending on why the request ended).
vllm:num_preemptions_total
Cumulative number of preemptions: the engine had to remove a request from the batch due to lack of space in the KV cache, then recompute it later.
vllm:prefix_cache_queries_total and vllm:prefix_cache_hits_total
Tokens queried and tokens found in the prefix cache. Their ratio gives the reuse rate. They replace the old names vllm:gpu_prefix_cache_queries and vllm:gpu_prefix_cache_hits.

#Histograms: request latencies and sizes

Each histogram is exposed as three series: _bucket (count per bucket, with the le label), _sum, and _count. Percentiles are computed on the Prometheus side with histogram_quantile.

vllm:time_to_first_token_seconds
Time to first token (TTFT). This is the latency the user perceives at the start of a response.
vllm:inter_token_latency_seconds
Time between two generated tokens. Older versions exposed vllm:time_per_output_token_seconds: check which one exists on your setup.
vllm:e2e_request_latency_seconds
Total duration of a request, from receipt to completion.
vllm:request_queue_time_seconds
Time spent in the queue before scheduling.
vllm:request_prefill_time_seconds and vllm:request_decode_time_seconds
Time spent reading the prompt and generating output. Together with vllm:request_inference_time_seconds, they let you break down total latency.
vllm:request_prompt_tokens and vllm:request_generation_tokens
Distribution of prompt and response lengths per request. Useful for spotting a client that sends very long contexts.

The design documentation also mentions metrics removed with the V1 engine, such as those related to swapping to CPU memory (vllm:num_requests_swapped). Deprecated metrics are hidden by default; the --show-hidden-metrics-for-version option lets you temporarily re-enable them while you migrate a dashboard. Don't build anything long-term on them.

#Step 3: Configure Prometheus scraping

Prometheus works on a "pull" model: it periodically scrapes /metrics and stores the values. A target's default path is already /metrics, so you only need to declare the host and port of the vLLM server. Create a prometheus.yml file:

prometheus.yml
global:
  scrape_interval: 15s
  evaluation_interval: 15s

rule_files:
  - /etc/prometheus/alertes-vllm.yml

scrape_configs:
  - job_name: vllm
    static_configs:
      - targets: ['127.0.0.1:8000']
        labels:
          instance_role: 'llm-prod'

If you serve several models on multiple ports or machines, add one target per instance in the same targets list. The model_name label set by vLLM is enough to tell them apart in queries; the instance_role label is an example of a custom label that you can remove.

  1. 01
    Create the rules file
    Create alertes-vllm.yml next to prometheus.yml (contents in step 5). Prometheus refuses to start if a file listed in rule_files is invalid, which is why you should validate it first.
  2. 02
    Validate the configuration
    Use promtool, which ships with Prometheus, to check the syntax of the configuration and rules before starting the service.
  3. 03
    Start Prometheus
    With Docker on Linux, host network mode lets Prometheus reach vLLM at 127.0.0.1. On another OS or with separate containers, replace the target with the container name or the machine's address.
  4. 04
    Check the target
    Open http://localhost:9090/targets: the vllm target should be UP. If it isn't, the error message shown (connection refused, timeout exceeded) tells you where to look.
Terminal — validate, then start Prometheus
docker run --rm --entrypoint promtool \
  -v "$PWD/prometheus.yml:/etc/prometheus/prometheus.yml:ro" \
  -v "$PWD/alertes-vllm.yml:/etc/prometheus/alertes-vllm.yml:ro" \
  prom/prometheus check config /etc/prometheus/prometheus.yml

docker run -d --name prometheus --network host \
  -v "$PWD/prometheus.yml:/etc/prometheus/prometheus.yml:ro" \
  -v "$PWD/alertes-vllm.yml:/etc/prometheus/alertes-vllm.yml:ro" \
  prom/prometheus

# Vérifier que la cible répond (1 = joignable)
curl -sG --data-urlencode 'query=up{job="vllm"}' http://127.0.0.1:9090/api/v1/query

Without a data volume, the history is lost when the container is removed. For long-term use, mount a volume on /prometheus and set the retention period based on available disk space.

#Step 4: Useful PromQL queries

You can paste the queries below into the Prometheus Graph tab or a Grafana panel. Always use counters with rate() or increase(): their raw value is meaningless because it resets to zero every time the server restarts. The [5m] window is a starting point; it should cover at least four scrape intervals.

PromQL — load and saturation
# Requêtes en attente et en cours, par modèle
sum by (model_name) (vllm:num_requests_waiting)
sum by (model_name) (vllm:num_requests_running)

# Occupation du cache KV (0 à 1)
max by (model_name) (vllm:kv_cache_usage_perc)

# Préemptions par seconde
sum by (model_name) (rate(vllm:num_preemptions_total[5m]))
PromQL — observed token throughput
# Tokens générés par seconde (débit réel de votre serveur)
sum by (model_name) (rate(vllm:generation_tokens_total[5m]))

# Tokens de prompt lus par seconde
sum by (model_name) (rate(vllm:prompt_tokens_total[5m]))

# Taux de réutilisation du cache de préfixes
sum by (model_name) (rate(vllm:prefix_cache_hits_total[5m]))
  / sum by (model_name) (rate(vllm:prefix_cache_queries_total[5m]))
PromQL — latencies (95th percentile)
# Délai avant le premier token, p95
histogram_quantile(0.95,
  sum by (le, model_name) (rate(vllm:time_to_first_token_seconds_bucket[5m])))

# Délai entre tokens, p95
histogram_quantile(0.95,
  sum by (le, model_name) (rate(vllm:inter_token_latency_seconds_bucket[5m])))

# Temps passé en file d'attente, p95
histogram_quantile(0.95,
  sum by (le, model_name) (rate(vllm:request_queue_time_seconds_bucket[5m])))

# Latence moyenne de bout en bout
sum by (model_name) (rate(vllm:e2e_request_latency_seconds_sum[5m]))
  / sum by (model_name) (rate(vllm:e2e_request_latency_seconds_count[5m]))
PromQL — request completions
# Requêtes terminées par cause de fin
sum by (model_name, finished_reason) (rate(vllm:request_success_total[15m]))

A percentile computed by histogram_quantile is an estimate: its accuracy depends on the buckets defined by vLLM. For a latency that falls between two widely spaced buckets, the displayed value is interpolated. When few requests come through during the window, p95 becomes unstable; in that case, also look at the average and the request count.

→
Building your own baseline
Before setting an alert threshold, let Prometheus collect data during a period of typical load and note the observed values: p95 time to first token, generation throughput, KV cache usage. These numbers, dated and tied to your vLLM version, your model, its quantization, and your GPU, are the only reliable baseline for judging degradation.

#Step 5: Write alerting rules

The following rules cover the four most telling failures: unreachable server, persistent queue, saturated KV cache, and repeated preemptions. The thresholds (0.9, 0, 5 minutes) are illustrative starting points, not measured recommendations: adjust them to the baseline you built in the previous step.

alertes-vllm.yml
groups:
  - name: vllm
    rules:
      - alert: VllmCibleInjoignable
        expr: up{job="vllm"} == 0
        for: 2m
        labels:
          severity: critical
        annotations:
          summary: "vLLM ne répond plus sur /metrics ({{ $labels.instance }})"

      - alert: VllmFileAttentePersistante
        expr: sum by (model_name) (vllm:num_requests_waiting) > 0
        for: 5m
        labels:
          severity: warning
        annotations:
          summary: "Requêtes en attente depuis 5 min ({{ $labels.model_name }})"

      - alert: VllmCacheKVSature
        expr: max by (model_name) (vllm:kv_cache_usage_perc) > 0.9
        for: 10m
        labels:
          severity: warning
        annotations:
          summary: "Cache KV au-delà de 90 % ({{ $labels.model_name }})"

      - alert: VllmPreemptions
        expr: sum by (model_name) (rate(vllm:num_preemptions_total[5m])) > 0
        for: 10m
        labels:
          severity: warning
        annotations:
          summary: "Préemptions répétées ({{ $labels.model_name }})"

Prometheus evaluates these rules and shows active alerts in the Alerts tab. To receive notifications (email, messaging, webhook), you need to add Alertmanager, a separate component of the Prometheus project. Always validate the file with promtool check rules after making changes.

#Diagnosis: reading the symptoms

A single metric rarely reveals the cause. It's the combinations that guide the diagnosis. The leads below are hypotheses to confirm, not automatic rules: change one setting at a time and compare the graphs before and after.

Waiting rising, running stable, KV cache low
The number of concurrent requests hits a ceiling before memory does. Check the value of --max-num-seqs: if running stays pinned at it, that setting is the limit. Raising it uses more KV cache; a second instance is the other option.
KV cache near 1 and rising preemptions
Context memory is running short. Possible levers: reduce --max-model-len if your use cases don't need the maximum context, adjust --gpu-memory-utilization, quantize the cache with --kv-cache-dtype fp8 if your GPU and model support it, or switch to a quantized version of the model to free up VRAM.
Slow first token, normal inter-token latency
Compare queue time and prefill time. If queue time dominates, it's a capacity problem. If prefill dominates, it's long prompts: check the distribution of vllm:request_prompt_tokens and the --max-num-batched-tokens setting.
Inter-token latency that increases with load
Expected behavior as the batch grows: each generation step processes more requests. Compare it with num_requests_running to find the concurrency level at which the experience becomes unacceptable for your users.
Many finished_reason length
Responses are being cut off by the client-side max_tokens or by the model's maximum length. This isn't a performance problem; it's an application setting you need to revisit.
Very low prefix cache hit rate
The prompts don't share a common beginning, or the system prompt changes on every call (a date or ID inserted at the top). Putting the fixed parts first improves reuse when prefix caching is enabled.
Target DOWN even though the API responds
Prometheus is probably scraping a different address: a container not running in host mode, a firewall, or a server started on a different port. Test /metrics with curl from the machine where Prometheus is running.

For the hardware side (VRAM saturation, thermal throttling, power), vLLM metrics aren't enough. Correlate them with a GPU exporter in the same Prometheus: a throughput drop that coincides with a temperature rise points to cooling, not vLLM.

#Limitations and security

Names unstable across versions
The vLLM documentation records renames (gpu_cache_usage_perc to kv_cache_usage_perc, time_per_output_token to inter_token_latency) and removals. Keep the list exposed by your version and review it with every update.
No quality measurement
These metrics describe speed and load, never the accuracy of responses. A fast server can still be serving a poorly suited model.
No universal throughput
Observed throughput depends on the model, its quantization, the GPU, prompt length, and concurrency. This guide publishes no reference numbers; only compare your own measurements against each other, with an identical configuration.
Sampling
With a 15-second scrape interval, a very brief spike on a gauge can go unnoticed. Counters and histograms, on the other hand, don't lose events between scrapes.
!
Don't expose /metrics to the internet
vLLM's --api-key option protects the /v1 API routes; depending on the version, /metrics may remain readable without a key. Check this with curl without an authorization header. The metrics don't contain prompt text, but they do reveal the served model, the cache configuration, and the activity level. Keep port 8000 on a private network, filter /metrics at the reverse proxy if the API is public, and open Prometheus's port 9090 only to admin workstations.

#Go further

For a ready-to-adapt dashboard, the vLLM GitHub repository includes a Prometheus and Grafana example among its online serving examples. Before importing it, verify that the metric names it uses match those in your version.

Deploy vLLM in production
Installation, launch options, and deployment of the server monitored here: /guide/deployer-vllm-production
vLLM: what is it, and who is it for?
How the engine, PagedAttention, and the KV cache work, explained: /guide/vllm-c-est-quoi-guide-complet
Quantize the KV cache
Reduce context memory when the cache is saturated: /guide/kv-cache-quantification-vram

Primary sources: vLLM metrics design documentation, latest branch, accessed 30/10/2026 (https://docs.vllm.ai/en/latest/design/metrics/); Prometheus documentation on configuration and PromQL functions (https://prometheus.io/docs/). This guide makes no claims about tests, throughput, or screenshots.

Did this guide help you?

Feedback, an error, or a clarification? Let us know—it improves the guide for everyone.