码迷,mamicode.com
首页 > 其他好文 > 详细

亲们,你们的tomcat并发能到多少?

时间:2014-08-18 18:59:13      阅读:309      评论:0      收藏:0      [点我收藏+]

标签:style   http   color   java   os   io   for   ar   

配置: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

<Connector port="7080" protocol="org.apache.coyote.http11.Http11NioProtocol"
               connectionTimeout="20000"
               redirectPort="7443" 
               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 <$Revision: 655654 $>
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 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        Apache-Coyote/1.1
Server Hostname:        192.168.xx.xxx
Server Port:            7080

Document Path:          /jfinalBeetl
Document Length:        327 bytes

Concurrency Level:      50
Time taken for tests:   0.656 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Non-2xx responses:      1000
Total transferred:      146000 bytes
HTML transferred:       0 bytes
Requests per second:    1523.81 [#/sec] (mean)
Time per request:       32.813 [ms] (mean)
Time per request:       0.656 [ms] (mean, across all concurrent requests)
Transfer rate:          217.26 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   2.6      0      16
Processing:     0   32   6.3     31      47
Waiting:        0   20  11.2     16      47
Total:          0   32   6.4     31      47

Percentage of the requests served within a certain time (ms)
  50%     31
  66%     31
  75%     31
  80%     31
  90%     47
  95%     47
  98%     47
  99%     47
 100%     47 (longest request)


未采用beetl,apache ab测试结果:

D:\tools\Apache2.2\bin>ab -n 1000 -c 50 http://192.168.xx.xxx:7080/Root
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
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 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        Apache-Coyote/1.1
Server Hostname:        192.168.xx.xxx
Server Port:            7080

Document Path:          /Root
Document Length:        11430 bytes

Concurrency Level:      50
Time taken for tests:   1.297 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      11571000 bytes
HTML transferred:       11430000 bytes
Requests per second:    771.08 [#/sec] (mean)
Time per request:       64.844 [ms] (mean)
Time per request:       1.297 [ms] (mean, across all concurrent requests)
Transfer rate:          8713.10 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    1   4.1      0      16
Processing:    16   62   9.7     63      94
Waiting:        0   29  18.1     31      78
Total:         16   63   9.5     63      94

Percentage of the requests served within a certain time (ms)
  50%     63
  66%     63
  75%     63
  80%     63
  90%     78
  95%     78
  98%     78
  99%     78
 100%     94 (longest request)


麻,再改进一下,估计能到2000多,曾听某网友说,调优后的tomcat项目能到3000,不知道是怎么做的。。。

哪位亲给说说。。。

亲们,你们的tomcat并发能到多少?,布布扣,bubuko.com

亲们,你们的tomcat并发能到多少?

标签:style   http   color   java   os   io   for   ar   

原文地址:http://my.oschina.net/tangcoffee/blog/303865

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!