Skip to main content
AI
  • Get started with AI

    • Red Hat AI

      Accelerate the development and deployment of enterprise AI solutions.

    • AI learning hub

      Explore learning materials and tools, organized by task.

    • AI interactive demos

      Click through scenarios with Red Hat AI, including training LLMs and more.

    • AI/ML learning paths

      Expand your Red Hat OpenShift AI knowledge using these learning resources.

    • AI quickstarts

      Focused AI use cases designed for fast deployment on Red Hat AI platforms.

    • No-cost AI training

      Foundational Red Hat AI training.

  • Featured resources

    • Red Hat OpenShift AI
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

Red Hat AI Factory with NVIDIA

Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.

Learn
  • Self-guided

    • Documentation

      Find answers, get step-by-step guidance, and learn how to use Red Hat products.

    • Learning paths

      Explore curated walkthroughs for common development tasks.

    • Guided learning

      Receive custom learning paths powered by our AI assistant.

    • See all learning
  • Hands-on

    • Developer Sandbox

      Spin up Red Hat's products and technologies without setup or configuration.

    • Interactive labs

      Learn by doing in these hands-on, browser-based experiences.

    • Interactive demos

      Click through product features in these guided tours.

  • Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics
  • Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
Build
  • Get started

    • Red Hat build of Podman Desktop

      A downloadable, local development hub to experiment with our products and builds.

    • Developer Sandbox

      Spin up Red Hat's products and technologies without setup or configuration.

  • Download products

    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products
  • Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset
  • References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
Community
  • Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions
  • Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github
  • Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

Join the Red Hat Developer program

Download Red Hat products and project builds, access support documentation, learning content, and more.

ConsoleDocsSupport Search
New For you

Recommended

We'll recommend resources you may like as you browse. Try these suggestions for now.

  • Product downloads
  • Cheat sheets
  • Red Hat Developer learning portal
  • Developer blog
  • E-books
  • Developer Sandbox
Log in

Get more with a Red Hat Developer account

  • Product downloads
  • Console access
  • Event registration
  • Training & trials
Explore more account benefitsLog in or register

A subscription may be required for some services.

Contact us

How Kruize optimizes OpenShift workloads

June 25, 2025
Dinakar Guniguntala
Related topics:
Application modernizationContainersDisconnected environmentsKubernetes
Related products:
Microsoft Azure Red Hat OpenShift (standard architecture)Red Hat OpenShiftRed Hat OpenShift Container PlatformRed Hat OpenShift on IBM CloudRed Hat OpenShift Service on AWS

    Last year, Red Hat announced the availability of resource optimization for Red Hat OpenShift. This article goes deeper into discussing the benefits of Kruize Autotune, the engine that provides container right-sizing recommendations for resource optimization.

    What is Kruize Autotune?

    Kruize provides container right-sizing recommendations in Kubernetes in the form of CPU and memory requests and limits. The request and limit values for both CPU and memory are set to be the same. The recommendations are based on monitoring a data source such as Prometheus where the data source can be local or remote. The recommendations are based on resource usage in the past 24 hours (short term), 7 days (medium term), and 15 days (long term) and provide cost and performance-optimized suggestions for each term on a per-container basis.

    Kruize also provides capacity and utilization data used to represent resource request versus actual resource utilization data (e.g., as a box plot) to better understand the recommendations.

    Performance-optimized recommendations currently use the 98th percentile for CPU usage for the given term. The usage includes any throttling that may have happened in the term.

    Memory recommendations use the max value in the observed term with an added buffer. The buffer represents the minimum of 20% over the max value and the maximum interval spike in the observed term.

    memRecommendation = termMemMaxInterval + min(0.2 * termMemMaxInterval, termSpikeMaxInterval);

    Here, Interval refers to the minimum observable duration of the gathered metrics. The default interval has currently been set to 15 minutes.

    Cost-optimized recommendations uses the 60th percentile for CPU usage for the given term (including throttling), and the memory recommendation is the same as that of performance-optimized recommendations.

    Note that the algorithms used to arrive at these recommendations are subject to change.

    Production cluster example

    Let's look at an example to explain the CPU and memory recommendations. In this example, the container swatch-tally-service on a production cluster has resource utilization over a 15-day term (Figure 1).

    Fig 1: Box plot for container resource utilization over a 15 day term
    Figure 1: A box plot for container resource utilization over a 15-day term.

    In Figure 2, the container currently has a CPU request and limit of 2 cores, a memory request of 2 GiB, and a limit of 4 GiB.

    Based on the past 15 days of actual usage, we see the cost-optimized recommendation from Kruize is 0.15 cores for CPU, which is 93% less than what has been set currently, and 957 MiB for memory, which is 53% less.

    Figure 2: Cost-optimized recommendation based on the last 15 days of resource utilization
    Figure 2: A cost-optimized recommendation based on the last 15 days of resource utilization.

    If the same container needs to be optimized for performance, Figure 3 shows that Kruize recommends CPU request and limit of 1.18 cores, which is still 41% less than what is set currently. Memory remains 53% less than what has been set currently.

    Fig 3: Performance Optimized Recommendation based on last 15 days of resource utilization
    Figure 3: Performance-optimized recommendation based on the last 15 days of resource utilization.

    Staging cluster example

    In this example, the container swatch-tally-service now runs on a staging (non-production) cluster. Figure 4 shows the resource utilization over the last 24 hours.

    Fig 4: Box plot for a container which has been idling
    Figure 4: Box plot for container resource utilization over the last 24 hrs.

    We see that the container currently has a CPU request and limit of 2 cores, memory request of 1 GiB, and a limit of 4 GiB.

    Based on the past 24 hours of actual usage, we see the cost-optimized recommendation from Kruize to be 0.1 core for CPU, which is 95% less than what has been set currently, and 4.5 GiB for memory, which is 12% more. The memory recommendation is higher than what has been currently set for two reasons. 

    First, the max is very close to what has been set. Second, there may be observed spikes, which may push the usage beyond what was set as the limit. Since memory is not a compressible resource, the recommendation is higher to help offset any OOM scenarios (Figure 5).

    Figure 5: Performance Optimized Recommendation based on last 24 hrs resource utilization
    Figure 5: Cost-optimized recommendation based on the last 24 hours resource utilization.

    On the other hand, the performance-optimized recommendation for the same term is 3.32 cores, which is an increase of 66% compared to the current set term. The memory recommendation is 4.5 GiB, which is an increase of 12%, as shown in Figure 6.

    Fig 6: Performance Optimized Recommendation based on last 24 hrs resource utilization
    Figure 6: Performance-optimized recommendation based on the last 24 hrs resource utilization.

    Warnings in the recommendations

    In certain conditions, recommendations display warnings against them. This section discusses them in more detail.

    • Warnings about idle containers:

      Containers can idle (< 1 millicore of CPU usage) in the observed term. In Figure 7, we see a container that has been idle for the last 24 hours.

    Fig 7: Box plot for a container which has been idling
    Figure 7: A box plot for a container which has been idling.

    In this scenario, Kruize will be unable to generate a recommendation for CPU for the respective term. Figure 8 shows a recommendation for the CPU idling case, which has an empty CPU recommendation with a warning icon.

    Fig 8: Performance Optimized Recommendation based on last 24 hrs resource utilization
    Figure 8: No CPU recommendation can be generated since the container was idling in the observed period.
    • Containers that do not have either a request or limit set in their current configuration:

      Figure 9 shows a case where the CPU limit was not set in the current configuration, which results in a warning icon.

    Fig 9: CPU Limit not set in the current configuration
    Figure 9: CPU Limit not set in the current configuration.

    Similarly, Figure 10 shows a case where both CPU and memory requests and limits have not been set.

    Fig 10: CPU and Memory requests and limits not set in the current configuration
    Figure 10: CPU and Memory requests and limits not set in the current configuration.

    Important takeaways

    For critical production workloads, we recommend setting the performance-optimized configuration recommendation based on the previous 15-day term. To prevent or reduce disruption to production workloads, it would be better to have fewer updates to the container configuration and only do updates if the recommended configuration is significantly different from the current one.

    For non-production workloads, it would be wise to optimize for cost and update the configuration more frequently. In this case, you can get the maximum benefit if the configuration is set to the cost-optimized recommendation based on resource usage of the past 24 hours.

    In general, when we optimize an entire cluster in this fashion, we see a more than 40% reduction in overall resource usage and the associated cost benefits thanks to Kruize. We are working on new and exciting recommendations, including AI workloads, so stay tuned.

    Last updated: November 5, 2025

    Related Posts

    • Announcing resource optimization for Red Hat OpenShift GA

    • Extend Red Hat Lightspeed client to execute custom automation

    • How to use content templates in Red Hat Lightspeed

    • Detect network issues in Open vSwitch using Red Hat Lightspeed

    Recent Posts

    • A day in the life of an NVIDIA H100 on Red Hat OpenShift 5

    • Migrate BuildConfigs to builds for Red Hat OpenShift with one plug-in install

    • Run Red Hat Enterprise Linux CoreOS on NVIDIA BlueField DPUs

    • Agent harness engineering: Separating model capabilities from enforcement

    • What's new for developers in Red Hat Enterprise Linux 10.3 and 9.9

    What’s up next?

    This cheat sheet outlines the steps to set up and calculate costs with the Red Hat Lightspeed cost management service.

    Get the cheat sheet
    Red Hat Developers logo

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    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
    © 2026 Red Hat

    Red Hat legal and privacy links

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