- 爱易网页
-
Access教程
- Tomcat5每秒最多并发60解决方案
日期:2014-05-17 浏览次数:20960 次
Tomcat5每秒最多并发60
服务器配置:
操作系统:windows 2003 32位
CPU: 2颗4核Intel(R) Xeon(R) CPU E5410 @ 2.33GHz 32位
内存: 12G
Tomcat : 5
Tomcat配置:
<Connector port="8001" maxHttpHeaderSize="8192" URIEncoding="UTF-8"
maxThreads="1500" minSpareThreads="250" maxSpareThreads="750"
enableLookups="false" redirectPort="8443" acceptCount="1000"
connectionTimeout="20000" disableUploadTimeout="true" />
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009"
enableLookups="false" redirectPort="8443" protocol="AJP/1.3" URIEncoding="UTF-8"
minSpareThreads="200" maxSpareThreads="2000"
maxThreads="2000" connectionTimeout="60000"/>
我在自己电脑上测服务器并发
C:\Program Files\Apache Group\Apache2\bin>ab -n 1000 -c 60 http://www.mytomcat.cn/
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking www.mytomcat.cn (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
Finished 1000 requests
Server Software: Apache-Coyote/1.1
Server Hostname: www.mytomcat.cn
Server Port: 80
Document Path: /
Document Length: 154468 bytes
Concurrency Level: 60
Time taken for tests: 134.593750 seconds
Complete requests: 1000
Failed requests: 3
(Connect: 3, Length: 0, Exceptions: 0)
Write errors: 0
Total transferred: 154674000 bytes
HTML transferred: 154468000 bytes
Requests per second: 7.43 [#/sec] (mean)
Time per request: 8075.625 [ms] (mean)
Time per request: 134.594 [ms] (mean, across all concurrent requests)
Transfer rate: 1122.25 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 68 699.4 15 9046
Processing: 31 7919 12149.5 844 51813
Waiting: 0 3764 9156.9 328 30656
Total: 46 7988 12189.6 859 51828
Percentage of the requests served within a certain time (ms)
50% 859
66% 906
75% 12703
80% 24750
90% 30781
95% 30812
98% 33656
99% 33718
100% 51828 (longest request)
C:\Program Files\Apache Group\Apache2\bin>ab -n 1000 -c 70 http://www.mytomcat.cn/
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking www.mytomcat.cn (be patient)
apr_pollset_create failed: Invalid argument (22)
能不能并发再高点~?~?
------解决方案--------------------
1. 你压的网站的首页么?如果是,压一个小的静态文件试试;
2. 在另一台机器上压;
------解决方案--------------------