Created
July 3, 2016 11:27
-
-
Save RELATO/b7b06924ad6e240320ee9c07f253c89c to your computer and use it in GitHub Desktop.
Java 8-old runtime config tips
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
For lazy readers full listing is here (for curious detailed explanation is provided below): | |
Java < 8 | |
-server | |
-Xms<heap size>[g|m|k] -Xmx<heap size>[g|m|k] | |
-XX:PermSize=<perm gen size>[g|m|k] -XX:MaxPermSize=<perm gen size>[g|m|k] | |
-Xmn<young size>[g|m|k] | |
-XX:SurvivorRatio=<ratio> | |
-XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled | |
-XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=<percent> | |
-XX:+ScavengeBeforeFullGC -XX:+CMSScavengeBeforeRemark | |
-XX:+PrintGCDateStamps -verbose:gc -XX:+PrintGCDetails -Xloggc:"<path to log>" | |
-XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M | |
-Dsun.net.inetaddr.ttl=<TTL in seconds> | |
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=<path to dump>`date`.hprof | |
-Djava.rmi.server.hostname=<external IP> | |
-Dcom.sun.management.jmxremote.port=<port> | |
-Dcom.sun.management.jmxremote.authenticate=false | |
-Dcom.sun.management.jmxremote.ssl=false | |
Java >= 8 | |
-server | |
-Xms<heap size>[g|m|k] -Xmx<heap size>[g|m|k] | |
-XX:MaxMetaspaceSize=<metaspace size>[g|m|k] | |
-Xmn<young size>[g|m|k] | |
-XX:SurvivorRatio=<ratio> | |
-XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled | |
-XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=<percent> | |
-XX:+ScavengeBeforeFullGC -XX:+CMSScavengeBeforeRemark | |
-XX:+PrintGCDateStamps -verbose:gc -XX:+PrintGCDetails -Xloggc:"<path to log>" | |
-XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M | |
-Dsun.net.inetaddr.ttl=<TTL in seconds> | |
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=<path to dump>`date`.hprof | |
-Djava.rmi.server.hostname=<external IP> | |
-Dcom.sun.management.jmxremote.port=<port> | |
-Dcom.sun.management.jmxremote.authenticate=false | |
-Dcom.sun.management.jmxremote.ssl=false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://blog.sokolenko.me/2014/11/javavm-options-production.html