修改Tomcat的jvm的垃圾回收GC方式为CMS
修改Tomcat的jvm的垃圾回收GC方式
cp $TOMCAT_HOME/bin/catalina.sh $TOMCAT_HOME/bin/catalina.sh.bak_20170815
vi $TOMCAT_HOME/bin/catalina.sh
vi catalina.sh
if [ -z "$JSSE_OPTS" ] ; then
JSSE_OPTS="-Djdk.tls.ephemeralDHKeySize=2048"
fi
JVM_OPTS="-server -verbose:gc
-XX:+PrintGCDateStamps
-XX:+PrintGCDetails
-XX:+UseGCLogFileRotation
-XX:NumberOfGCLogFiles=9
-XX:GCLogFileSize=256m
-XX:+UseParNewGC
-XX:+UseConcMarkSweepGC
-XX:+CMSParallelRemarkEnabled
-XX:CMSInitiatingOccupancyFraction=70
-XX:+CMSClassUnloadingEnabled
-XX:CMSMaxAbortablePrecleanTime=300
-XX:+CMSScavengeBeforeRemark
-XX:GCTimeRatio=19
-XX:SurvivorRatio=3
"
JVM_OPTS="-Xmx16g -Xms4g -Xmn512m $JVM_OPTS -Xloggc:$CATALINA_TMPDIR/jenkins_gc.log"
JAVA_OPTS="$JAVA_OPTS $JVM_OPTS $JSSE_OPTS -Dmail.smtp.starttls.enable=true -Dmail.smtp.auth=true -Dmail.smtp.ssl.trust=mail.service.mtime.com"
作者:
丹江湖畔养蜂子的赵大爹
出处:http://www.cnblogs.com/honeybee/
关于作者:丹江湖畔养蜂子的赵大爹
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文链接