免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 45116 | 回复: 72
打印 上一主题 下一主题

请大家公布一下自己的apache压力测试成绩 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-01-27 10:55 |只看该作者 |正序浏览
请大家按照如下测试:
测试脚本index.php内容为:
<?php
phpinfo();
?>;

用10000个连接,200个并发连接测试:

ab -n 10000 -c 200 http://localhost/index.php

这是我的服务器的成绩:
Server Software: Apache/1.3.27
Server Hostname: localhost
Server Port: 80

Document Path: /index.php
Document Length: 37636 bytes

Concurrency Level: 200
Time taken for tests: 98.909 seconds
Complete requests: 10000
Failed requests: 0
Broken pipe errors: 0
Total transferred: 382272248 bytes
HTML transferred: 380449928 bytes
Requests per second: 101.10 [#/sec] (mean)
Time per request: 1978.18 [ms] (mean)
Time per request: 9.89 [ms] (mean, across all concurrent requests)
Transfer rate: 3864.89 [Kbytes/sec] received

Connnection Times (ms)
min mean[+/-sd] median max
Connect: 1 330 535.8 299 7223
Processing: 138 1616 286.0 1608 3559
Waiting: 90 1615 287.2 1608 3558
Total: 138 1946 597.7 1886 9873

Percentage of the requests served within a certain time (ms)
50% 1886
66% 1899
75% 1924
80% 1985
90% 2195
95% 2312
98% 2713
99% 3025
100% 9873 (last request)

按照这些测试,才有可比性,当然还有其他原因,但总不能苛求一样。

我的硬件为:
PII 333MHz , 288MB RAM , 3.2GB IDE HD , 2M ADSL

这样测试不是让大家互相攀比或者玩benchmark数字游戏,说实在话,这些测试数值没有很大的意义,只作为一些参考,也不值得炫耀,主要是让大家了解以下自己机器的性能,条件允许的话优化一下,对我们也是有好处的,至少可以学到一点东西。

论坛徽章:
0
73 [报告]
发表于 2009-04-15 18:19 |只看该作者
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 (be patient)

Server Software:        Apache/2.2.3
Server Hostname:        127.0.0.1
Server Port:            80
Document Path:          /index.php
Document Length:        1299 bytes
Concurrency Level:      200
Time taken for tests:   9.892619 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Non-2xx responses:      10000
Total transferred:      15200000 bytes
HTML transferred:       12990000 bytes
Requests per second:    1010.85 [#/sec] (mean)
Time per request:       197.852 [ms] (mean)
Time per request:       0.989 [ms] (mean, across all concurrent requests)
Transfer rate:          1500.41 [Kbytes/sec] received
Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    1  67.0      0    3000
Processing:     6  171 727.7     85    9875
Waiting:        6  170 727.7     84    9875
Total:          6  173 731.9     85    9891
Percentage of the requests served within a certain time (ms)
  50%     85
  66%     88
  75%     90
  80%     91
  90%     99
  95%    105
  98%   2272
  99%   2326
100%   9891 (longest request)
RAM:1024    CPU:1.6   HD:80 x 3

论坛徽章:
0
72 [报告]
发表于 2008-01-26 08:22 |只看该作者
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.141 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Finished 10000 requests


Server Software:        Apache/2.0.52
Server Hostname:        localhost
Server Port:            80

Document Path:          /cs.php
Document Length:        37332 bytes

Concurrency Level:      200
Time taken for tests:   51.395183 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Total transferred:      378728704 bytes
HTML transferred:       376981356 bytes
Requests per second:    194.57 [#/sec] (mean)
Time per request:       1027.904 [ms] (mean)
Time per request:       5.140 [ms] (mean, across all concurrent requests)
Transfer rate:          7196.24 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        4  267 813.2    207   21043
Processing:   147  745 195.2    703    1970
Waiting:       12  324 200.3    249    1544
Total:        300 1012 844.3    895   21956

Percentage of the requests served within a certain time (ms)
  50%    895
  66%    986
  75%   1065
  80%   1134
  90%   1341
  95%   1523
  98%   1662
  99%   1785
100%  21956 (longest request)

论坛徽章:
0
71 [报告]
发表于 2008-01-26 05:39 |只看该作者
主机 Debian4.0r2(p4-2.4G 512M 80G-ide) + vmware6(FreeBSD6.3 mem=64M)
FreeBSD里装了mysql5.1.22+apache2.2.8(worker)+php5.2.5

测试结果:

# ab -n 10000 -c 200 http://localhost/index.html
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Finished 10000 requests


Server Software:        Apache/2.2.8
Server Hostname:        localhost
Server Port:            80

Document Path:          /index.html
Document Length:        44 bytes

Concurrency Level:      200
Time taken for tests:   20.120321 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Total transferred:      3250000 bytes
HTML transferred:       440000 bytes
Requests per second:    497.01 [#/sec] (mean)
Time per request:       402.406 [ms] (mean)
Time per request:       2.012 [ms] (mean, across all concurrent requests)
Transfer rate:          157.70 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   1.8      0      51
Processing:    81  396 531.8    288    5398
Waiting:       44  306 441.7    236    5179
Total:         81  396 532.5    288    5399

Percentage of the requests served within a certain time (ms)
  50%    288
  66%    324
  75%    334
  80%    345
  90%    403
  95%    504
  98%   2638
  99%   3842
100%   5399 (longest request)

[ 本帖最后由 charles73 于 2008-1-26 05:44 编辑 ]

论坛徽章:
0
70 [报告]
发表于 2008-01-24 00:12 |只看该作者
Server Software:        Apache/2.2.3
Server Hostname:        www.inlife.cn
Server Port:            80

Document Path:          /index.htm
Document Length:        29481 bytes

Concurrency Level:      200
Time taken for tests:   65.551555 seconds
Complete requests:      10000
Failed requests:        10
   (Connect: 10, Length: 0, Exceptions: 0)
Write errors:           0
Total transferred:      298377624 bytes
HTML transferred:       295163772 bytes
Requests per second:    152.55 [#/sec] (mean)
Time per request:       1311.031 [ms] (mean)
Time per request:       6.555 [ms] (mean, across all concurrent requests)
Transfer rate:          4445.11 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0  321 501.5    322    6610
Processing:   231  979 203.5   1027    1532
Waiting:        0   14 109.2      0    1417
Total:        233 1301 516.2   1370    7531

Percentage of the requests served within a certain time (ms)
  50%   1370
  66%   1377
  75%   1383
  80%   1387
  90%   1412
  95%   1453
  98%   1500
  99%   1560
100%   7531 (longest request)

论坛徽章:
0
69 [报告]
发表于 2008-01-17 02:32 |只看该作者
host# ./ab -n 10000 -c 200 http://127.0.0.1/index.php
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 127.0.0.1 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Finished 10000 requests


Server Software:        Apache/2.0.61
Server Hostname:        127.0.0.1
Server Port:            80

Document Path:          /index.php
Document Length:        41106 bytes

Concurrency Level:      200
Time taken for tests:   38.279458 seconds
Complete requests:      10000
Failed requests:        23
   (Connect: 0, Length: 23, Exceptions: 0)
Write errors:           0
Total transferred:      412869885 bytes
HTML transferred:       411059885 bytes
Requests per second:    261.24 [#/sec] (mean)
Time per request:       765.589 [ms] (mean)
Time per request:       3.828 [ms] (mean, across all concurrent requests)
Transfer rate:          10532.88 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.9      0      19
Processing:   224  747 101.6    726    1396
Waiting:       32  466 180.7    453    1240
Total:        224  747 101.7    726    1396

Percentage of the requests served within a certain time (ms)
  50%    726
  66%    743
  75%    766
  80%    790
  90%    826
  95%    871
  98%   1148
  99%   1169
100%   1396 (longest request)

论坛徽章:
0
68 [报告]
发表于 2007-12-29 16:11 |只看该作者
vm虚拟机环境内存是128M 主机是cpu P4 2.66

/service/httpd/bin/ab  -n 10000 -c 200 http://192.168.108.204/index.html
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking 192.168.108.204 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Finished 10000 requests

Server Software:        Apache/2.2.6
Server Hostname:        192.168.108.204
Server Port:            80
Document Path:          /index.html
Document Length:        63 bytes
Concurrency Level:      200
Time taken for tests:   12.723663 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Total transferred:      3130626 bytes
HTML transferred:       630126 bytes
Requests per second:    785.94 [#/sec] (mean)
Time per request:       254.473 [ms] (mean)
Time per request:       1.272 [ms] (mean, across all concurrent requests)
Transfer rate:          240.26 [Kbytes/sec] received
Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0   13 158.8      2    3034
Processing:     0  170 515.0    113   12665
Waiting:        0  156 515.2    103   12664
Total:         50  184 546.2    115   12721
Percentage of the requests served within a certain time (ms)
  50%    115
  66%    134
  75%    153
  80%    162
  90%    190
  95%    225
  98%    422
  99%   1659
100%  12721 (longest request)

[ 本帖最后由 xueleixu 于 2007-12-29 16:13 编辑 ]

论坛徽章:
0
67 [报告]
发表于 2007-12-29 11:30 |只看该作者
Document Path:          /phpinfo.php
Document Length:        26877 bytes
Concurrency Level:      200
Time taken for tests:   68.232929 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Total transferred:      271010000 bytes
HTML transferred:       268770000 bytes
Requests per second:    146.56 [#/sec] (mean)
Time per request:       1364.659 [ms] (mean)
Time per request:       6.823 [ms] (mean, across all concurrent requests)
Transfer rate:          3878.74 [Kbytes/sec] received
Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0   49 638.6      0   10457
Processing:    58 1307 883.3    749    5664
Waiting:        0  589 572.8    405    4498
Total:         58 1357 1199.1    749   15084
Percentage of the requests served within a certain time (ms)
  50%    749
  66%   1601
  75%   2106
  80%   2113
  90%   2144
  95%   2858
  98%   4755
  99%   5033
100%  15084 (longest request)


硬件 p e2140 1G内存 上跑虚拟机 分配内存400M

论坛徽章:
1
IT运维版块每日发帖之星
日期:2016-07-05 06:20:00
66 [报告]
发表于 2007-12-27 16:14 |只看该作者
Server Software:        Apache/2.0.59
Server Port:            80

Document Path:          /info.php
Document Length:        41342 bytes

Concurrency Level:      200
Time taken for tests:   22.931590 seconds
Complete requests:      10000
Failed requests:        139
   (Connect: 0, Length: 139, Exceptions: 0)
Write errors:           0
Total transferred:      415619305 bytes
HTML transferred:       413419305 bytes
Requests per second:    436.08 [#/sec] (mean)
Time per request:       458.632 [ms] (mean)
Time per request:       2.293 [ms] (mean, across all concurrent requests)
Transfer rate:          17699.51 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.8      0      10
Processing:    32  455  94.7    441    1080
Waiting:       24  292 116.6    268     968
Total:         32  455  94.8    442    1080

Percentage of the requests served within a certain time (ms)
  50%    442
  66%    449
  75%    471
  80%    489
  90%    520
  95%    603
  98%    682
  99%    922
100%   1080 (longest request)

论坛徽章:
0
65 [报告]
发表于 2007-12-27 11:03 |只看该作者
Server Software:        Apache/2.2.6
Server Hostname:        localhost
Server Port:            80

Document Path:          /index.php
Document Length:        44906 bytes

Concurrency Level:      200
Time taken for tests:   81.586736 seconds
Complete requests:      10000
Failed requests:        203
   (Connect: 0, Length: 203, Exceptions: 0)
Write errors:           0
Total transferred:      451448985 bytes
HTML transferred:       449058985 bytes
Requests per second:    122.57 [#/sec] (mean)
Time per request:       1631.735 [ms] (mean)
Time per request:       8.159 [ms] (mean, across all concurrent requests)
Transfer rate:          5403.67 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0   49 624.1      0    9443
Processing:    80 1577 682.6   1463    6750
Waiting:        0  707 612.5    667    5087
Total:         80 1626 984.4   1463   14058

Percentage of the requests served within a certain time (ms)
  50%   1463
  66%   1467
  75%   1479
  80%   1500
  90%   1685
  95%   2628
  98%   5411
  99%   6025
100%  14058 (longest request)
/////有什么用意么?
  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP