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