Visit Azul.com Support

Information in Zing GC logs compared to OpenJDK

Garbage Collector (GC) log files created by OpenJDK runtimes focus exclusively on the behavior of the garbage collector and related memory information. On the other hand, GC logs produced by the Zing JVM provide a wide variety of additional information.

Additional Info in Zing GC Logs

Zing GC log files contain a lot of extra information for various functionalities.

General System Information

Zing adds a broad overview of the system the JVM it’s running on into the GC log.

Useful For

Validate the setup, whether the environment is properly configured, sanity checking of the GC log itself ("Is the GC log coming from the desired JVM?"), etc.

Example Info

  • Operating system info

  • JVM version

  • Number of available CPUs

  • Key CPU info details like make and model

  • Available memory

  • cgroups limits

  • Provided JVM arguments

  • Chosen number of JIT compiler/GC threads

  • Configured heap size

  • Dump of interesting kernel parameters

  • …​

Java Heap Info

Th Java heap info added by Zing to the GC log is similar, but more detailed, compared to OpenJDK runtimes. It contains detailed information about the garbage collection and memory management in general.

Useful For

Diagnose any memory related issues such as latency spikes caused by GC pauses, long TTSP (time-to-safepoint) time, allocation delays. Other usage might include validating that the JVM is running smoothly (avoiding OOME) on the allocated memory amount, e.g. by looking at not growing live set, amount of available headroom etc.

Example Info

  • GC phases

  • CPU consumed by the GC

  • Pause durations

  • GC cycle duration

  • Allocation rates

  • TTSP information

  • Break down of Java heap

  • Live set sizes

  • GC reasons

  • Details of GC heuristics (number of Klass IDs, estimated time to OOM, target peak occupancy)

  • …​

Off-Heap Memory Info

Provides information about all the memory allocated outside of the Java heap. JVM itself requires memory for its internal data structures, such as code cache for compiled code.

Useful For

Together with Java heap info above, this information is useful for diagnosing out of memory errors and general memory consumption.

Example Info

  • RSS decomposition

  • Code cache size

  • Breakdown of native memory allocated by regions

  • …​

Process, Container and System Info

Collects ongoing information about the environment that the JVM is running in.

Useful For

Overall inspection for health and correlating environment and resource use with other logged application activity. Understand the behavior and the context of key activity metrics or observed event or phases.

Example Info

  • System memory use

  • Breakdown of use by file cache and activity

  • Anonymous memory use

  • Number of threads running/blocked/total on the system

  • System load statistics

  • Paging and swapping behavior

  • Process memory use

  • Thread counts

  • cgroup/container:

    • memory use

    • cpu use

    • throttling stats

  • …​

JIT Compiler Info

Detailed information about the JIT compiler.

Useful For

Understanding JVM’s warmup behavior, how much resources it consumes and when the JVM is ready to make traffic. Also for diagnosing latency spikes that aren’t attributed to other parts like GC.

Example Info

  • Size of compiler queues

  • Compiler threads activity

  • Statistics of compiler tiers (interpreter vs. C1 vs. Falcon)

  • CPU used by JIT compiler

  • Number and lengths of compilations

  • Wait time distribution of a compilation

  • Deoptimization statistics

  • …​

Extra Info from ReadyNow

Additionally to Zing GC logs, another powerful source of insights is ReadyNow output log which can be produced by simply adding –XX:ProfileLogOut=<path>. Even when you don’t use the ReadyNow functionality itself, such a profile log can be created.

The ReadyNow profile log contains more detailed information about the JIT compilation activity. It gives more insights, such as exact times and names of the methods that were compiled, how long that specific compilation took, when was the method first called, which class loaders load which classes, and much more.

Getting Insights from GC Logs

GC logs and ReadyNow profile logs can be opened together in the Azul analysis tool Garbage Collection Log Analyzer (GCLA). It visualizes the metrics and allows to easily spot correlations.

Azul also provides a simple Bash script tool for extracting specific data from raw GC log files named GC Log Scraper. This tool is handy for automation, monitoring and further analysis.