|
| 1 | +# GuestVCPUQueueHighCritical |
| 2 | + |
| 3 | +## Meaning |
| 4 | +A VirtualMachineInstance (VMI) reported a |
| 5 | +**guest CPU run‑queue length greater than 20** runnable or |
| 6 | +uninterruptible threads within the last scrape window (120s), |
| 7 | +indicating severe CPU contention. |
| 8 | + |
| 9 | +## Impact |
| 10 | +* Sustained backlog; high latency and throughput degradation are likely. |
| 11 | +* Risk of timeouts, watchdog resets, or I/O amplification. |
| 12 | + |
| 13 | +## Diagnosis |
| 14 | +Follow the below steps with extra focus on: |
| 15 | +* **Duration** – How long is the queue > 20 |
| 16 | +* **Host saturation** – if node CPU is also > 90 %, migrate other VMs or mark the |
| 17 | + node as unschedulable so that no new Pods/VMs are placed thereon it. |
| 18 | + |
| 19 | +1. **Confirm queue length** |
| 20 | + ```promql |
| 21 | + kubevirt_vmi_guest_vcpu_queue{namespace="$NS",name="$VM"} |
| 22 | + ``` |
| 23 | +2. **Check host CPU usage** |
| 24 | + ```promql |
| 25 | + rate(kubevirt_vmi_cpu_usage_seconds_total{namespace="$NS",name="$VM"}[2m]) |
| 26 | + ``` |
| 27 | +3. **Inspect guest processes** |
| 28 | + `virtctl console <vm>` → `top -H` or `pidstat -u 1` |
| 29 | +4. **Verify vCPU allocation** |
| 30 | + ```bash |
| 31 | + oc get vmi $VM -ojsonpath='{.spec.domain.cpu}' |
| 32 | + ``` |
| 33 | + |
| 34 | +## Mitigation |
| 35 | +| Horizon | Action | |
| 36 | +|----------|------------------------------------------------------------------| |
| 37 | +| Immediate| **Prioritise**: live-migrate VM; hot-plug vCPUs; stop or throttle hot threads. | |
| 38 | +| Short term| Raise vCPU limit or split workload across additional VMs. | |
| 39 | +| Long term| Adjust placement rules; add autoscaling tied to run-queue length.| |
| 40 | + |
| 41 | + |
| 42 | +<!--USstart--> |
| 43 | +If you cannot resolve the issue, see the following resources: |
| 44 | + |
| 45 | +- [OKD Help](https://www.okd.io/help/) |
| 46 | +- [#virtualization Slack channel](https://kubernetes.slack.com/channels/virtualization) |
| 47 | +<!--USend--> |
| 48 | + |
| 49 | +<!--DS: If you cannot resolve the issue, log in to the |
| 50 | +[Customer Portal](https://access.redhat.com) and open a support case, |
| 51 | +attaching the artifacts gathered during the diagnosis procedure.--> |
0 commit comments