Oracle Hotspot, IBM SDK, HP NonStop Server for Java, Jrockit…. Why so many flavors of JVM? And more importantly, why do you care ?
While it is Sun/Oracle that originally created the Java Virtual Machine, since JVM is basically a set of specifications, any vendor could create their own version of JVM. Several vendors jumped in to create their spin offs. Some are free and open source but some are proprietary. The following JVMs are prominent in the market today
In addition to the above, Apple has their own spin off that is used in MAC.
Sun/Oracle HotSpot is still the market leader (about 60%). Oh, by the way, you will be surprised to know that there are more than 30 JVMs out there. Did you know apache had its own JVM (Apache harmony) ?
Why do you care which JVM is being used?
As an Application Support Engineer, you have to care about the flavor of the JVM for four major reasons
- Vendor specific Java Command Line Options
- Memory management and garbage collection algorithms
- Diagnostic tools
Patches are super important to keep your JVM secured. A big chunk of security related vulnerabilities are Java related and patches are your first line of defense. There may be patches that only certain flavors might need. So, it is important to keep track of patches related to your flavor of JVM.
Command line options
There may be vendor specific command line options that you need to be aware of.
For example, the following command line option is used to enable Aggressive performance settings in Hotspot JVM
But to achieve the same effect, in IBM jvm, you have to use the following option
Memory management and Garbage collection algorithms
Memory management can differ drastically among JVM vendors. It will also vary based on the underlying operating systems. As an Application Support Engineer, while you don’t need to know all the gory details about JVM memory management, you got to know various garbage collection algorithms. For example, IBM JVM lets you use the following option to configure JVM for optimizing GC pause times (i.e you application can’t take longer gc pause times but can take some throughput hit)
This is big. How big? Jrockit Mission Control Big. Jrockit Mission Control Java Diagnostics will make tools from other JVMs (yes, including Hotspot) archaic. As an Application support engineer you need to know diagnostic tools specific to your JVM. All the standard commands like ‘jmap’ , ‘jstack’ etc will still work with any flavor of JVM.
In summary, while your application developers may not care about the JVM vendor, as a support engineer, you must be familiar with the JVM flavor as you may have to manage patches, configure command line options and GC options. And finally, the diagnostic tools vary between JVM flavors.
This concludes the first section of this Java troubleshooting guide. In the next section, I will dive into one of the most feared Java troubleshooting areas – JVM Memory troubleshooting.