Tomcat连接参数的优化,主要是针对吞吐量做优化

Tomcat连接参数的优化,主要是针对吞吐量做优化:

修改conf/server.xml文件,把原来

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

改为:

<Connector port="8080" protocol="HTTP/1.1"
URIEncoding="UTF-8"
useBodyEncodingForURI="true"
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"/>

posted @ 2017-01-11 20:51  小葱拌豆腐~  阅读(1781)  评论(0编辑  收藏  举报