From eaffea964d13ae3283fd1ea8c15c0eb208c8cf5a Mon Sep 17 00:00:00 2001 From: vathakur Date: Mon, 14 Jul 2025 17:26:48 +0530 Subject: [PATCH] Added documentation for kubevirt_vmi_vcpu_delay_seconds_total --- modules/virt-querying-metrics.adoc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/virt-querying-metrics.adoc b/modules/virt-querying-metrics.adoc index 718e60c12557..5b7c9852f167 100644 --- a/modules/virt-querying-metrics.adoc +++ b/modules/virt-querying-metrics.adoc @@ -31,6 +31,15 @@ A value above '0' means that the vCPU wants to run, but the host scheduler canno ==== To query the vCPU metric, the `schedstats=enable` kernel argument must first be applied to the `MachineConfig` object. This kernel argument enables scheduler statistics used for debugging and performance tuning and adds a minor additional load to the scheduler. ==== +The `kubevirt_vmi_vcpu_delay_seconds_total` metric reports the cumulative time that a vCPU was enqueued by the host scheduler but could not run immediately. This delay is exposed to the virtual machine (VM) as steal time and can affect performance, often indicating CPU overcommitment or contention on the host. + +.Example vCPU delay query +[source,PromQL] +---- +irate(kubevirt_vmi_vcpu_delay_seconds_total[5m]) > 0.05 +---- + +This query returns the average per-second delay over a 5-minute period. A high value may indicate CPU overcommitment or contention on the node. .Example vCPU wait time query [source,promql]