Tomcat7 优化到7000每秒

硬件信息
双cpu,4核 16线程 8g内存
Intel(R) Xeon(R) CPU           E5620  @ 2.40GHz
 Tomcat 7.0.64
  jdk1.6
  httperf
 用tomcat的线程池
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
        maxThreads="20000" minSpareThreads="4"/>

<Connector executor="tomcatThreadPool"
               port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               minProcessors="7000"
               maxProcessors="10000"
               acceptCount="100000"
               redirectPort="8443" />
  结果
[root@localhost ROOT]# httperf --server 127.0.0.1   --port=8080 --uri=/index.jsp  --rate=7000  --num-conns=7000 --num-calls=1
httperf --client=0/1 --server=127.0.0.1 --port=8080 --uri=/index.jsp --rate=7000 --send-buffer=4096 --recv-buffer=16384 --num-conns=7000 --num-calls=1
httperf: warning: open file limit > FD_SETSIZE; limiting max. # of open files to FD_SETSIZE
Maximum connect burst length: 18

Total: connections 7000 requests 7000 replies 7000 test-duration 1.001 s

Connection rate: 6996.4 conn/s (0.1 ms/conn, <=100 concurrent connections)
Connection time [ms]: min 0.3 avg 1.1 max 14.2 median 0.5 stddev 1.4
Connection time [ms]: connect 0.2
Connection length [replies/conn]: 1.000

Request rate: 6996.4 req/s (0.1 ms/req)
Request size [B]: 71.0

Reply rate [replies/s]: min 0.0 avg 0.0 max 0.0 stddev 0.0 (0 samples)
Reply time [ms]: response 0.8 transfer 0.1
Reply size [B]: header 155.0 content 11398.0 footer 2.0 (total 11555.0)
Reply status: 1xx=0 2xx=7000 3xx=0 4xx=0 5xx=0

CPU time [s]: user 0.07 system 0.51 (user 6.6% system 51.0% total 57.6%)
Net I/O: 79420.4 KB/s (650.6*10^6 bps)
 
 
 

你可能感兴趣的:(Tomcat7 优化到7000每秒)