tomcat 基础调优

参考文章 
【http://blog.csdn.net/lifetragedy/article/details/7708724】
【http://blog.csdn.net/cicada688/article/details/14451541】

使用 java 8 MetaspaceJEP 122)代替持久代(PermGen space)。在JVM参数方面,
使用-XX:MetaSpaceSize-XX:MaxMetaspaceSize代替原来的-XX:PermSize-XX:MaxPermSize

JDK8中用metaspace代替permsize,因此在许多我们设置permsize大小的地方同样需要修改配置为metaspace

将-XX:PermSize=200m;-XX:MaxPermSize=256m;

修改为:-XX:MetaspaceSize=200m;-XX:MaxMetaspaceSize=256m;

Linux系统中tomcat的启动参数

export JAVA_OPTS="-server -Xms1400M -Xmx1400M -Xss512k -XX:+AggressiveOpts -XX:+UseBiasedLocking -XX:PermSize=128M -XX:MaxPermSize=256M -XX:+DisableExplicitGC -XX:MaxTenuringThreshold=31 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC  -XX:+CMSParallelRemarkEnabled -XX:+UseCMSCompactAtFullCollection -XX:LargePageSizeInBytes=128m  -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -Djava.awt.headless=true "

Windows系统中tomcat的启动参数

set JAVA_OPTS=-server -Xms1400M -Xmx1400M -Xss512k -XX:+AggressiveOpts -XX:+UseBiasedLocking -XX:PermSize=128M

-XX:MaxPermSize=256M -XX:+DisableExplicitGC -XX:MaxTenuringThreshold=31 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC 

-XX:+CMSParallelRemarkEnabled -XX:+UseCMSCompactAtFullCollection -XX:LargePageSizeInBytes=128m 

-XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -Djava.awt.headless=true

<Connector port="8080" protocol="HTTP/1.1"

          URIEncoding="UTF-8"  minSpareThreads="25" maxSpareThreads="75"

          enableLookups="false" disableUploadTimeout="true" connectionTimeout="20000"

          acceptCount="300"  maxThreads="300" maxProcessors="1000" minProcessors="5"

          useURIValidationHack="false"

          compression="on" compressionMinSize="2048"

         compressableMimeType="text/html,text/xml,text/javascript,text/css,text/plain"

          redirectPort="8443"

/>

# OS specific support.  $var _must_ be set to either true or false. export JAVA_OPTS="-server -Xms1400M -Xmx1400M -Xss512k -XX:+AggressiveOpts -XX:+UseBiasedLocking -XX:MetaspaceSize=200m -XX:MaxMetaspaceSize=256m  -XX:+DisableExplicitGC -XX:MaxTenuringThreshold=15 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC  -XX:+CMSParallelRemarkEnabled -XX:+UseCMSCompactAtFullCollection -XX:LargePageSizeInBytes=128m  -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -Djava.awt.headless=true "  
阅读更多
上一篇安装RPM包或者安装源码包
博主设置当前文章不允许评论。

没有更多推荐了,返回首页

关闭
关闭
关闭