免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 45068 | 回复: 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数字游戏,说实在话,这些测试数值没有很大的意义,只作为一些参考,也不值得炫耀,主要是让大家了解以下自己机器的性能,条件允许的话优化一下,对我们也是有好处的,至少可以学到一点东西。

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
2 [报告]
发表于 2003-01-27 16:22 |只看该作者

请大家公布一下自己的apache压力测试成绩

This is ApacheBench, Version 1.3d <$Revision: 1.67 $>; apache-1.3
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)
Server Software:        Apache/1.3.27                                      
Server Hostname:        localhost
Server Port:            80

Document Path:          /phpinfo.php
Document Length:        53671 bytes

Concurrency Level:      50
Time taken for tests:   71.366 seconds
Complete requests:      1000
Failed requests:        0
Broken pipe errors:     0
Total transferred:      55585683 bytes
HTML transferred:       55397912 bytes
Requests per second:    14.01 [#/sec] (mean)
Time per request:       3568.30 [ms] (mean)
Time per request:       71.37 [ms] (mean, across all concurrent requests)
Transfer rate:          778.88 [Kbytes/sec] received

Connnection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0   331  258.3    279  1042
Processing:    64  3071 1078.7   3044  7454
Waiting:        0  3018 1083.5   2984  7452
Total:         64  3402 1058.9   3405  7671

Percentage of the requests served within a certain time (ms)
  50%   3405
  66%   3465
  75%   3570
  80%   3645
  90%   4570
  95%   5418
  98%   6099
  99%   6399
100%   7671 (last request)

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
3 [报告]
发表于 2003-01-27 16:25 |只看该作者

请大家公布一下自己的apache压力测试成绩

不一样的,装得模块多少会引起phpinfo()函数的返回结果大小不一样,我的就很大

论坛徽章:
0
4 [报告]
发表于 2003-01-27 18:55 |只看该作者

请大家公布一下自己的apache压力测试成绩

这是freebsd 4.5下的结果

机器 p4 1.7G 256M RAM

vodsvr# ./ab -n 10000 -c 200 http://localhost/index.php
This is ApacheBench, Version 1.3d <$Revision: 1.67 $>; apache-1.3
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

Test aborted after 10 failures

: Bad file descriptor
vodsvr#

这是redhat advanced server 2.1下的结果
机器 p3 1G 256M RAM

oapro bin]$ ./ab -n 10000 -c 200 http://localhost/index.php
This is ApacheBench, Version 1.3d <$Revision: 1.67 $>; apache-1.3
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/1.3.27                                      
Server Hostname:        localhost
Server Port:            80

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

Concurrency Level:      200
Time taken for tests:   34.958 seconds
Complete requests:      10000
Failed requests:        0
Broken pipe errors:     0
Total transferred:      465789460 bytes
HTML transferred:       464118010 bytes
Requests per second:    286.06 [#/sec] (mean)
Time per request:       699.16 [ms] (mean)
Time per request:       3.50 [ms] (mean, across all concurrent requests)
Transfer rate:          13324.26 [Kbytes/sec] received

Connnection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0   122  254.3    107  3506
Processing:    38   566  246.2    534  4126
Waiting:       26   565  246.3    533  4125
Total:         38   688  462.8    661  7145

Percentage of the requests served within a certain time (ms)
  50%    661
  66%    666
  75%    675
  80%    676
  90%    720
  95%    865
  98%    932
  99%    964
100%   7145 (last request)

怎么这么郁闷啊,freebsd 下的还不如linux

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
5 [报告]
发表于 2003-01-27 19:49 |只看该作者

请大家公布一下自己的apache压力测试成绩

rh的速度真的好快呀!
分析分析怎么回事?

论坛徽章:
0
6 [报告]
发表于 2003-01-28 09:09 |只看该作者

请大家公布一下自己的apache压力测试成绩

再来一个

redhat 6.2 下
机器 p3 1G 256M ram

./ab -n 10000 -c 200 http://isvr/index.php            
This is ApacheBench, Version 1.3d <$Revision: 1.67 $>; apache-1.3
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 isvr (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/1.3.27                                      
Server Hostname:        isvr
Server Port:            80

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

Concurrency Level:      200
Time taken for tests:   40.448 seconds
Complete requests:      10000
Failed requests:        0
Broken pipe errors:     0
Total transferred:      437878596 bytes
HTML transferred:       436204011 bytes
Requests per second:    247.23 [#/sec] (mean)
Time per request:       808.96 [ms] (mean)
Time per request:       4.04 [ms] (mean, across all concurrent requests)
Transfer rate:          10825.72 [Kbytes/sec] received

Connnection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    61   36.4     62   193
Processing:    45   736  667.7    701  9557
Waiting:       29   735  667.7    700  9556
Total:         45   797  667.1    784  9588

Percentage of the requests served within a certain time (ms)
  50%    784
  66%    799
  75%    816
  80%    824
  90%    854
  95%    878
  98%    907
  99%    953
100%   9588 (last request)


redhat 7.2 下
机器 p4 1.7G  512M ram

./ab -n 10000 -c 200 http://localhost/index.php
This is ApacheBench, Version 1.3d <$Revision: 1.67 $>; apache-1.3
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/1.3.27                                      
Server Hostname:        localhost
Server Port:            80

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

Concurrency Level:      200
Time taken for tests:   33.286 seconds
Complete requests:      10000
Failed requests:        0
Broken pipe errors:     0
Total transferred:      440673016 bytes
HTML transferred:       439003051 bytes
Requests per second:    300.43 [#/sec] (mean)
Time per request:       665.72 [ms] (mean)
Time per request:       3.33 [ms] (mean, across all concurrent requests)
Transfer rate:          13238.99 [Kbytes/sec] received

Connnection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    60  261.2     28  3044
Processing:    24   596  577.6    572 12899
Waiting:        8   596  577.6    571 12898
Total:         24   656  780.2    620 15899

Percentage of the requests served within a certain time (ms)
  50%    620
  66%    648
  75%    657
  80%    663
  90%    687
  95%    709
  98%    732
  99%    799
100%  15899 (last request)

论坛徽章:
0
7 [报告]
发表于 2003-01-28 09:17 |只看该作者

请大家公布一下自己的apache压力测试成绩

再来跌下眼镜:

SUN E4000 512M ram 4CPU*166MHZ
solaris 7系统

./ab -n 10000 -c 200 http://localhost/index.php
This is ApacheBench, Version 1.3d <$Revision: 1.59 $>; apache-1.3
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)

Test aborted after 10 failures

: Bad file number

solaris下竟然是这个结果。

论坛徽章:
0
8 [报告]
发表于 2003-01-28 09:27 |只看该作者

请大家公布一下自己的apache压力测试成绩

阿勒,  你的p4 1.7G 256M RAM 和SUN E4000 居然是: Bad file number ??  连200个并发连接都不行? 但你的p3 1G 256M RAM
相当不错,Requests per second: 286.06 [#/sec] (mean) ,Transfer rate: 13324.26 [Kbytes/sec] received 。

你在使用上觉得RedHat Adserver和普通版的有什么不同?

论坛徽章:
0
9 [报告]
发表于 2003-01-28 09:41 |只看该作者

请大家公布一下自己的apache压力测试成绩

并不觉得有什么不同。
只是,redhat as那台机器上没有安装其他东西,而其他的除freebsd外的机器上都安装有informix数据库9.21版。
我怀疑sun e4000的数据不准确,或许是和该机器上的informix负载较重有关。但是freebsd下的测试结果实在是出乎我的意料。

除sun外,其他机器都没有进行专门的性能调谐,都是使用的默认安装后的版本。由此可见,redhat as在默认情况下就对企业应用进行了配置。

论坛徽章:
0
10 [报告]
发表于 2003-01-28 10:18 |只看该作者

请大家公布一下自己的apache压力测试成绩

Sun e4000的问题可能跟informix负载有关。
我未用过redhat adserver,想象中它应该是经过优化的。

但我最不明白的是,你的FreeBSD机器怎么会这样呢?我去年一直也是用4.5的,也没有这样的情况,测试结果跟我现在用的4.7差不多。
按你的硬件配置,得出的结果至少不会这样,我也是默认配置没有经过优化的。你的FreeBSD负载重吗?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP