inference/research
verifiedhigh · 0.94updated 2026-10-04

LMDeploy GPU KV-cache usage gauge (1.0 = 100%)

niche-lmdeploy-turbomind · gauge

Fields

id
metric-exposures/w3m-niche-lmdeploy-turbomind-lmdeploy-gpu-cache-usage-perc
Metric name
lmdeploy:gpu_cache_usage_perc
Metric type
gauge
Unit
1
Exposure
prometheus
Endpoint
:23333/metrics
Labels
model_nameengine
Enabled by default
yes
notes
InternLM/lmdeploy main, PrometheusStatLogger in lmdeploy/metrics/loggers.py, read 2026-10-04. On by default and requires NO flag: the endpoint is simply available at the API server port (23333 by default). Label keys are model_name and engine on every metric, where engine carries the dp_rank. Bucket construction reuses vLLM's build_buckets / build_1_2_5_buckets idiom. The most dangerous metric in this set, because it means DIFFERENT THINGS ON THE TWO BACKENDS. On PyTorch it is 'logical GPU blocks referenced by live requests' - blocks shared by multiple requests counted once, blocks held only by the prefix cache or a stopped session EXCLUDED; set LMDEPLOY_ENABLE_REQUEST_CACHE_USAGE_METRIC=0 before start to report total logical occupancy instead. On Turbomind it is bytes held by live prefix-cache and checkpoint objects divided by the configured cache-region size. A threshold written for one backend is wrong on the other. Also note Turbomind reports scheduler metrics for DP 1 only.

Notes

InternLM/lmdeploy main, PrometheusStatLogger in lmdeploy/metrics/loggers.py, read 2026-10-04. On by default and requires NO flag: the endpoint is simply available at the API server port (23333 by default). Label keys are model_name and engine on every metric, where engine carries the dp_rank. Bucket construction reuses vLLM's build_buckets / build_1_2_5_buckets idiom. The most dangerous metric in this set, because it means DIFFERENT THINGS ON THE TWO BACKENDS. On PyTorch it is 'logical GPU blocks referenced by live requests' - blocks shared by multiple requests counted once, blocks held only by the prefix cache or a stopped session EXCLUDED; set LMDEPLOY_ENABLE_REQUEST_CACHE_USAGE_METRIC=0 before start to report total logical occupancy instead. On Turbomind it is bytes held by live prefix-cache and checkpoint objects divided by the configured cache-region size. A threshold written for one backend is wrong on the other. Also note Turbomind reports scheduler metrics for DP 1 only.

Cross-references