Java Performance Tuning
This white paper presents the basics of Java Performance Tuning and its preferred values for large deployments of Application Servers
Situation:
Need to optimize the performance of JVM and it's garbage collection handling.
Solution:
We don't specify any policy in the JVM parameters of launcher.properties file so the default policy of JVM is picked. So below are the parameters that you need to add in Kernel JVM parameters.
Below are the parameters that we are going to add and couple of the options require a computation which is enclosed in angle brackets (<>), of which two depend on the number of CPU(core) on the machine (#CPU).
Enable the concurrent low pause collector
-XX:+UseConcMarkSweepGC
Use parallel threads
-XX:+UseParNewGC
-XX:ParallelGCThreads=<#CPU < 8 ? #CPU : 3 + ((5 * #CPU) / 8) >
-XX:+CMSParallelRemarkEnabled
Size young generation for short pauses
-XX:NewSize=4m
-XX:MaxNewSize=< 4m * ParallelGCThreads >
Promote all live young generation objects
-XX: MaxTenuringThreshold=0
-XX:SurvivorRatio=1024
Unload classes from PermSpace
-XX:+CMSClassUnloadingEnabled
Example:
-XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:ParallelGCThreads=8 -XX:+CMSParallelRemarkEnabled -XX:NewSize=4m -XX:MaxNewSize=24m -XX:MaxTenuringThreshold=0 -XX:SurvivorRatio=1024 -XX:+CMSClassUnloadingEnabled
Restart Adeptia services after making changes in launcher.properties file.
Comments
0 comments
Article is closed for comments.