jvm参考(生产使用)

#4g
JAVA_OPTS=-Xms3g -Xmx3g -XX:+PrintFlagsFinal -XX:+UnlockDiagnosticVMOptions -XX:NewRatio=2 -XX:ParallelGCThreads=2 -XX:CICompilerCount=2 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:InitialCodeCacheSize=128m -XX:ReservedCodeCacheSize=256m -XX:MinMetaspaceFreeRatio=20 -XX:MaxMetaspaceFreeRatio=80 -XX:MetaspaceSize=512m -XX:MaxMetaspaceSize=768m -XX:CompressedClassSpaceSize=256m  -XX:MaxDirectMemorySize=256M -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xloggc:/usr/local/gc.txt -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime -XX:+PrintSafepointStatistics -XX:PrintSafepointStatisticsCount=1 -XX:+LogVMOutput -XX:LogFile=/usr/local/vm.txt -XX:-UseBiasedLocking -XX:+LogCompilation -XX:+SafepointTimeout -XX:SafepointTimeoutDelay=500

#8G
JAVA_OPTS=-Xms5440m -Xmx5440m -XX:+PrintFlagsFinal -XX:+UnlockDiagnosticVMOptions -XX:NewRatio=2 -XX:ParallelGCThreads=2 -XX:CICompilerCount=2 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:InitialCodeCacheSize=128m -XX:ReservedCodeCacheSize=256m -XX:MinMetaspaceFreeRatio=20 -XX:MaxMetaspaceFreeRatio=80 -XX:MetaspaceSize=768m -XX:MaxMetaspaceSize=768m -XX:CompressedClassSpaceSize=512m  -XX:MaxDirectMemorySize=512M -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xloggc:/usr/local/gc.txt -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime -XX:+PrintSafepointStatistics -XX:PrintSafepointStatisticsCount=1 -XX:+LogVMOutput -XX:LogFile=/usr/local/vm.txt -XX:-UseBiasedLocking -XX:+LogCompilation -XX:+SafepointTimeout -XX:SafepointTimeoutDelay=500

#16G
JAVA_OPTS=-Xms10880m -Xmx10880m -XX:+PrintFlagsFinal -XX:+UnlockDiagnosticVMOptions -XX:NewRatio=2 -XX:ParallelGCThreads=4 -XX:CICompilerCount=2 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:InitialCodeCacheSize=128m -XX:ReservedCodeCacheSize=256m -XX:MinMetaspaceFreeRatio=20 -XX:MaxMetaspaceFreeRatio=80 -XX:MetaspaceSize=768m -XX:MaxMetaspaceSize=768m -XX:CompressedClassSpaceSize=512m  -XX:MaxDirectMemorySize=512M -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xloggc:/usr/local/gc.txt -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime -XX:+PrintSafepointStatistics -XX:PrintSafepointStatisticsCount=1 -XX:+LogVMOutput -XX:LogFile=/usr/local/vm.txt -XX:-UseBiasedLocking -XX:+LogCompilation -XX:+SafepointTimeout -XX:SafepointTimeoutDelay=500
posted @ 2019-07-04 18:21  博客萨斯州  阅读(431)  评论(0编辑  收藏  举报