8g物理内存
-Xms4g
-Xmx4g
-Xmn2g
-Xss1m
-XX:MetaspaceSize=128m
-XX:MaxMetaspaceSize=256m
-XX:SurvivorRatio=8
-XX:MaxDirectMemorySize=512m
-XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=70
-XX:+UseCMSInitiatingOccupancyOnly
-XX:+UseCMSCompactAtFullCollection
-XX:CMSFullGCsBeforeCompaction=10
-XX:+AlwaysPreTouch
-XX:+HeapDumpOnOutOfMemoryError
-verbose:gc
-Xloggc:gc.log
-XX:GCLogFileSize=50M
-XX:+PrintGCDetails
-XX:+PrintGCDateStamps
-XX:+PrintGCTimeStamps
16g物理内存
-XX:+PrintCommandLineFlags
-Xms8g
-Xmx8g
-XX:MaxDirectMemorySize=1g
-Xss512k
-XX:MetaspaceSize=128m
-XX:MaxMetaspaceSize=256m
-XX:+UseG1GC
-XX:MaxGCPauseMillis=100
-XX:InitiatingHeapOccupancyPercent=50
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=./
-XX:+PrintGCDetails
-XX:+PrintGCDateStamps
-XX:+PrintGCTimeStamps
-Xloggc:gc.log
-verbose:gc
-XX:GCLogFileSize=50M
-XX:NativeMemoryTracking=summary
标签:HeapDumpOnOutOfMemoryError,Xloggc,verbose,XX,gc,jvm,参数,模板,log From: https://www.cnblogs.com/merciless/p/18234585