Allocating the appropriate amount of CPU and memory to namespaces and virtual machines is essential to ensure efficient performance and cost optimization, especially with today’s growing number of clusters. Proper right-sizing prevents over-provisioning, waste of resources, an increased risk of financial burdens, under-provisioning, and severe performance issues.
In this article, we will focus on the developer preview release of the new right-sizing functionality and provide guidance for Red Hat OpenShift Virtualization users as part of Red Hat Advanced Cluster Management
Advanced Cluster Management features & benefits
The benefits of right-sizing:
- Optimized resource utilization: Preventing idle resource allocation with under-provisioning, thus maximizing infrastructure efficiency.
- Cost efficiency: Helping reduce costs by avoiding over-provisioning, lowering operational expenses by making the best use of available resources.
Right-sizing recommendations (powered by Prometheus recording rules) are available in two dedicated Grafana dashboards as part of the Red Hat Advanced Cluster Management console. They provide a great starting point for users willing to have more visibility on resources and concrete information to formulate effective action plans.
Right-sizing recommendations at the cluster and namespace levels: The enhanced developer preview is available as of July 2024. Here is a snapshot of this feature.
Right-sizing recommendations at the pod level (virtual machine name): The developer preview became available in March 2025. Take a look at an overview of this newly added feature.
By leveraging Prometheus recording rules, the following metrics are used to provide right-sizing recommendations for virtual machines over different time aggregations:
- CPU Usage:
kubevirt_vmi_cpu_usage_seconds_total
- Memory Usage:
kubevirt_vmi_memory_available_bytes - kubevirt_vmi_memory_usable_bytes
- CPU Request:
kubevirt_vm_resource_requests{resource="cpu"}
- Memory Request:
kubevirt_vm_resource_requests{resource="memory"}
- VM running status:
kubevirt_vm_running_status_last_transition_timestamp_seconds
There are key prerequisites for making use of the latest right-sizing recommendations. For more information on the installation steps and disclaimers, please refer to the documentation.
A developer preview of OpenShift Virtualization
The developer preview release of right-sizing recommendations for OpenShift Virtualization is provided in a dedicated Grafana dashboard in Red Hat Advanced Cluster Management that allows users to access a snapshot of the following:
- The current total CPU overestimation across virtual machines in a cluster;
- The current total CPU underestimation across virtual machines in a cluster;
- The current total memory overestimation across virtual machines in a cluster;
- The current total memory underestimation across virtual machines in a cluster;
These four additional tables give an overview of utilization by virtual machine: CPU overestimation, CPU underestimation, memory overestimation, and memory underestimation.
- Assess CPU/memory utilization for each virtual machine: The percentage of CPU/memory utilized is relative to the amount requested. Above 100% means that you are using more than you need. When it's below 100%, you are asking for more than you need.
- Investigate CPU/memory usage for each virtual machine: The amount of CPU/Memory actually used.
- Evaluate CPU/memory request for each virtual machine: The amount of CPU/Memory currently requested.
- Access CPU/memory recommendations for each virtual machine: The amount of CPU/Memory actually recommended - powered by Prometheus recording rules.
- Spot CPU/memory overestimation/underestimation for each virtual machine: The amount of overestimated CPU/memory (highlighted in red) or underestimated (highlighted in yellow).
The information can be filtered by cluster, namespace, and preferred time aggregation (e.g., 15/30 days).
Note:
By clicking on each virtual machine, you will be directed to a different dashboard, where you can benefit from two time series charts, depicting CPU and memory utilization over time.
What's next?
We are working on the productization of right-sizing recommendations for OpenShift Virtualization. While we are planning a technology preview release, we welcome your feedback. You can share your questions and recommendations with us using the Red Hat OpenShift feedback form.