Skip to content

Latest commit

 

History

History
56 lines (38 loc) · 1.83 KB

File metadata and controls

56 lines (38 loc) · 1.83 KB

Shared Classes Cache (SCC) and Dynamic Ahead-of-Time (AOT) in Eclipse OpenJ9 JVM

The demo is based on spring-petclinic project.

Make sure the IBM Semeru Runtime is properly configured

Build the application sources

cd spring-petclinic/
./mvnw package -DskipTests

Create the SCC

java -Xshareclasses:name=scc,cacheDir=. -Xscmx96m -XX:SharedCacheHardLimit=192m -Xquickstart -jar -Dserver.port=8080 target/*.jar

Note: When "-Xquickstart" mode is enabled all methods are dynamically AOT compiled (supposing that AOT compiler is active as well). This option is recommended when start-up time is an important performance metric

These command-line options are further detailed below:

Print the SCC stats

java -Xshareclasses:printStats,name=scc,cacheDir=.

Check the start-up times with SCC

Make sure there is no other instance running

pkill -f 'petclinic'

Start a few instances with SCC

java -Xshareclasses:name=scc,cacheDir=. -Xscmx128m -XX:SharedCacheHardLimit=256m -Xquickstart -jar -Dserver.port=8080 target/*.jar 1>/dev/null & ./time-to-first-response.sh 8080
java -Xshareclasses:name=scc,cacheDir=. -Xscmx128m -XX:SharedCacheHardLimit=256m -Xquickstart -jar -Dserver.port=8081 target/*.jar 1>/dev/null & ./time-to-first-response.sh 8081

Further References