Java containers

Optimize Java containers with granular visibility and tailored recommendations

Enabling JVM metrics collection

The Coroot agent is disabled by default. Once enabled, PerfectScale automatically detects Java containers and starts collecting JVM metrics.

Add the following parameter when deploying the PerfectScale agent to enable this feature:

--set settings.corootNodeAgent.enabled=true

Once the Coroot agent is installed, PerfectScale starts identifying Java containers running in your Kubernetes environment and collecting JVM metrics from them. By continuously analyzing them, PerfectScale provides granular visibility into resource usage, identifying potential bottlenecks. Based on this analysis, PerfectScale generates tailored recommendations to help ensure that your services remain efficient and maintain consistent performance.

Deploy coroot pods to specific nodes

If your cluster includes both Linux and Windows nodes, make sure to set a nodeSelector for Linux when deploying workloads that are not Windows-compatible.

YAML values file example:

coroot:
  nodeSelector:
    kubernetes.io/os: linux

Helm command example:

helm upgrade --install perfectscale ..... \
  --set coroot.nodeSelector."kubernetes\.io/os"=linux \
  perfectscale/exporter

To restrict workloads to a specific set of nodes (for example, those labeled component=java), you can combine multiple node selectors.

YAML values file example:

Helm command example:

Java usage visibility

When a Java container is detected, PerfectScale automatically starts collecting key JVM metrics. By continuously analyzing this data, PerfectScale delivers deep visibility into Heap, Non-Heap, and Garbage Collector usage patterns over time. By providing tailored, data-driven optimization recommendations, teams can seamlessly optimize resource utilization and cut cloud costs safely, ensuring their services remain efficient and maintain consistent performance.

Java containers resource utilization

When heap parameters are not set, the relevant indicator will appear under container flags, along with the calculated -Xms and -Xmx values.

Heap size is not set

PerfectScale respects explicitly set heap parameters when providing recommendations or applying automation.

When heap parameters are explicitly set, PerfectScale always respects them for resource recommendations and automation. The configured values are also displayed under the Container Flags section.

MaxHeapSize set

PerfectScale also provides detailed visibility into Garbage Collector time, helping teams better understand trends such as rising GC activity, correlate spikes with performance or latency issues, validate the impact of optimization changes, and plan capacity more effectively. By monitoring GC behavior alongside memory usage, teams can ensure Java workloads remain stable and efficient.

GC time

On the right side, you can also view additional Garbage Collector parameters, including the ActiveProcessorCount and GC type:

  • ZGC

  • ShenandoahGC

  • G1GC

  • ParallelGC

  • ParallelOldGC

  • ConcMarkSweepGC

  • SerialGC

The JVM maps millicores using the following logic: 1000m = 1 CPU, and 1001m = 2 CPUs

Disabling JVM metrics collection

To limit JVM metrics collection, you need to disable the deployment psc-coroot-node-agent when installing the PerfectScale Agent by adding the following parameter to the installation helm:

Last updated

Was this helpful?