Monitoring garbage collection (GC) is an important part of Java troubleshooting and performance tuning. Since it’s not practical to scroll through thousands of lines of logs, we need a good GC log analyzer to keep tabs on whether the system is tuned to best advantage.
There are several excellent GC analysis tools available. Some are commercial, some are open source. In this article, we’ll look at how to decide which is best for your organization.
Open Source vs. Commercial: What’s the Difference?
Let’s begin by defining what we mean by the terms ‘open source software’ and ‘commercial software’.
Commercial software is developed by a for-profit organization. It may not necessarily have a price tag: vendors often offer free software for several reasons.
- They want to offer a service to their clients;
- It’s bundled together with paid software;
- It’s a limited-feature edition of a paid application. Many users will opt for the paid package once their needs grow beyond the features of the free version, making this commercially viable.
The source code for the application is very seldom available to users.
Open source software, on the other hand, always makes the source code available, and it’s often distributed free of charge. It’s usually developed to fill a perceived need in the industry. Some software is sponsored by a foundation, such as Eclipse or Apache. It may also be written and maintained by a community, or an individual.
Users can modify the source code to meet their own specific requirements, either by having their own branch of the software, or by becoming approved contributors to the project.
Examples of Commercial and Open Source GC Log Analyzers
In this article, we’re concentrating on log analysis tools, rather than profilers that allow us to observe GC behavior in real time. Log analysis lets us observe trends over time, whereas profilers allow us to observe the current GC activity.
Commercial GC analysis tools include:
- GCeasy: This is a powerful analyzer that extracts important information in the form of charts and graphs. There is a free version that includes comprehensive tuning and troubleshooting information. It also offers limited REST APIs that allow it to be integrated in the CI/CD pipeline, or with other performance monitoring tools. The paid option adds machine learning analysis, as well as more access to automation via REST APIs. GCeasy is platform-agnostic, and will work with the log formats of almost all JVMs.
- Several software vendors include GC log analyzers in their Java toolkits. These are specifically aimed at their own user base, although the tools may have limited functionality with other Java platforms. They include:
Open source tools include:
- GCViewer: A GUI-based tool that allows us to interactively explore information from GC logs;
- Garbagecat: A CLI based tool that provides comprehensive information as well as analysis and tuning suggestions in a text-form report.
What Factors Influence Our Choice?
There are a number of things we should evaluate before choosing software. Let’s look at a few of the more important factors, bearing in mind that experienced programmers can modify open source tools to add features and functionality if they need them.
1. Range of Features and Ease of Use
Important features for both tuning and troubleshooting include:
- Calculation of key performance indicators such as throughput, latency and footprint;
- Ability to easily see trends in memory usage over time;
- Analyzing causes of GC events;
- Frequency and duration of GC events;
- Allocated vs peak size by generation;
- GC patterns over time.
Commercial tools score a little better in this respect.
2. Platforms Supported
We need to be sure the tool will work with the JVM type and version we’re using, and also the GC algorithms we have selected.
On the whole, commercial software scores badly here, since most tools are locked in to a particular vendor. The exception is GCeasy, which supports a wide range of JVM versions and algorithms.
3. Integration With Other Tools
For large applications, we often need to integrate GC log analysis with other tools. The reasons may include:
- Inclusion in a CI/CD pipeline;
- As part of automated system monitoring;
- Integration with management tools such as Jira.
Vendor-specific tools often include integration with other diagnostic tools from the same supplier, and may feature integration with other well-known monitoring tools. This is something we should research for the particular vendor, as each is different.
GCeasy is different in this respect, in that it offers REST APIs that make integration with a wide range of tools simple.
Open source tools don’t usually offer complex integration, but since the source code is available, adding integration is usually not too difficult. Additionally:
- Garbagecat is CLI-based and produces a text file, so experienced IT staff can use scripting and other methods to integrate into CI/CD;
- GCViewer has the option of outputting CSV files, which can help in integration.
4. Cost
Since open source software is usually free, it’s assumed that it’s automatically more economical to use it. However, for larger organizations, it makes sense to do a proper comparative cost/benefit analysis.
Here are a few things to consider.
- Is there a free version of a commercial tool that fits our needs better?
- Will we need to modify the open source tool to meet requirements? If so, how much will this cost in developer time? Will modifications have to be adjusted if a new version of the tool comes out? How difficult will this be?
- Will a paid tool offer enough additional benefits in reduced troubleshooting and tuning costs to cover its purchase or subscription price?
5. Support
Commercial software may offer customer support, but we need to confirm exactly what level of support is provided. Subscriptions should include a service level agreement, which we can check to make sure it meets our needs.
Open source software does not come with any guarantee of support. However, there is often a helpful community for open source tools, which often includes the developers and experienced users. The community is usually helpful if we encounter problems.
6. Maintenance and Development
Since Java is continually evolving, it’s important that the log analyzer you choose will still be useful when you upgrade to a new JVM and the log format changes.
It’s in the interest of commercial developers to ensure their tool is kept up to date with the latest JVM releases. However, there is no guarantee of this: the vendor could go out of business, or take a different direction with development.
If you choose an open source tool, check whether it’s well-maintained and has a large community of developers associated with it. If not, it’s unlikely it will evolve with changing IT requirements.
7. Vendor Lock-in
This is always the danger with closed-source software. If you decide to migrate to a different type of JVM or working environment, your tools and your entire automation set-up is likely to become useless.
This is less of a problem with GCeasy, which is to a large extent platform-agnostic.
Conclusion
When comparing open source to commercial software, there are pros and cons on both sides. Each organization’s needs are different, and there is no ‘right’ solution.
In many ways, GCeasy combines the advantages of both commercial and open source software, since REST APIs allow us to integrate well with other software and enhance functionality. It also works with almost any Java platform.
I hope this article helps you to evaluate your own needs, and make the right choice between different GC log analyzer options.


Share your thoughts!