Keycloak JVM Metrics

This documentation covers the information about the key JVM metrics for observing the performance of Keycloak.

JVM info

jvm_info_total

This provides important information about the JVM such as version, runtime and vendor.

Heap Memory Usage

jvm_memory_committed_bytes

This measures the amount of memory that the JVM has committed for use, reflecting the portion of the allocated memory that is guaranteed to be available for the JVM to use.

jvm_memory_used_bytes

This measures the amount of memory currently used by the JVM, indicating the actual memory consumption by the application and JVM internals.

Garbage Collection Metrics

jvm_gc_pause_seconds_max

It represents the maximum duration, in seconds, of garbage collection pauses experienced by the JVM due to a particular cause, which helps you quickly differentiate between types of GC (minor, major) pauses.

jvm_gc_pause_seconds_sum

It represents the total cumulative time spent in garbage collection pauses, indicating the impact of GC pauses on application performance in the JVM.

jvm_gc_pause_seconds_count

This metric counts the total number of garbage collection pause events, helping to assess the frequency of GC pauses in the JVM.

jvm_gc_overhead_percent

The percentage of CPU time spent on garbage collection, indicating the impact of GC on application performance in the JVM. It refers to the proportion of the total CPU processing time that is dedicated to executing garbage collection (GC) operations, as opposed to running application code or performing other tasks. This metric helps determine how much overhead GC introduces, affecting the overall performance of the Keycloak’s JVM.

Additional information on the Keycloak metrics endpoint can be found here.