monitoring

KubeVirtVMGuestMemoryPressure

Meaning

The virtual machine (VM) guest operating system (OS) is under sustained memory pressure (low usable memory with elevated major page faults and/or swap I/O). This can cause thrashing, swapping, or OOM kills.

Impact

Diagnosis

1) Identify the VMI pod (vmi_pod label): promql kubevirt_vmi_info{vm="<vm-name>", namespace="<namespace>", phase="running"} 2) Headroom (usable/available) < 5% indicates pressure: promql sum by (name, namespace) ( kubevirt_vmi_memory_usable_bytes{ name="<vmi_pod>", namespace="<namespace>" } ) / sum by (name, namespace) ( kubevirt_vmi_memory_available_bytes{ name="<vmi_pod>", namespace="<namespace>" } ) 3) Major page faults are elevated: promql sum by (name, namespace) ( rate( kubevirt_vmi_memory_pgmajfault_total{ name="<vmi_pod>", namespace="<namespace>" }[5m] ) ) 4) Swap traffic is elevated (bytes/s): promql sum by (name, namespace) ( rate( kubevirt_vmi_memory_swap_in_traffic_bytes{ name="<vmi_pod>", namespace="<namespace>" }[5m] ) + rate( kubevirt_vmi_memory_swap_out_traffic_bytes{ name="<vmi_pod>", namespace="<namespace>" }[5m] ) )

Mitigation

If you cannot resolve the issue, see the following resources: