Skip to content

Commit 0c5c8b9

Browse files
authored
Merge pull request #299 from sradco/add_runbooks_for_cpu_queue_alerts
Add runbooks for GuestVCPUQueueHigh alerts
2 parents ca6ea5d + 41325a3 commit 0c5c8b9

2 files changed

Lines changed: 98 additions & 0 deletions

File tree

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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.-->
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# GuestVCPUQueueHighWarning
2+
3+
## Meaning
4+
A VirtualMachineInstance (VMI) reported a
5+
**guest CPU run‑queue length greater than 10** runnable or
6+
uninterruptible threads within the most‑recent scrape window (120s).
7+
The run‑queue length is derived from `guest_load_1m – vCPU_count`.
8+
9+
## Impact
10+
* Moderate CPU contention inside the guest;
11+
latency may spike but workload still progresses.
12+
* Early signal that the VM might need additional vCPUs or
13+
that a short‑lived process is causing bursts.
14+
15+
## Diagnosis
16+
1. **Confirm queue length**
17+
```promql
18+
kubevirt_vmi_guest_vcpu_queue{namespace="$NS",name="$VM"}
19+
```
20+
2. **Check host CPU usage**
21+
```promql
22+
rate(kubevirt_vmi_cpu_usage_seconds_total{namespace="$NS",name="$VM"}[2m])
23+
```
24+
3. **Inspect guest processes**
25+
`virtctl console <vm>``top -H` or `pidstat -u 1`
26+
4. **Verify vCPU allocation**
27+
```bash
28+
oc get vmi $VM -ojsonpath='{.spec.domain.cpu}'
29+
```
30+
31+
## Mitigation
32+
| Horizon | Action |
33+
|---------|--------|
34+
| Immediate | Optionally live‑migrate the VM to a quieter node or throttle noisy processes. |
35+
| Short term | Hot‑plug / increase vCPUs; tune application thread pools. |
36+
| Long term | Implement horizontal scaling (HPA/KEDA, VMReplicaSet); review placement rules. |
37+
38+
<!--USstart-->
39+
If you cannot resolve the issue, see the following resources:
40+
41+
- [OKD Help](https://www.okd.io/help/)
42+
- [#virtualization Slack channel](https://kubernetes.slack.com/channels/virtualization)
43+
<!--USend-->
44+
45+
<!--DS: If you cannot resolve the issue, log in to the
46+
[Customer Portal](https://access.redhat.com) and open a support case,
47+
attaching the artifacts gathered during the diagnosis procedure.-->

0 commit comments

Comments
 (0)