Skip to main content
Redhat Developers  Logo
  • 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 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

    • OpenShift AI learning
    • 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.
    • Explore the solution
  • 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

    • Access product downloads to start building and testing right away.
    • 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.
    • Explore the benefits

Eat up fewer resources in Cryostat 2.1 with sidecar reports

May 25, 2022
Hareet Dhillon
Related topics:
ContainersJavaKubernetes
Related products:
Red Hat OpenShift LocalRed Hat OpenShift Container Platform

    Cryostat is a tool for managing JDK Flight Recorder data on Kubernetes. Version 2.1 of Cryostat introduces the option of using a sidecar reports container to generate automated analysis reports for JDK flight recordings. Previously, the main Cryostat container handled the report generation. Report generation is a resource-intensive operation, and as a result, users may find themselves overprovisioning the Cryostat container to meet peak resource demands. Those resources may in turn end up unused if you're not generating reports.

    With this new option to delegate report generation to a sidecar container, users will find it easier to provision resources more efficiently. When report generation is not a concern, the main Cryostat container, including its web server and various lightweight operations over HTTP and JMX, has only a small resource footprint. Based on their report generation workflow, users can provision resources to the sidecar reports container accordingly and spin up any number of replicas of that container.

    This article explores the process of setting up sidecar report container replicas for automated analysis report generation using Cryostat on Red Hat OpenShift.

    Prerequisites for using a sidecar container

    To get started, use a running OpenShift or Kubernetes cluster with the Cryostat Operator installed. If you don’t already have access to an OpenShift or Kubernetes cluster, try Red Hat OpenShift Local. This article utilizes the OpenShift UI to interact with the Cryostat Operator.

    Then, deploy a containerized Java application with Java Management Extensions (JMX) enabled and exposed running in the same namespace as the Cryostat Operator. To learn more about how to fulfill this requirement by creating a sample Quarkus application, refer to the Red Hat Developer article Configuring Java applications to use Cryostat.

    Create the Cryostat resource with the sidecar reports container enabled

    Once the Cryostat Operator is installed, setting up the sidecar reports container is a straightforward process. Navigate to the Cryostat Operator under the Installed Operators tab on the OpenShift web console, then create an instance of the Cryostat resource (see Figure 1).

    The Cryostat Operator page under Installed Operators on the Openshift web console, with Create instance highlighted.
    Figure 1: Select Create instance to create the Cryostat resource.

    This will direct you to the Create Cryostat page, which provides various configuration options as shown in Figure 2.

    The Cryostat resource creation page titled Create Cryostat with various configuration options.
    Figure 2: The configuration options for the Cryostat resource.

    Scroll down to select Report Options followed by Resources (see Figure 3).

    The report generation configuration options for the Cryostat resource. Users can configure any number of replicas of the sidecar container, with resource limits and requests options for CPU cores, memory and storage. There's also an option to set the sub process maximum heap size for reports generated using the Cryostat instance itself instead of the sidecar container.
    Figure 3: Select your report generation configuration options.

    Next, select the number of replicas of the reports sidecar container to deploy and configure the Limits and Requests resources for each replica. The default number of replicas is 0, meaning the main Cryostat container handles the report generation through a sub-process. The default maximum heap size of this sub-process is 200MiB, but the user can adjust the maximum limit as needed. The Sub Process Max Heap Size field will be ignored if you request at least one reports sidecar container replica.

    For this example, you should create the Cryostat instance using the report options configuration shown in Figure 4.

    A reports configuration with the number of Replicas set to 1, Limits set to 500m CPU cores, 5G of memory and 20G of storage, and Requests set to 250m CPU cores, 2G of memory and 10G of storage.
    Figure 4: Configure the Replicas, Limits, and Requests fields as shown here, then scroll down and select Create.

    To generate the automated analysis report, navigate to the Cryostat web client. From the Cryostat Operator page under Installed Operators, select the Cryostat tab and then select the cryostat-sample resource. On the resulting page, you can find the URL for the web client (Figure 5).

    Installed Operators -> Cryostat Operator -> Cryostat -> cryostat-sample -> Application URL highlighted.
    Figure 5: Follow the Application URL to access the Cryostat web client.

    A prompt will request your cluster credentials to authenticate with the web client. After logging in, select a target application (whether it’s of your own making or the sample Quarkus application we linked to above) and navigate to the Recordings tab (Figure 6). Create a fixed duration custom flight recording. Once it is finished, request an automated analysis report of the recording. For a more detailed walk-through of these steps, refer to the Guides on using Cryostat.

    The Recordings view for the sample Quarkus application in the Cryostat web client, after a recording has been stopped and its automated analysis report generated.
    Figure 6: Requesting the automated analysis report will trigger the report generation in the sidecar container.

    To double-check that the sidecar report container handled the report generation, go back to the OpenShift console and navigate to Pods under the Workloads tab. This is where you can find the pod containing the sidecar report container (see Figure 7).

    OpenShift console -> Workloads -> Pods -> cryostat-sample-reports-{RANDOM_STRING} highlighted, where RANDOM_STRING is a randomly generated alphanumeric string that is appended to the cryostat-sample-reports Pod name.
    Figure 7: Select the cryostat-sample-reports pod. Your pod name will also be appended with a randomly generated alphanumeric string.

    Next, go to the Logs tab, shown in Figure 8, and pause the log stream. Then scroll through the repeated HTTP GET /health requests to locate the log messages confirming that the sidecar reports container received and fulfilled an HTTP request from the main Cryostat container.

    The sidecar report container logs showing the report generation HTTP request from the main Cryostat container.
    Figure 8: The sidecar report container receives and responds to a request from the main Cryostat container for the generated report.

    Conclusion

    Using a sidecar report container for automated analysis report generation allows users to efficiently provision resources for Cryostat. For more information about Cryostat, visit cryostat.io. For questions, comments, and feedback, feel free to connect with us on GitHub or join our mailing list.

    Find more Cryostat tutorials on Red Hat Developer:

    • Introduction to Cryostat: JDK Flight Recorder for containers
    • How to build automated JFR rules with Cryostat 2.1's new UI

    • Tutorial: Configuring Java applications to use Cryostat

    Last updated: November 6, 2023

    Recent Posts

    • Trusted software factory: Building trust in the agentic AI era

    • Build a zero trust AI pipeline with OpenShift and RHEL CVMs

    • Red Hat Hardened Images: Top 5 benefits for software developers

    • How EvalHub manages two-layer Kubernetes control planes

    • Tekton joins the CNCF as an incubating project

    What’s up next?

    The microservice architectural approach is more than just about technology: It reaches into the foundation of your organization to allow you to build truly scalable, adaptive, complex systems that help a business adapt to rapidly changing competitive markets. In Microservices for Java Developers, you'll get a hands-on introduction to frameworks and containers through a handful of familiar patterns.

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

    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

    Chat Support

    Please log in with your Red Hat account to access chat support.