Red HatFabian DeutschExplainer
Red Hat OpenShift Virtualization memory management overview
Summary
The post overviews recent memory management evolutions in Red Hat OpenShift Virtualization, spanning from the Linux kernel to the orchestration planes. Historically, the platform uses a 1:1 memory request mapping, but data shows most VMs use only about 20% of allocated RAM, creating a delta that scales infrastructure with workload definitions rather than demand. Node-level optimizations include free page reporting (FPR), which asynchronously recovers pages freed by the guest OS without forcing allocation like ballooning, and KSM zero pages for guest-agnostic deduplication of zero-filled memory. At the cluster level, Multi-Gen LRU integrated with control groups enables swapping to fast secondary NVMe storage, and a PSI-aware descheduler proactively migrates VMs to relieve memory pressure across nodes. OpenShift Virtualization 4.22 provides an autopilot feature that automates configuration for generally available memory optimizations, while developer preview capabilities require manual opt-in activation by default.
Context
Traditional static 1:1 memory reservations in OpenShift Virtualization lead to inefficiency because VMs typically use only about 20% of allocated RAM, causing infrastructure to scale with workload definitions rather than actual demand. The platform needed to evolve memory management across the stack from the Linux kernel to the orchestration planes to increase workload density and reduce hardware footprint.
Approach / What changed
The approach integrates multiple memory optimization techniques across node and cluster levels. Node-level: free page reporting (FPR) for asynchronous guest-cooperative reclamation, KSM zero pages for guest-agnostic deduplication, and Multi-Gen LRU with fast NVMe storage for viable swapping. Cluster-level: a PSI-aware descheduler that monitors memory pressure and proactively live-migrates VMs to balance demand. The virtualization platform autopilot automates configuration for generally available features.
Takeaways
Free page reporting (FPR) asynchronously recovers pages the guest OS has freed, avoiding the performance degradation of traditional ballooning and allowing the hypervisor to return memory to the host pool.
KSM zero pages deduplicates only zero-filled pages across VMs, offering a faster and more secure guest-agnostic fallback compared to legacy KSM which scans all pages.
The PSI-aware descheduler monitors Pressure Stall Information per node and uses live migration to proactively move VMs from nodes under memory pressure, enabling safe overcommitment and higher workload density.
FAQ
How does free page reporting differ from memory ballooning?
FPR asynchronously observes and reclaims pages the guest has already freed, while ballooning actively inflates a device to force-allocate pages, which can cause latency spikes and guest swap usage.
What is the advantage of KSM zero pages over legacy KSM?
KSM zero pages only deduplicates pages filled with zeros, which is faster and less CPU-intensive than scanning all pages, and reduces security risks by not sharing arbitrary application data across VMs.
How does the PSI-aware descheduler increase VM density?
It monitors memory pressure metrics (PSI) and when pressure exceeds a threshold, it live-migrates VMs to less loaded nodes, allowing the cluster to safely overcommit memory and increase workload density.
Source and freshness
- Source
- developers.redhat.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.