免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: 葱头
打印 上一主题 下一主题

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

论坛徽章:
0
21 [报告]
发表于 2007-03-02 14:07 |只看该作者
www# uname -v | awk '{print $1 $2}' ; dmesg | sed -n -e '/CPU/p' -e '/real memory/p' -e '/da0/p' ; ab -c 200 -n 10000 http://127.0.0.1/test/phpinfo.php ; vmstat

FreeBSD6.1-RELEASE
CPU: Intel Pentium III (927.11-MHz 686-class CPU)
real memory  = 268369920 (255 MB)
cpu0: <ACPI CPU> on acpi0
da0 at ahc0 bus 0 target 0 lun 0
da0: <SEAGATE ST39173W SUN9.0G 5084> Fixed Direct Access SCSI-2 device
da0: 40.000MB/s transfers (20.000MHz, offset 15, 16bit), Tagged Queueing Enabled
da0: 8637MB (17689267 512 byte sectors: 255H 63S/T 1101C)
Trying to mount root from ufs:/dev/da0s1a
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)
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.3
Server Hostname:        127.0.0.1
Server Port:            80

Document Path:          /test/phpinfo.php
Document Length:        42075 bytes

Concurrency Level:      200
Time taken for tests:   22.365158 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Total transferred:      424280000 bytes
HTML transferred:       420750000 bytes
Requests per second:    447.12 [#/sec] (mean)
Time per request:       447.303 [ms] (mean)
Time per request:       2.237 [ms] (mean, across all concurrent requests)
Transfer rate:          18525.91 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.1      0       3
Processing:   118  443  34.4    444     541
Waiting:       58  180  64.9    215     304
Total:        118  443  34.4    444     541

Percentage of the requests served within a certain time (ms)
  50%    444
  66%    449
  75%    454
  80%    455
  90%    459
  95%    475
  98%    515
  99%    524
100%    541 (longest request)
procs      memory      page                    disks     faults      cpu
r b w     avm    fre  flt  re  pi  po  fr  sr da0 pa0   in   sy  cs us sy id
2 1 0  132632 143892   69   0   1   0  51   0   0   0  796 2259 1788  4  4 92

论坛徽章:
0
22 [报告]
发表于 2007-03-03 17:53 |只看该作者
  1. # ab -n 10000 -c 200 http://localhost/phpinfo.php
  2. This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
  3. Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
  4. Copyright 1997-2005 The Apache Software Foundation, http://www.apache.org/

  5. Benchmarking localhost (be patient)
  6. Completed 1000 requests
  7. Completed 2000 requests
  8. Completed 3000 requests
  9. Completed 4000 requests
  10. Completed 5000 requests
  11. Completed 6000 requests
  12. Completed 7000 requests
  13. Completed 8000 requests
  14. Completed 9000 requests
  15. apr_poll: The timeout specified has expired (70007)
  16. Total of 9995 requests completed
复制代码
估计是ipfw防火墙的问题,导致运行异常
  1. # ab -n 9000 -c 200 http://localhost/phpinfo.php
  2. This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
  3. Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
  4. Copyright 1997-2005 The Apache Software Foundation, http://www.apache.org/

  5. Benchmarking localhost (be patient)
  6. Completed 900 requests
  7. Completed 1800 requests
  8. Completed 2700 requests
  9. Completed 3600 requests
  10. Completed 4500 requests
  11. Completed 5400 requests
  12. Completed 6300 requests
  13. Completed 7200 requests
  14. Completed 8100 requests
  15. Finished 9000 requests


  16. Server Software:        Apache/2.2.2
  17. Server Hostname:        localhost
  18. Server Port:            80

  19. Document Path:          /phpinfo.php
  20. Document Length:        284 bytes

  21. Concurrency Level:      200
  22. Time taken for tests:   8.414356 seconds
  23. Complete requests:      9000
  24. Failed requests:        0
  25. Write errors:           0
  26. Non-2xx responses:      9000
  27. Total transferred:      4176000 bytes
  28. HTML transferred:       2556000 bytes
  29. Requests per second:    1069.60 [#/sec] (mean)
  30. Time per request:       186.986 [ms] (mean)
  31. Time per request:       0.935 [ms] (mean, across all concurrent requests)
  32. Transfer rate:          484.65 [Kbytes/sec] received

  33. Connection Times (ms)
  34.               min  mean[+/-sd] median   max
  35. Connect:        0    0   3.7      0     351
  36. Processing:    16  184 246.8     96    2573
  37. Waiting:        3  115 178.1     74    2467
  38. Total:         16  184 246.8     96    2573

  39. Percentage of the requests served within a certain time (ms)
  40.   50%     96
  41.   66%    121
  42.   75%    164
  43.   80%    185
  44.   90%    386
  45.   95%    748
  46.   98%   1051
  47.   99%   1355
  48. 100%   2573 (longest request)
复制代码

论坛徽章:
0
23 [报告]
发表于 2007-03-08 09:40 |只看该作者
ab -n 10000 -c 200 http://localhost/index.php

这是我的服务器的成绩:
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)


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

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

Concurrency Level:      200
Time taken for tests:   53.993790 seconds
Complete requests:      10000
Failed requests:        226
   (Connect: 3, Length: 223, Exceptions: 0)
Write errors:           0
Total transferred:      606748885 bytes
HTML transferred:       604828885 bytes
Requests per second:    185.21 [#/sec] (mean)
Time per request:       1079.876 [ms] (mean)
Time per request:       5.399 [ms] (mean, across all concurrent requests)
Transfer rate:          10974.00 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0   45 566.3      3    9695
Processing:    40 1029 217.4   1017    2108
Waiting:        0  273 235.3    201    1269
Total:         41 1074 626.4   1019   11287

Percentage of the requests served within a certain time (ms)
  50%   1019
  66%   1032
  75%   1041
  80%   1049
  90%   1282
  95%   1502
  98%   1679
  99%   1957
100%  11287 (longest request)

我的硬件为:
P4 3.0Hz , 2G RAM , 40G IDE HD , 1M ADSL ,
系统和软件:freebsd r6.2p2 ,软件全编译安装是最新的

论坛徽章:
0
24 [报告]
发表于 2007-03-14 13:38 |只看该作者
p4 2.4  512RAM, 默认配置

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 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.59
Server Hostname:        localhost
Server Port:            80

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

Concurrency Level:      200
Time taken for tests:   10.864753 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Non-2xx responses:      10000
Total transferred:      4900000 bytes
HTML transferred:       2960000 bytes
Requests per second:    920.41 [#/sec] (mean)
Time per request:       217.295 [ms] (mean)
Time per request:       1.086 [ms] (mean, across all concurrent requests)
Transfer rate:          440.41 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   1.0      0      67
Processing:    87  211  73.5    179     456
Waiting:        2  133  77.6    120     411
Total:         87  211  73.5    179     458

Percentage of the requests served within a certain time (ms)
  50%    179
  66%    197
  75%    227
  80%    261
  90%    344
  95%    375
  98%    404
  99%    414
100%    458 (longest request)

论坛徽章:
0
25 [报告]
发表于 2007-03-15 10:31 |只看该作者
This is ApacheBench, Version 1.3d <$Revision: 1.73 $> 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.36                                      
Server Hostname:        localhost
Server Port:            80

Document Path:          /test/phptest.php
Document Length:        22 bytes

Concurrency Level:      200
Time taken for tests:   5.942 seconds
Complete requests:      10000
Failed requests:        0
Broken pipe errors:     0
Total transferred:      3382028 bytes
HTML transferred:       220132 bytes
Requests per second:    1682.94 [#/sec] (mean)
Time per request:       118.84 [ms] (mean)
Time per request:       0.59 [ms] (mean, across all concurrent requests)
Transfer rate:          569.17 [Kbytes/sec] received

Connnection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    19  228.2      3  3381
Processing:    31    73   10.0     71   146
Waiting:        8    72   10.0     71   145
Total:         31    92  229.6     74  3486

Percentage of the requests served within a certain time (ms)
  50%     74
  66%     77
  75%     79
  80%     80
  90%     88
  95%     97
  98%    111
  99%    119
100%   3486 (last request)

论坛徽章:
0
26 [报告]
发表于 2007-03-15 13:57 |只看该作者
这不是测的apache , 而是测的apache+php
另外测试之前访问一下测试页面是否是那个页面?如果apache不解释php那么就相当于静态文件

论坛徽章:
0
27 [报告]
发表于 2007-03-18 21:28 |只看该作者
Ubuntu 6.06 自编译 Apache 2.2.4+Php 5.2.1+eAccelerator v0.9.5

赛扬II 1GHz 320M SDRAM 10G 5400RPM Maxtor 91021U2 HDD

apache 编译参数:

  1. ./configure --prefix=/opt/apache --with-mpm=worker --enable-so
复制代码


php 编译参数:

  1. './configure' '--prefix=/opt/php' '--with-apxs2=/opt/apache/bin/apxs' '--disable-ipv6' '--with-mysql=/opt/mysql' '--enable-zend-multibyte' '--with-zlib' '--with-gd=/opt/gd' '--with-exif=/opt/exif' '--enable-mbstring' '--with-mcrypt=/opt/mcrypt' '--with-mhash=/opt/mhash'
复制代码


httpd-mpm.conf 配置:

  1. <IfModule mpm_worker_module>
  2.     StartServers            10
  3.     MaxClients             300
  4.     MinSpareThreads        200
  5.     MaxSpareThreads        256
  6.     ThreadsPerChild          50
  7.     MaxRequestsPerChild   10000
  8. </IfModule>
复制代码


index.php

  1. <?php
  2. phpinfo();
  3. ?>
复制代码


连续3次ab -n 10000 -c 200 测试,取最好成绩:


  1. This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
  2. Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
  3. Copyright 2006 The Apache Software Foundation, http://www.apache.org/

  4. Benchmarking localhost (be patient)


  5. Server Software:        Apache/2.2.4
  6. Server Hostname:        localhost
  7. Server Port:            80

  8. Document Path:          /index.php
  9. Document Length:        47463 bytes

  10. Concurrency Level:      200
  11. Time taken for tests:   118.649259 seconds
  12. Complete requests:      10000
  13. Failed requests:        157
  14.    (Connect: 0, Length: 157, Exceptions: 0)
  15. Write errors:           0
  16. Total transferred:      476269215 bytes
  17. HTML transferred:       474629215 bytes
  18. Requests per second:    84.28 [#/sec] (mean)
  19. Time per request:       2372.985 [ms] (mean)
  20. Time per request:       11.865 [ms] (mean, across all concurrent requests)
  21. Transfer rate:          3920.01 [Kbytes/sec] received

  22. Connection Times (ms)
  23.               min  mean[+/-sd] median   max
  24. Connect:        0 1154 671.0   1155    2522
  25. Processing:    50 1216 671.6   1216    2583
  26. Waiting:        0 1127 656.7   1124    2482
  27. Total:       1889 2370  55.5   2355    2586

  28. Percentage of the requests served within a certain time (ms)
  29.   50%   2355
  30.   66%   2361
  31.   75%   2366
  32.   80%   2368
  33.   90%   2405
  34.   95%   2514
  35.   98%   2583
  36.   99%   2585
  37. 100%   2586 (longest request)
  38. Start on
  39. 2007年 03月 18日 星期日 10:37:23 CST
复制代码

[ 本帖最后由 likuku 于 2007-3-18 21:33 编辑 ]

论坛徽章:
0
28 [报告]
发表于 2007-03-24 15:42 |只看该作者
[root@linux html]# ab -n 10000 -c 200 http://localhost/a.php
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.3
Server Hostname:        localhost
Server Port:            80

Document Path:          /a.php
Document Length:        41650 bytes

Concurrency Level:      200
Time taken for tests:   217.896650 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Total transferred:      419432838 bytes
HTML transferred:       417707850 bytes
Requests per second:    45.89 [#/sec] (mean)
Time per request:       4357.933 [ms] (mean)
Time per request:       21.790 [ms] (mean, across all concurrent requests)
Transfer rate:          1879.80 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0  553 1578.3     10   45003
Processing:   142 3791 4636.1   2947  117967
Waiting:       15 2897 4579.9   2591  117858
Total:        143 4344 4921.9   3114  118248

Percentage of the requests served within a certain time (ms)
  50%   3114
  66%   4477
  75%   5189
  80%   5223
  90%   5885
  95%   7319
  98%  11629
  99%  15290
100%  118248 (longest request)

论坛徽章:
0
29 [报告]
发表于 2007-04-03 09:54 |只看该作者
# ab -n 10000 -c 200 http://localhost/index.php
ksh: ab: not found
我用的是Openbsd3.8自带的Apache和php4.ad是否要另装?

论坛徽章:
0
30 [报告]
发表于 2007-04-03 10:20 |只看该作者
FreeBSD6.2-RELEASE
CPU: Intel(R) Xeon(TM) CPU 3.00GHz (3000.13-MHz 686-class CPU)
  Logical CPUs per core: 2
real memory  = 3221012480 (3071 MB)
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
SMP: AP CPU #1 Launched!


This is ApacheBench, Version 1.3d <$Revision: 1.73 $> apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)

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

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

Concurrency Level:      200
Time taken for tests:   3.456 seconds
Complete requests:      10000
Failed requests:        0
Broken pipe errors:     0
Non-2xx responses:      10086
Total transferred:      4639560 bytes
HTML transferred:       2763564 bytes
Requests per second:    2893.52 [#/sec] (mean)
Time per request:       69.12 [ms] (mean)
Time per request:       0.35 [ms] (mean, across all concurrent requests)
Transfer rate:          1342.47 [Kbytes/sec] received

Connnection Times (ms)
              min  mean[+/-sd] median   max
Connect:        3    25  122.3     22  3078
Processing:    44    43    7.3     39    89
Waiting:       27    42    7.3     39    88
Total:         48    68  122.6     61  3130

Percentage of the requests served within a certain time (ms)
  50%     61
  66%     63
  75%     64
  80%     65
  90%     67
  95%     69
  98%     84
  99%     97
100%   3130 (last request)

[ 本帖最后由 levopat 于 2007-4-3 10:21 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP