Microsoft Open Sources Java Garbage Collection Analyzer
Written by Kay Ewbank   
Monday, 13 September 2021

Microsoft has made a collection of libraries for analyzing HotSpot Java garbage collection (GC) log files available in an open source form. GCToolkit parses log files into discrete events and provides an API for aggregating data from those events.

The toolkit can be used to create arbitrary and complex analyses of the state of managed memory in the Java Virtual Machine (JVM) represented by the garbage collection log.

corretto

Introducing the toolkit, Kirk Pepperdine, Principal Engineer at Microsoft, said that:

"while GC is responsible for recovering memory in Java heap that is no longer in use, the term is often used as a euphemism for memory management and tuning GC or tuning the collector are often used with the understanding that it refers to tuning the JVM’s memory management subsystem.

He went on to say that more importantly, it has long been known that a suboptimal configuration collector will result in your application requiring more CPU and memory while at the same time, degrade your end-users experience. In other words, poorly tuned often equates to a more expensive runtime and unhappy users.

The problem is that it's difficult to balance garbage collection, and this is what GCToolKit has been help with. The toolkit consists of three Java modules covering the API, GC log file parsers, and a messaging backplane based on Vert.x.

The API module provides the means to analyze a GC log file using a few method calls that then access the parser and Vert.x. The parser module is a collection of regular expressions and code that Pepperdine says has been developed over many years to be the most robust GC log parser available. The Vert.x-based messaging backplane makes use of two message buses, one to stream from a data source, with listeners that are the parsers that convert the data from the data source into events that represent either a GC cycle or safe point. These events are then published on an event bus. Listeners on the event bus are then able to receive and process events that are of interest to them.

The parser emits discrete JVM events (GC cycle events or safe point events) so you can write code to capture and analyze the data from those events. GCToolkit provides a simple Aggregator/Aggregation framework for capturing and analyzing GC log file data.

corretto

More Information

GC Toolkit On GitHub

Related Articles

Microsoft Jumps on the OpenJDK Bandwagon

Microsoft Reveals Java Support In VS Code Roadmap

Microsoft Will Contribute To OpenJDK

JDK 12 Feature Set Frozen

Where's Java Going In 2020

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Trouble At The Heart Of AI?
29/09/2021

A recent paper by dozens of Stanford researchers calls AI models similar to the massive GPT-3 "foundation models", sparking a polarized response from other AI researchers and onlookers alike.



GitLab Adds Security Scan Policies
30/09/2021

GitLab, the web-based repository manager for Git, has been updated with improvements including project-level security scan execution policies and improved SAST to reduce Ruby false positives. GitLab p [ ... ]


More News

square

 



 

Comments




or email your comment to: comments@i-programmer.info