JRocket has below three advantages
(i) Jrockit will give the best performance then sun hotspot,because it has the JIT (just in time) compiler which compile the all the method on startup and convert it to machine to code and save it in the memory which means the same methods called by code wont be compiled again as jrockit will use machine code directly from the memory to run it,so this will increase the performance where as sun jdk doesn't have this option and it compiles and convert the method every it called which is will de-grade the performance on long running JVM's on production.
(ii) Jrockit have the feature called optimization which tracks the history/count of frequently used methods by the code, this feature will optimize those methods automatically to improve the overall system performance,sun JDK doesn't have this future.
(iii) Jrockit has jfr(jrockit filght recorder) which can be used to store/dump of the entire jvm operations for a particular period to narrow down the issues with JVM and its gives very very less overhead to the system and this can be used on production as well witout affecting/degrading the prod JVM performance.
===========================================
As we all know, JVM is responsible in converting the java byte code into machine code (which the machine understands)
Sun jdk and Oracle JRockit do the same thing using different mechanism.
**************************
Sun JDK uses interpreter (Interpreter and JIT in previous releases) – In this mechanism, the byte code is read and the translated into machine language, but these results are not saved in the memory. So every time even if the same method is run again and again, the JVM has to translate the code into machine language. This means machine code will not be reusable as it is not saved anywhere in the memory.
Oracle JRockit uses only JIT compiler (Just In Time) – JIT mechanism means, once a method is run, the byte code is translated to machine language and this is saved in the memory. This means if the method is run again, there is no need for translation and the machine code is reused.
Because of the interpreter mechanism used by sun jdk, the start up time for the server is faster because it does not have to save the machine code in memory. Once the translation is done for a method, it moves to the other one. Where as oracle JRockit saves the code, which is why start up takes longer. For the same reason, oracle JRockit uses more memory than sun jdk.
In the long run, JRockit gives a slightly better performance as compared to sun jdk.
**************************
Oracle JRockit optimizes the code. It identifies the HOT SPOTS which means the methods that are being run more often. These methods are then queued up for optimization. This code is then optimized which improves performance. Many issues are seen becuase of the code optimization mechanism because it is a complex procedure. Optimization can be disabled.
JIT is also used by Sun JDK, but that was in the earlier versions. The Java Hotspot VM removes the need for a JIT compiler in most cases.
**************************
Memory spaces in jdks:
Sun JDK has the following memory spaces: Eden space, survivior space, tenured generation and permanent generation. The objects move from one space to another according to its age and survival from garbage collection.
JRockit has 2 spaces, young generation and old generation, it uses the same mechanism of garbage collection. There is nothing called as permanent generation in JRockit.
(i) Jrockit will give the best performance then sun hotspot,because it has the JIT (just in time) compiler which compile the all the method on startup and convert it to machine to code and save it in the memory which means the same methods called by code wont be compiled again as jrockit will use machine code directly from the memory to run it,so this will increase the performance where as sun jdk doesn't have this option and it compiles and convert the method every it called which is will de-grade the performance on long running JVM's on production.
(ii) Jrockit have the feature called optimization which tracks the history/count of frequently used methods by the code, this feature will optimize those methods automatically to improve the overall system performance,sun JDK doesn't have this future.
(iii) Jrockit has jfr(jrockit filght recorder) which can be used to store/dump of the entire jvm operations for a particular period to narrow down the issues with JVM and its gives very very less overhead to the system and this can be used on production as well witout affecting/degrading the prod JVM performance.
===========================================
As we all know, JVM is responsible in converting the java byte code into machine code (which the machine understands)
Sun jdk and Oracle JRockit do the same thing using different mechanism.
**************************
Sun JDK uses interpreter (Interpreter and JIT in previous releases) – In this mechanism, the byte code is read and the translated into machine language, but these results are not saved in the memory. So every time even if the same method is run again and again, the JVM has to translate the code into machine language. This means machine code will not be reusable as it is not saved anywhere in the memory.
Oracle JRockit uses only JIT compiler (Just In Time) – JIT mechanism means, once a method is run, the byte code is translated to machine language and this is saved in the memory. This means if the method is run again, there is no need for translation and the machine code is reused.
Because of the interpreter mechanism used by sun jdk, the start up time for the server is faster because it does not have to save the machine code in memory. Once the translation is done for a method, it moves to the other one. Where as oracle JRockit saves the code, which is why start up takes longer. For the same reason, oracle JRockit uses more memory than sun jdk.
In the long run, JRockit gives a slightly better performance as compared to sun jdk.
**************************
Oracle JRockit optimizes the code. It identifies the HOT SPOTS which means the methods that are being run more often. These methods are then queued up for optimization. This code is then optimized which improves performance. Many issues are seen becuase of the code optimization mechanism because it is a complex procedure. Optimization can be disabled.
JIT is also used by Sun JDK, but that was in the earlier versions. The Java Hotspot VM removes the need for a JIT compiler in most cases.
**************************
Memory spaces in jdks:
Sun JDK has the following memory spaces: Eden space, survivior space, tenured generation and permanent generation. The objects move from one space to another according to its age and survival from garbage collection.
JRockit has 2 spaces, young generation and old generation, it uses the same mechanism of garbage collection. There is nothing called as permanent generation in JRockit.
No comments:
Post a Comment