Last active
May 5, 2018 07:44
-
-
Save yamingd/6b632c38992a582372b6 to your computer and use it in GitHub Desktop.
java web server jvm common tuning
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-Xms initial java heap size | |
-Xmx maximum java heap size | |
-Xmn the size of the heap for the young generation | |
-XX:PermSize: initial value | |
-XX:MaxPermSize: max value | |
It is good practice with server-side Java applications to set the minimum -Xms and maximum -Xmx heap sizes to the same value. | |
For efficient garbage collection, the -Xmn value should be lower than the -Xmx value. | |
-server | |
-XX:+UseConcMarkSweepGC | |
-XX:+ExplicitGCInvokesConcurrent | |
-XX:+PrintGCDetails | |
-XX:+HeapDumpOnOutOfMemoryError | |
http://blog.headius.com/2009/01/my-favorite-hotspot-jvm-flags.html | |
http://stackoverflow.com/questions/1518213/read-java-jvm-startup-parameters-eg-xmx | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The ultimate gc log settings for Java 8:
-Xloggc:logs/gc.log -XX:+PrintGCDetails -XX:+PrintTenuringDistribution -XX:+PrintGCDateStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime -XX:+PrintReferenceGC