On the first day of the Devoxx 2009, Noora Peura presented a university session on the new 4.0 version of JRockit Mission Control called “The Next Generation Profiling and Diagnostics Tools”. JRockit is the second most used Java Virtual machine(JVM) with, as they claim, tremendous power and analytic abilities. Sun’s JVM is used more, because it is the default JVM when you install Java Runtime.
JRockit was originally built by Appeal Virtual Machines. In 2002 it was acquired by BEA Systems it is now part of the Oracle Fusion Middelware stack. Noora Peura has been with the JRockit team since 2001. JRockit has been here for over a decade and is for a fact, one of the fastest virtual machines around. Because of its excellent statistics it is the favorite JVM for building and running high performance apps. It is the default JVM used by the Oracle support and performance teams.
Suite of tools
In this sneak preview of the new JRockit Mission Control 4.0 version we saw a complete line of tools in a neat tool suite. Some tools already exit in the Mission Control 3.1 version and can therefore already be used straightaway. And some extra, very useful features were added or improved.
Memory Leak Detector
The Memory Leak Detector is build-in inside JRockit JVM with enables it to link directly to the garbage collector and gather analysis data from there. Direct monitoring like this gives a firsthand insight of any problems or memory leaks as they occur. An overview of existing classes can be displayed and in this presentation one can see how much heap size is allocated and in how many bits a second this allocation is growing. You can zoom into suspicious classes in a graphical overview. Displaying which dependencies this class has to give more insight in its usage. This way it is easier to detect if it is valid that the class still exists or should have been garbage collected already. With this approach the Memory Leak Detector even makes it possible to detect very slow occurring memory leaks even long before the system crashes as a cause of them.
The new JRockit Mission Control 4.0 release has a new feature called shortest path analysis. This feature gives a boost to the analysis of stackdumps as we know them. Shortest path analysis helps you to point directly to the root of the problem when something goes wrong. Instead of browsing through endless stackdumps. It reduces the stackdump to only the information you need while highlighting the possible cause of the failure.
Being directly hooked into the class loader JRockit is also able to pull information from it to tackle the much to often occurring vague class loader issues as early as possible.
In the Management Console you’re able to present an overview of MBeans residing in the JVM and monitor their activity. It helps you monitor the servers health by giving insight in heap usage and CPU load. Profiling is done low-level and on-line which provides real-time information.
A very nifty extra feature is the ability to monitor multiple JVM’s and plot log alerts profile.
JRockit runtime Analizer 3.1 –> JRocket Flight recorder 4.0
In the new JRockit Mission Control version 4.0 they changed the name of the “Runtime Analyzer” tool into “Flight Recorder”. This tool provides the information for the real-time analytics that is used by the other two tools. Recording is done in a very inexpensive manner. Therefore they have decided to leave recording is always on by default in the new 4.0 version.
Besides these tools JRockit Mission Control 4.0 also comes with a number of extension points with enable you to write and add you own self-created plug-ins or use others shared on the net.
For eclipse there already is a downloadable plug-in that make it possible to use eclipse as a profiling and diagnostics GUI tool.
Java profiling and diagnostics
JRockit JVM with the JRockit Mission Control tools is very suitable for both development and production environments. Key here is non-intrusive performance monitoring. Which means you can leave your monitoring on also during production in a high performing environment nearly without paying the performance cost. This ability gives you direct insight into any problems that occur. Which will save you weeks of bug fixing iterations trying to reproduce the failure that occurred. The JRockit profiling and diagnostics tell the system administrator immediately where the problem occurred and he can start fixing the defect straight away.
Gathering all necessary data doesn’t use any bytecode generation and no Java code has to be altered. So after all analyzing, profiling and diagnosing is done you can easily replace the JRockit JVM with your own preferred JVM without any rewriting, rebuilding or redeploying whatsoever.
JRockit has been around for a long time and has proved to perform very well in the past. However SUN hasn’t stood still either. Their JVM has also made some significant improvements on profiling and error detection. So that is also still interesting to keep in mind. But more on that in a later blog.
For more information on JRockit Mission Control take a look at http://www.tinyurl.com/missioncontrol.JRockit Mission Control 4.0 sneak preview,