From JRockit to HotSpot: Mission Control Templates

In this blogpost I’ll describe some of the difference between the JRockit and Hotspot JVM. Both JVM’s are Java Runtime Environments for running Java applications. Additionally you can see how some JVM Profile Recording options are still available in the new Mission Control tool.

_

 28 juni 2016

Last year, we’ve upgraded some of the FMW environments at one of our customers from 11.1.1.6 to 12.1.3. The project was pretty intensive given the size and importance of the environment, but after a while we pulled through. One of the things we’ve noticed is the impact that the new version has on the performance and the way we used to maintain our environment, specifically at the level of the Java Virtual Machine.

Originally we used the JRockit Java Virtual Machine for all our application servers. JRockit is a Java6 based JVM and after a while we grew accustomed to its tuning behaviour and useful command line options. However, JRockit is now considered end-of-life. The latest build is based on JDK 1.6.0_116-b11 which, for example, doesn’t contain support yet for the new TLS v1.2 protocol.

Oracle no longer supports JRockit for 12c, but instead decided to use their own JVM Engine. At the heart of Weblogic 12.1.3 runs the new HotSpot JVM, based on Java7. Hotspot is a bit different from JRockit at a couple of levels. Some of the command line options are no longer available, there are different Garbage Collection strategies added (of which ‘G1’ is the most promising feature) and the SSL protocols and ciphers have changed. For example SSLv3 is now disabled by default and you are encouraged to only use TLS protocols (but you can turn it on by changing the java.security file). Also apparently the cipher suites keep changing in newer revisions. For example, the SSL_RSA_WITH_RC4_128_MD5 cipher works fine with JDK 1.7.0_80 but is disabled in JDK1.7.0_85 and is no longer supported altogether.

Another difference is the way you make Flight Recordings. JRockit already offered you the possibility to record events at the JVM level and analyse them with a tool called Mission Control. The recordings only give you a 2% overhead on the performance of your application server and collect a lot of useful data such as heap usage, CPU usage and (with the correct plugins enabled) even some Weblogic specific events1.

If these recordings didn’t provide sufficient data, you could choose to use a different profile. JRockit was shipped with a couple of jfs files and adding one of these as an argument to your commandline, allowed you to see additional information e.g. heap, i/o or memory leaks2.

The new Java7 HotSpot also supports flight recordings, based on the features of JRockit. Although not all the same data is collected/shown, there are some nice additional features. One of these features is ‘contention’ which allows you to see which java processes are waiting on eachother. Another feature is ‘dumponexit’ on the command line, which allows you to automatically dump the flight recording file when someone gracefully shuts down the Weblogic instance.

Unfortunately, HotSpot doesn’t ship with out-of-the-box templates as JRockit did. If the default collection behaviour is insufficient however, there still is a way to collect additional data in a Flight Recording. First start Mission Control supplied in your JAVA_HOME/bin. In this example I use Mission Control 5.5 based on JDK1.8.0 but these will also open JDK1.7.0 flightrecordings3. Mission Control is also available on the JDK itself so just select the current JDK, right-click and select ‘start flight recording’.

1

We’re not going to make a flight recording on the Mission Control tool, but this allows us to enter the template window. Make sure ‘profiling’ is selected and click ‘Template Manager’.

2

Select the ‘Profiling’ template and click ‘duplicate’.

3

Select your duplicated template and now click ‘Edit’. In your new window you can select various profiling options such as ‘thread dumps every 10 seconds’ (default is every minute), additional ‘Heap statistics’ etc.

4

Name your new template. In this case I’ve named my template: ‘DemoTemplate’. Next, click ‘export File’ and this allows you to export a new ‘jfc’ file, which is similar to the older JRockit ‘jfs’ template files. Now you can put the resulting file on the host which contains your Weblogic Server and use the following command to create a flightrecording with your own template:

${JAVA_HOME}/bin/jcmd \
JFR.start name=”” \
duration=m \
filename=”” \
compress=<”true”> dumponexit=true \
settings=”DemoTemplate.jfc”

Mission Control is such a useful tool for analysis that our customer decided to record flight recordings every hour on the Production Environment, which makes troubleshooting and Support Requests a lot easier. In this post I’ve discussed some of the differences between the two JVM’s and provided you with. Please keep in mind that adding additional data to your flight recording might increase the overhead on your system and resulting size on the filesystem. Even so, a short detailed flight recording with additional stack traces at just the right moment might make the difference in the world.

1) For a guide how to start Flight Recordings and some MC features, see http://middlewaresnippets.blogspot.nl/2013/09/java-mission-control.html
2) For a list of templates, visit http://docs.oracle.com/cd/E15289_01/doc.40/e15070/config_rec_data.htm#CIADABGF
3) Although extensions are the same, Mission Control 5 doesn’t support JRockit flight recordings. For these you must use your JRockit JDK.

Geef een reactie


Hoe faciliteer je een naadloze customer journey? Op een manier die je wendbaar genoeg maakt om wijzigingen in je klantreis snel en efficiënt door te voeren?

Stay updated

Wij willen je graag op de hoogte houden van het nieuws rondom onze diensten die jou interesseren. Het enige wat je daar voor dient achter te laten zijn jouw mailadres en je voornaam. Vanaf dat moment zullen we je van tijd tot tijd een Ebicus update sturen.

Specifieke voorkeur voor content?