Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

Improved Right Sizing experience in Red Hat Advanced Cluster Management for Kubernetes (RHACM)

July 16, 2024
Vanessa Martini Christian Stark
Related topics:
Hybrid CloudKubernetes
Related products:
Red Hat Advanced Cluster Management for Kubernetes

Share:

    Imagine having a feature that gives you—as a Red Hat Advanced Cluster Management for Kubernetes (RHACM) Cluster Admin—the option to gather feedback on how efficiently developers use namespaces across all your clusters. This information would empower you to adjust resource controls settings and even enforce best practices if needed. In the long term, this would contribute to large cost savings in your organization. That is where RHACM Right Sizing capabilities becomes an asset and helps you achieve this scenario. 

    RHACM Right Sizing complements other Red Hat features in Insights Advisor and Insights Cost Management that recommend your developers to follow best practices when deploying their workloads in the most efficient way. This way, you will be able to monitor whether the best practices set by your company are followed by the tenants of your clusters.

    RHACM Right Sizing vs. Vertical Pod Autoscaler

    The Vertical Pod Autoscaler (VPA) can already shed some light on right sizing questions, as it is a tool designed to adjust the resource requests and limits for pods based on their actual usage. Nonetheless, given its pod focus, VPA mainly focuses on developers’ needs and questions. It may help with:

    1. Dynamic resource allocation: VPA continuously monitors the resource utilization of pods running in a Kubernetes cluster. It collects metrics such as CPU and memory usage.
    2. Auto-adjustment of resource requests and limits: Based on the collected metrics, VPA adjusts the resource requests and limits of pods dynamically. Resource requests specify the amount of CPU and memory that a pod needs to run, while limits specify the maximum amount of resources that a pod can consume.
    3. Optimizing resource allocation: By adjusting the resource requests and limits, VPA ensures that each pod receives the resources it needs to perform efficiently without overprovisioning or underprovisioning. Overprovisioning leads to resource wastage, while underprovisioning can result in performance issues or even pod failures.
    4. Improved cluster efficiency: With VPA, Kubernetes clusters can achieve better resource utilization, leading to cost savings and improved overall efficiency. It helps in rightsizing the pods by aligning their resource requirements with their actual usage patterns.
    5. Automation: VPA automates the process of rightsizing pods, eliminating the need for manual intervention. This ensures that pods are always provisioned with the appropriate amount of resources, even as workload patterns change over time.

    Although VPA offers significant benefits, it also presents a few shortcomings for platform engineering-focused optimizations scenarios, such as its pod-focus and its complex configuration. In order to fill those gaps, our team has worked extensively to enhance the current developer preview experience of RHACM right sizing functionalities. 

    Enhanced Developer Preview: Everything you need to know

    RHACM Observability already provides dashboards that are a great starting point for deep diving into capacity management. They provide predefined and optimized PromQL queries to analyze the existing fleet, with the option to drill down at the container level (see figures below). Those dashboards provide a comparison of actual utilization over the allocation. Nonetheless, they use point-in-time utilization values which do not allow us to identify those underutilized areas as utilization varies over time. Therefore, using values that take into account longer usage trends results to be a game changer.

    With this context in mind, last year, the thanos-metric-analyzer tool was made available as a developer preview feature. This solution represents the initial efforts for providing right sizing capabilities to RHACM customers. The tool is able to connect to Thanos endpoints and compute the recommended CPU and memory settings, based on historical usage and resource request. The output of the tool is a CSV file with max usage values and recommendations for CPU and memory utilization. However, as part of the RHACM Right Sizing developer preview, no charts were made available to customers in the RHACM console. Figures 1 and 2 showcase the dashboards in the RHACM console.

    Current dashboards in RHACM Console.
    Current dashboards in RHACM Console.
    Figure 1: Current Resource Optimization Grafana dashboard in RHACM console.
    A view of the current dashboard in RHACM console which displays a graph depicting CPU usage and another depicting CPU throttling..
    Current dashboards in RHACM Console.
    Figure 2: Current Compute Resources Grafana dashboard in RHACM console.

    Start by selecting the cluster you would like to explore and the relevant aggregation period from the dropdown menus that you find at the top left of the Grafana dashboard. The graph on the right side presents the real time CPU/Memory usage across all namespaces. The graph allows you to select a specific namespace, if needed, and easily detect spikes in CPU/Memory usage. Moreover,  thanks to three panels on the left side, you can observe CPU/Memory recommendation and request actual values, as well as utilization in percentage points for your selected cluster and aggregation period. Lastly, the third section of the Grafana dashboards allows you to deep dive into CPU/Memory namespace-level recommendations (CPU/Memory Quota tables in Figures 3 and 4 below).

    New Right Sizing capabilities in Grafana - RHACM Console > CPU.
    New Right Sizing capabilities in Grafana - RHACM Console > CPU.
    Figure 3: Right Sizing Grafana dashboard in RHACM Console.
    New Right Sizing capabilities in Grafana - RHACM Console > Memory.
    New Right Sizing capabilities in Grafana - RHACM Console > Memory.
    Figure 4: Right Sizing Grafana dashboard in RHACM Console.

    The RHACM Right Sizing recommendations presented above are calculated with the following approach (see Figure 5). Specifically:

    • Prometheus Recording Rule—PrometheusRule—is the engine behind CPU/memory Right Sizing recommendations. The rule can only be used for <=1d aggregation, due to low data retention (15 days). Note that this rule evaluation runs on each RHACM managed cluster. 
    • Records for one day are then forwarded  into each RHACM Hub using observability-metrics-custom-allowlist. 
    • The relevant data is then calculated in Grafana. 
    An architecture diagram of RHACM Right Sizing.
    RHACM Right Sizing: Architecture Diagram
    Figure 5: RHACM Right Sizing: Architecture design.

    Disclaimers

    The current enhanced developer preview of RHACM Right Sizing is characterized by the following:

    • Prometheus rules are based on Cluster Name, NOT Cluster ID.
    • CPU/Memory request, utilization and recommendation are showing max/peak values over the (last) selected number of aggregated days.
    • Performance issues may occur while loading the Grafana dashboard.
    • Historical data points are not backfilled. This means that after installing the RHACM Right Sizing component, the user/admin needs to wait some time to be able to investigate longer aggregation periods.
    • Tested with RHACM 2.10 version.

    Installation guide

    To make use of RHACM Right Sizing functionalities, users need to apply the needed policies into the relevant hub clusters (see Figure 6). Note that when applying the prometheus-rules policy, a Prometheus recording rule is created for each managed cluster. Similarly, when applying the allowlist policy, a relevant ConfigMap will be created for each managed cluster. A detailed overview of the required installation steps (including prerequisites and YAML content) is provided here.

    A view of the Governance tab within the Red Hat OpenShift dashboard displaying the policies necessary for utilizing RHACM Right Sizing capabilities.
    Needed policies.
    Figure 6: Needed policies for utilizing RHACM Right Sizing capabilities.

    In addition to this, by applying the acm_right_sizing_grafana_dashboard YAML file (see detailed documentation), as shown in Figures 7 and 8, users will be able to access the relevant Grafana dashboards as part of the RHACM console. 

    Apply the acm_right_sizing_grafana_dashboard YAML file.
    Apply the acm_right_sizing_grafana_dashboard YAML file.
    Figure 7: RHACM Right Sizing Grafana dashboard > YAML file.

    Now you are set and ready to start exploring right sizing recommendations, as shown in the section above. 

    A view of the dedicated Grafana dashboard.
    Explore the dedicated Grafana dashboard.
    Figure 8: The dedicated Grafana dashboard.

    What's next?

    RHACM Right Sizing is a great addition to RHACM’s optimizations solutions, targeting platform engineering teams. These namespace-level recommendations enable our customers to easily identify their biggest resource offenders, contributing to a more effective resource control.  

    Currently, we are working on providing a Technology Preview of RHACM Right Sizing. We value your feedback, which is crucial for enhancing our products. Share your questions and recommendations with us using the Red Hat OpenShift feedback form. 

    OSZAR »

    Related Posts

    • Installing Red Hat Advanced Cluster Management (ACM) for Kubernetes

    • Deploy an Operator via GitOps using Advanced Cluster Management

    • Skupper.io: Let your services communicate across Kubernetes clusters

    • How to connect Kubernetes clusters with Service Interconnect

    Recent Posts

    • LLM Compressor: Optimize LLMs for low-latency deployments

    • How to set up NVIDIA NIM on Red Hat OpenShift AI

    • Leveraging Ansible Event-Driven Automation for Automatic CPU Scaling in OpenShift Virtualization

    • Python packaging for RHEL 9 & 10 using pyproject RPM macros

    • Kafka Monthly Digest: April 2025

    What’s up next?

    GitOps has become a standard in deploying applications to Kubernetes, and many companies are adopting the methodology for their DevOps and cloud-native strategy. Download the GitOps Cookbook for useful recipes and examples for successful hands-on applications development and deployment with GitOps.

    Get the e-book
    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue

    OSZAR »