Thursday, January 10, 2013

Difference between Sun (Oracle) JVM and IBM JVM

There are different JVM implementation available apart form popular Sun's (now Oracle) hotspot JVM like IBM's JVM. Now question comes, what makes two JVM different to each other? Quite a lot of thing can be different even if two JVMs are implemented by following Java virtual machine specification. IBM has its own JVM implementation which is different than Oracle's JVM in many things like JIT(Just in Time) Compiler, structure of Java heap, garbage collectors and support for monitoring and management. Though I have mostly used Sun’s hotspot JVM recently got chance to run some Java program on IBM JVM on AIX platform and In this article I will shared some differences between Oracle and IBM JVM which is worth remembering. IBM's JVM is particularly useful on platform which is not supported by Oracle like AIX systems.

IBM vs Oracle JVM

Difference between IBM and Oracle hotspot JVM
1) First difference between Oracle and IBM JVM is that IBM uses different JIT and Garbage collectors than Oracle's JVM.

2) Another difference between IBM JVM and Oracle JVM is that IBM's JVM has different heap structure than Oracle's JVM. By default IBM JVM does not use Generational Garbage Collector which can be enabled by JVM option (-Xgcpolicy:gencon)IBM JVM doesn't have PermGen space for storing class related meta data so free from PermGen OutOfMemoryError.

3) IBM JVM has different kind of compiler known as Ahead Of time Compiler (AOT compiler) which work to reduce some overhead form JITing code whenever JVM starts. AOT compiler memory maps pre-compiled class file so that they don't need to go JIT compilation when IBM's JVM runs.

4) IBM JVM also support class sharing which can be used to store classes which are shared across different JVM instances. This feature may available to Oracle JVM as well.

5) Earlier there was another different related to CompressOOPS but from Java6 update releases Oracle's JVM also support CompressedOOPS which is quite a handy JVM option to get better performance in 64 bit JVM, read Why should you use -XX:UseCompressedOOPS in 64 bit JVM for more details.

6) IBM also provide some tools to monitor and analyze thread dumps which can be used to find deadlocks, resource contention and bottleneck.

That's all on difference between IBM and Oracle JVM. You won't notice many difference until you go real deep to get better performance and scalability stuff, for most of Java programs it just run fine because both JVM support standard Java libraries.

Other Java tutorials from Javarevisited Blog
Invalid initial and maximum heap size in JVM - How to fix

4 comments :

Antonio said...

Hi

In the latest release of the J9 (start with J9 release with WebSphere 8.0 (at least in windows)), the default collector is Generational Garbage.

More informations in French at
http://blog.aliecom.com/fonctionnement-de-la-jvm-dibm-j9/

Pankaj Soni said...

do anybody know benifits in using JRockit jdk

Vishal Lakhmapurkar said...

nice tutorial , i have a question on IBM vs ORACLE JVM point 3,
My question is how AOT identify classes are changed or not or easy word how AOT identify at loading of precompiled class, for any changes done or not.

Kim junn said...

I have used IBM JVM in WebSphere application Server version 7.0 in 64-bit environment, and I didn't notice any specific difference. Like Oracle's hotspot JVM, IBM JVM also supports JMX and other features.

Post a Comment