tomcat8.5性能优化
主要是按照两篇文章,部分参数因适配Tomcat8.5进行了调整
一、有关 JAVA_OPTS
http://www.open-open.com/lib/view/open1401931407228.html
文中的PermSize、MaxPermSize已经不用要去掉,MaxTenuringThreshold最大只能为15
调整后为:
set JAVA_OPTS= -server -Xms1000M -Xmx1000M #-Xms与-Xmx设成一样的值,避免JVM因为频繁的GC导致性能大起大落 -Xss512k -XX:+AggressiveOpts -XX:+UseBiasedLocking -XX:+DisableExplicitGC -XX:MaxTenuringThreshold=15 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSCompactAtFullCollection -XX:LargePageSizeInBytes=128m -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -Djava.awt.headless=true
二、Connector
http://blog.csdn.net/centre10/article/details/50639693
实测可用
<Connector port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol" maxHttpHeaderSize="8192" maxThreads="1000" minSpareThreads="100" maxSpareThreads="1000" minProcessors="100" maxProcessors="1000" enableLookups="false" compression="on" compressionMinSize="1024" noCompressionUserAgents="gozilla, traviata" compressableMimeType="text/html,text/xml,text/javascript,text/css,text/plain" connectionTimeout="25000" URIEncoding="utf-8" acceptCount="1000" redirectPort="8443" disableUploadTimeout="true" />
本文转自:https://blog.csdn.net/wangfei0904306/article/details/59741236