配置:Intel Xeon E5 2.4G*6核,16G内存,Redhat Linux X64,jdk 7(server),tomcat 8.9
改了tomcat 内存配置,开启了nio+epoll,结果仍不好看。。。
vi bin/catalina.sh
CATALINA_OPTS='-Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.EPollSelectorProvider'
JAVA_OPTS= -Xms800M -Xmx1500M -XX:PermSize=128M -XX:MaxPermSize=300M
vi conf/server.xml
connectionTimeout="20000"
redirectPort="7443"
acceptorThreadCount="6"
acceptCount="800"
maxThreads="400"
compression="on"
compressionMinSize="2048"
noCompressionUserAgents="gozilla,traviata"
compressableMimeType="text/html,text/xml,text/javascript,text/css,text/plain"/>
采用jfinal+beetl模板,apache ab压力测试结果:
D:\tools\Apache2.2\bin>ab -n 1000 -c 50 http://192.168.xx.xxx:7080/jfinalBeetl
This is ApacheBench, Version 2.3
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 192.168.xx.xxx (