Friday, July 30, 2021

Difference between Sun (Oracle) JVM and IBM JVM?

There are different JVM implementations available apart from popular Sun's (now Oracle) hotspot JVM like IBM's JVM. Now the question comes, what makes two JVM different from each other? Quite a lot of things can be different even if two JVMs are implemented by following Java virtual machine specifications. IBM has its own JVM implementation which is different than Oracle's JVM in many things like JIT(Just in Time) Compiler, the structure of Java heap, garbage collectors, and support for monitoring and management. Though I have mostly used Sun’s hotspot JVM recently got a chance to run some Java programs on IBM JVM on the AIX platform.

In this article, I will share some differences between Oracle and IBM JVM which are worth remembering. IBM's JVM is particularly useful on a platform that is not supported by Oracle like AIX systems.

And, if you are serious about improving your advanced JVM skill and learn things like taking and analyzing heap dumps then highly recommend you to join these advanced Java Performance courses for experienced developers. 

Difference between Sun (Oracle) JVM and IBM JVM




IBM vs Oracle JVM

1) The 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 a different heap structure than Oracle's JVM. By default, IBM JVM does not use Generational Garbage Collector which can be enabled by the JVM option (-Xgcpolicy:gencon)IBM JVM doesn't have PermGen space for storing class-related metadata so free from PermGen OutOfMemoryError.

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



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

5) Earlier there was another difference related to CompressOOPS but from the Java 6 update releases Oracle's JVM also supports 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 provides some tools to monitor and analyze thread dumps which can be used to find deadlocks, resource contention, and bottleneck.

Difference between IBM and Oracle hotspot JVMThat's all about the difference between IBM and Oracle JVM. You won't notice much difference until you go really deep to get better performance and scalability stuff, for most Java programs it just runs fine because both JVM supports standard Java libraries.



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

5 comments:

  1. 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/

    ReplyDelete
  2. do anybody know benifits in using JRockit jdk

    ReplyDelete
  3. 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.

    ReplyDelete
  4. 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.

    ReplyDelete
  5. I have a query. Experts please help with your inputs.

    How can I know what is the JVM that (WAS) WebSphere application server is running with?
    Does WAS's JVM is always IBM's JVM on all platforms (SunOS, HP-UX, Windows, Linux and AIX) or it can be Oracle JVM also.
    If it can be either of two, how can I determine, what is the JVM type(IBM/Oracle)?

    ReplyDelete