用户工具

站点工具


侧边栏

1.bi与可视化saca.dataviz:8运维:8.6tomcat8性能优化参考配置项

8.6 Tomcat8性能优化参考配置项

例如系统内存为4GB,可在Tomcat/bin/catalina.sh中加入如下配置:

JAVA_OPTS="-server 
-Djava.awt.headless=true 
-Xms2048m -Xmx2048m -Xss512k 
-XX:NewSize=128m 
-XX:MaxNewSize=512m 
-XX:PermSize=128M 
-XX:MaxPermSize=256M 
-XX:+UseConcMarkSweepGC
-XX:+AggressiveOpts 
-XX:+UseBiasedLocking 
-XX:+DisableExplicitGC 
-XX:MaxTenuringThreshold=10 
-XX:+UseParNewGC  
-XX:+CMSParallelRemarkEnabled 
-XX:+UseCMSCompactAtFullCollection 
-XX:LargePageSizeInBytes=128m  
-XX:+UseFastAccessorMethods 
-XX:+UseCMSInitiatingOccupancyOnly  
-XX:+CMSIncrementalMode"

Tomcat/conf/server.xml 修改如下配置:

<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,application/json"
    redirectPort="8443"
/>

/var/www/html-133/wiki/data/pages/1.bi与可视化saca.dataviz/8运维/8.6tomcat8性能优化参考配置项.txt · 最后更改: 2020/09/23 09:25 由 admin