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]