When I used the ARM version of Open JDK, the processing speed was slower than the intel version, so Describe the contents of the survey at that time and the sites referred to.
Development package for Java. In addition to JRE (Java Runtime Environment: environment for executing programs for Java) Contains development software such as compilation for Java.
To JRE JVM (Java Virtual Machine: a virtual environment that runs Java programs) and Contains API (Application interface) for Java.
http://qiita.com/chkkchy/items/3a4594645b3aef7a98b7
Oracle JDK JDK developed by Oracle. There is a charge for commercial use.
A. COMMERCIAL FEATURES. Is described in the column ↓ http://www.oracle.com/technetwork/java/javase/terms/license/index.html
Open JDK An open source version of the JDK where companies other than Oracle are also participating in the development.
After JDK7, OpenJDK and Oracle JDK are basically the same. There is no particular difference if it is about programming normally.
According to the site below, Open JDK is not optimized for ARM, so There is a description that the processing performance is lower than that of Oracle JDK.
https://blogs.oracle.com/jtc/entry/comparing_arm_linux_jvms_revisited
When the Java program was actually executed with Open JDK and Oracle JDK in the ARM environment on the actual machine, the following results were obtained.
Since the size of Java code cache (area for temporarily storing compiled code) is small by default, Java functions delete the code cache when the upper limit is exceeded. Since it compiles each time, there seems to be an event that the processing becomes slow.
http://blog.cybozu.io/entry/2016/04/13/080000
When I checked the compilation status with the jstat command, With Open JDK, it wasn't compiled at all.
*View cumulative JIT compiled tasks
jstat -compiler ${JAVA_PID}Display interval(millisecond)
*View JIT compiled methods
jstat --printcompilation ${JAVA_PID}Display interval(millisecond)
https://docs.oracle.com/javase/jp/6/technotes/tools/share/jstat.html
On the site below, it is stated that the processing delay was improved by disabling the function to delete the code cache in the Java startup option for the following.
In my environment, even if the above measures were taken, the state of not being compiled continued.
http://blog.cybozu.io/entry/2016/04/13/080000
*Display the initial value of Java options, and if code cache is enabled, specify the option to disable code cache deletion
java -XX:+PrintFlagsFinal -version
*Disable code cache deletion
-XX:-UseCodeCacheFlushing
I don't know why, but some Java options are specific to a particular CPU, Is it possible that the option has affected the ARM version so that it is not compiled in the first place?
Recommended Posts