tomcat9调优

2019-04-08  本文已影响0人  cf6bfeab5260

官方网站

把大象装进冰箱需要几个步骤:

  1. 修改catalina.sh:
    jdk7以及jdk7以下:
JAVA_OPTS="$JAVA_OPTS -server -Xms2048m -Xmx2048m -XX:PermSize=256m -XX:MaxPermSize=256m -Djava.awt.headless=true -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/path"

jdk8以及jdk8以上

JAVA_OPTS="$JAVA_OPTS -server -Xms2048m -Xmx2048m -Djava.awt.headless=true -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/path"

说明:

  1. 更改server.xml
<Connector
port="8080"  
protocol="org.apache.coyote.http11.Http11NioProtocol" 
enableLookups="false"            
maxThreads="1000"               
minSpareThreads="100"                            
acceptCount="5000"               
disableUploadTimeout="true"              
connectionTimeout="30000"               
URIEncoding="UTF-8"                           
redirectPort="8443"               
compression="on"              
compressionMinSize="1024" 
useSendfile="false"
noCompressionUserAgents="gozilla, traviata"            
compressibleMimeType="text/html,text/xml,text/plain,text/css,text/javascript,application/javascript "   />

说明:

上一篇 下一篇

猜你喜欢

热点阅读