Problem:
When migrating a well-tuned application from Azul Platform Core (Azul Zulu Builds of OpenJDK) to Azul Platform Prime (Azul Zulu Prime Builds of OpenJDK), one may see the startup performance increase significantly (eg. from ~7 minutes to ~45 minutes in a simple Azul Zulu Prime JVM running TomCat in a Docker instance of 12GB RAM, 6 Cores, 8GB heap).
Startup performance can be debugged by capturing the GC log and using the GC Log Analyzer tool ($JAVA_HOME/etc/GCLogAnalyzer2.jar) to analyze it.
However, in this case there was not very much activity in the GC log and nothing to explain the long startup time. Compiler activity was relatively quiet.
Cause:
The previously tuned Azul Zulu JVM had previously used the following "excludec2" directives to improve startup performance:
-XX:CompileCommand=exclude,org.springframework.core.ResolvableType::as
-XX:CompileCommand=exclude,org.springframework.beans.factory.support.AbstractBeanFactory::getObjectForBeanInstance
-XX:CompileCommand=exclude,sun.reflect.GeneratedMethodAccessor::*
but these directives are ignored with the Falcon Compiler in Azul Zulu Prime JVM. Falcon currently ignores "excludec2".
The following combination was determined to be the cause:
- since "excludec2" was ignored, Falcon compiler had a huge memory requirement
- -Xms2GB. Azul Zulu uses the -Xms parameter to start with a smaller heap, where Azul Zulu Prime ignores it and immediately grows heap to (maximum) -Xmx, thereby causing a lot of disk swapping to occur (which didn't occur in Azul Zulu)
- Customer's heap was too large to work efficiently with a 12GB docker instance. A larger instance or smaller heap should help improve performance
Solution:
Replace any existing "excludec2" directives with "excludefalcon". For example, the previous directives would be changed as follows:
-XX:CompileCommand=excludefalcon,org.springframework.core.ResolvableType::as
-XX:CompileCommand=excludefalcon,org.springframework.beans.factory.support.AbstractBeanFactory::getObjectForBeanInstance
-XX:CompileCommand=excludefalcon,sun.reflect.GeneratedMethodAccessor::*
This will reduce the load on the Falcon compiler to match what was observed in Azul Zulu.
Add Comment
Comments
Article is closed for comments.