This document describes the metrics collection feature, which captures system and application metrics during benchmark runs.
The metrics collection system automatically gathers performance and resource utilization metrics from deployed pods during benchmark execution. These metrics are integrated into the benchmark report and can be visualized as time series graphs.
The following metrics collection capabilities are fully implemented and operational:
- Pod-Level Prometheus Metrics - Collecting 117+ metrics from vLLM pods via
/metricsendpoint - Metrics Processing - Aggregating and calculating statistics (mean, stddev, min, max, percentiles)
- RBAC Setup - Automatic ServiceAccount creation with required permissions
- Metrics Storage - Raw and processed metrics saved to results directory
The following features from the original design are not yet implemented:
-
DCGM GPU Metrics - Direct GPU monitoring metrics (DCGM_FI_DEV_GPU_UTIL, DCGM_FI_DEV_POWER_USAGE, etc.)
- These metrics require DCGM exporter to be deployed in the cluster
- Currently relying on vLLM's built-in Prometheus metrics instead
-
Real-time Visualization - Live metric streaming during benchmark execution
- Currently generates static graphs after benchmark completion
-
Custom Metric Queries - User-defined Prometheus queries
- Currently collects predefined set of metrics
The metrics collection system gathers metrics from vLLM pod Prometheus endpoints.
Collected from each vLLM pod's /metrics endpoint (default port 8000):
vllm:kv_cache_usage_perc- KV cache utilization percentage (0-100)vllm:prefix_cache_hits_total- Total number of prefix cache hits (tokens)vllm:prefix_cache_queries_total- Total number of prefix cache queries (tokens)vllm:external_prefix_cache_hits_total- External cache hits from KV connector cross-instance sharingvllm:external_prefix_cache_queries_total- External cache queries from KV connectorvllm:mm_cache_hits_total- Multi-modal cache hits (items)vllm:mm_cache_queries_total- Multi-modal cache queries (items)- Prefix cache hit rate - Computed from
prefix_cache_hits_total / prefix_cache_queries_total - External prefix cache hit rate - Computed from
external_prefix_cache_hits_total / external_prefix_cache_queries_total
vllm:num_requests_running- Number of requests currently in execution batchesvllm:num_requests_waiting- Number of requests waiting to be processedvllm:prompt_tokens_total- Total number of prefill tokens processedvllm:generation_tokens_total- Total number of generation tokens producedvllm:iteration_tokens_total- Total tokens processed per iterationvllm:request_prompt_tokens- Prompt tokens per request (histogram)vllm:request_generation_tokens- Generation tokens per request (histogram)vllm:request_max_num_generation_tokens- Maximum generation tokens per requestvllm:request_success_total- Total number of successful requests
vllm:nixl_xfer_time_seconds- Transfer duration for NIXL KV cache transfers (histogram)vllm:nixl_bytes_transferred- Bytes transferred via NIXL (histogram)vllm:nixl_num_descriptors- Number of NIXL descriptors (histogram)vllm:nixl_num_failed_transfers_total- Failed NIXL transfersvllm:nixl_num_failed_notifications_total- Failed NIXL notificationsvllm:nixl_num_kv_expired_reqs_total- Expired KV transfer requestsvllm:nixl_post_time_seconds- NIXL post time (histogram)
vllm:num_preemptions_total- Cumulative number of request preemptionsvllm:engine_sleep_state- Engine sleep state (awake/weights_offloaded/discard_all)process_cpu_seconds_total- Total CPU time consumed by the processprocess_resident_memory_bytes- Resident memory size (RSS)process_virtual_memory_bytes- Virtual memory sizeprocess_open_fds- Number of open file descriptorsprocess_max_fds- Maximum number of file descriptors
python_gc_collections_total- Number of garbage collection cyclespython_gc_objects_collected_total- Objects collected during GCpython_gc_objects_uncollectable_total- Uncollectable objects found during GCpython_info- Python version information