All versions · Version range: v0.7.0–v0.29.0
vllm:prefix_cache_hits
Counter for prefix cache hits, in cached tokens.
MetricPrometheusverified Sep 29
Version history
- The only version in scope here is
v0.23.0, wherevllm:prefix_cache_hitsis a Prometheus counter measured in cached (hit) tokens — counting tokens rather than requests or cache blocks — accumulating the queried tokens found in the first-party prefix cache. - In that same
v0.23.0release, the counter is registered under theV1PrometheusStatLoggerwith the label namesmodel_nameandengine. - As of
v0.23.0its runtime behavior is to increment fromSchedulerStats.prefix_cache_stats.hitson each scheduler-stats logging update, observing first-party prefix-cache token reuse while KV-connector reuse is reported by the separatevllm:external_prefix_cache_*counters. - The
v0.23.0metrics design docs frame the quantity of interest as the prefix cache hit rate (hits per query), exposing the counters raw so operators compute the rate over an interval of their choosing with PromQL (rate(hits)/rate(queries)), whereas vLLM's own logging equivalent aggregateshit_rateover the most recent queries. - Interpreting the
v0.23.0metric, it serves as the token numerator of a same-label, same-window prefix-cache hit ratio formed by dividing same-window hit and query rates, and no universal healthy percentage follows because reuse is workload-dependent.
Identity
- Prometheus type
- counter
- Labels
- model_nameengine
- Unit
- Not recorded — vLLM registration code has no structured unit field, and units are not inferred from name suffixes
Lifecycle
| vLLM version | State | Metric name |
|---|---|---|
| v0.29.0 | present | vllm:prefix_cache_hits |
| v0.28.0 | present | vllm:prefix_cache_hits |
| v0.27.1 | present | vllm:prefix_cache_hits |
| v0.27.0 | present | vllm:prefix_cache_hits |
| v0.26.0 | present | vllm:prefix_cache_hits |
| v0.25.1 | present | vllm:prefix_cache_hits |
| v0.25.0 | present | vllm:prefix_cache_hits |
| v0.24.0 | present | vllm:prefix_cache_hits |
| v0.23.0 | present | vllm:prefix_cache_hits |
| v0.22.1 | present | vllm:prefix_cache_hits |
| v0.22.0 | present | vllm:prefix_cache_hits |
| v0.21.0 | present | vllm:prefix_cache_hits |
| v0.20.2 | present | vllm:prefix_cache_hits |
| v0.20.1 | present | vllm:prefix_cache_hits |
| v0.20.0 | present | vllm:prefix_cache_hits |
| v0.19.1 | present | vllm:prefix_cache_hits |
| v0.19.0 | present | vllm:prefix_cache_hits |
| v0.18.1 | present | vllm:prefix_cache_hits |
| v0.18.0 | present | vllm:prefix_cache_hits |
| v0.17.1 | present | vllm:prefix_cache_hits |
| v0.17.0 | present | vllm:prefix_cache_hits |
| v0.16.0 | present | vllm:prefix_cache_hits |
| v0.15.1 | present | vllm:prefix_cache_hits |
| v0.15.0 | present | vllm:prefix_cache_hits |
| v0.14.1 | present | vllm:prefix_cache_hits |
| v0.14.0 | present | vllm:prefix_cache_hits |
| v0.13.0 | present | vllm:prefix_cache_hits |
| v0.12.0 | present | vllm:prefix_cache_hits |
| v0.11.2 | present | vllm:prefix_cache_hits |
| v0.11.1 | present | vllm:prefix_cache_hits |
| v0.11.0 | present | vllm:prefix_cache_hits |
| v0.10.2 | present | vllm:prefix_cache_hits |
| v0.10.1.1 | present | vllm:prefix_cache_hits |
| v0.10.1 | present | vllm:prefix_cache_hits |
| v0.10.0 | present | vllm:prefix_cache_hits |
| v0.9.2 | present | vllm:prefix_cache_hits |
| v0.9.1 | present | vllm:gpu_prefix_cache_hits |
| v0.9.0.1 | present | vllm:gpu_prefix_cache_hits |
| v0.9.0 | present | vllm:gpu_prefix_cache_hits |
| v0.8.5.post1 | present | vllm:gpu_prefix_cache_hits |
| v0.8.5 | present | vllm:gpu_prefix_cache_hits |
| v0.8.4 | present | vllm:gpu_prefix_cache_hits |
| v0.8.3 | present | vllm:gpu_prefix_cache_hits |
| v0.8.2 | present | vllm:gpu_prefix_cache_hits |
| v0.8.1 | present | vllm:gpu_prefix_cache_hits |
| v0.8.0 | present | vllm:gpu_prefix_cache_hits |
| v0.7.3 | present | vllm:gpu_prefix_cache_hits |
| v0.7.2 | absent | vllm:prefix_cache_hits |
| v0.7.1 | absent | vllm:prefix_cache_hits |
| v0.7.0 | absent | vllm:prefix_cache_hits |
Semantic coverage
covered · Availability & namecovered · Structural identitycovered · Measurement semanticscovered · Causal/runtime semanticscovered · Interpretation & compositioncovered · Guarded guidance
Metric knowledge (8)
Related Use Cases (3)
Availability
vllm:prefix_cache_hits is registered as a Prometheus counter in vLLM v0.23.0.vllm.surface.prometheus_metricscomplete_inventoryPrometheusStatLogger metrics publisher