TA的每日心情 | 无聊 2017-9-11 09:15 |
---|
签到天数: 224 天 [LV.7]常住居民III
|
关于性能测试,有2个疑问一直困惑了好久, 哪位牛人给解释下啊
测试用tomcat安装后默认的主页面,
1. 用不同的工具,测试结果不一样, 同一工具测试的结果有时也不一样
server 配置: 1核心 1G 内存, tomcat6
maxthreads,acceptCount 值为默认值,测试结果如下:
maxthreads+acceptCount 应该代表了能接受的最大并发访问量, 默认为200+100 =300
按理,应该在300个并发访问的时候, http_load应该不会显示出错才对啊, 结果在180个并发时就出现了错(“bad byte counts”)
2. 在4核心, 4G内存的server上, 测试到的性能(能接受的最大并发访问量),似乎与1核1G内存的server比,没有太大变化?
---------测试输出-----
[root@i-vyyaz6i1 ~]# http_load -p 180 -s 30 -v uri
http://121.201.63.133:8080/: byte count wrong
http://121.201.63.133:8080/: byte count wrong
1490 fetches, 180 max parallel, 1.1657e+07 bytes, in 30.0001 seconds
7823.48 mean bytes/connection
49.6665 fetches/sec, 388566 bytes/sec
msecs/connect: 197.334 mean, 2201.22 max, 0.42 min
msecs/first-response: 670.052 mean, 11131.6 max, 0.684 min
2 bad byte counts <----180个并发时, http_load显示有错
HTTP response codes:
code 200 -- 1488
[root@i-vyyaz6i1 ~]# cat uri
http://121.201.63.133:8080/
[root@i-vyyaz6i1 ~]# ab -c 180 -t 30 http://121.201.63.133:8080/
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 121.201.63.133 (be patient)
Finished 1488 requests
Server Software: Apache-Coyote/1.1
Server Hostname: 121.201.63.133
Server Port: 8080
Document Path: /
Document Length: 7834 bytes
Concurrency Level: 180
Time taken for tests: 30.041 seconds
Complete requests: 1488
Failed requests: 0 <-----180个并发时, ab显示没有错
Write errors: 0
Total transferred: 12965925 bytes
HTML transferred: 12561092 bytes
Requests per second: 49.53 [#/sec] (mean)
Time per request: 3633.994 [ms] (mean)
Time per request: 20.189 [ms] (mean, across all concurrent requests)
Transfer rate: 421.49 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 3 164 219.1 118 1198
Processing: 70 2585 3988.6 580 26474
Waiting: 3 854 2488.6 132 15535
Total: 93 2750 3980.6 796 26515
Percentage of the requests served within a certain time (ms)
50% 796
66% 2789
75% 3252
80% 3632
90% 5433
95% 16231
98% 16469
99% 16523
100% 26515 (longest request)
[root@i-vyyaz6i1 ~]#
|
|