QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 638|回复: 4

请高手帮我看看这个ab的结果,谢谢!

[复制链接]
发表于 2004-4-8 22:51:09 | 显示全部楼层 |阅读模式
[code:1]./ab -n 30000 -c 150 http://127.0.0.1/test.php

This is ApacheBench, Version 2.0.40-dev <$Revision: 1.121.2.4 $> 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 127.0.0.1 (be patient)
Completed 3000 requests
Completed 6000 requests
Completed 9000 requests
Completed 12000 requests
Completed 15000 requests
Completed 18000 requests
Completed 21000 requests
Completed 24000 requests
Completed 27000 requests
Finished 30000 requests


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

Document Path:          /test.php
Document Length:        29359 bytes

Concurrency Level:      150
Time taken for tests:   94.561597 seconds
Complete requests:      30000
Failed requests:        85
   (Connect: 0, Length: 7, Exceptions: 78)
Write errors:           0
Total transferred:      890043865 bytes
HTML transferred:       884582733 bytes
Requests per second:    317.25 [#/sec] (mean)
Time per request:       472.808 [ms] (mean)
Time per request:       3.152 [ms] (mean, across all concurrent requests)
Transfer rate:          9191.71 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    1  71.5      0    5015
Processing:   432  457 166.3    446    4949
Waiting:    -3100 -228  42.8   -223       0
Total:        432  459 182.8    446    5567

Percentage of the requests served within a certain time (ms)
  50%    446
  66%    449
  75%    451
  80%    452
  90%    455
  95%    458
  98%    461
  99%    465
100%   5567 (longest request)[/code:1]

其中test.php文件的内容为:
[code:1]
<?php
phpinfo();
?>
[/code:1]

请大家帮我分析一下这个结果的性能如何?
(apache 2.0.48+PHP5+LinuxAS FOR 2.6.4)
发表于 2004-4-8 23:07:14 | 显示全部楼层
[code:1]2004年04月08日星期四下午22时43分43秒[root@tian root]# ab -n 30000 -c 150 http://127.0.0.1/
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.121.2.1 $> 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 127.0.0.1 (be patient)
Completed 3000 requests
Completed 6000 requests
Completed 9000 requests
Completed 12000 requests
Completed 15000 requests
Completed 18000 requests
Completed 21000 requests
Completed 24000 requests
Completed 27000 requests
Finished 30000 requests


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

Document Path:          /
Document Length:        4071 bytes

Concurrency Level:      150
Time taken for tests:   134.610160 seconds
Complete requests:      30000
Failed requests:        0
Write errors:           0
Non-2xx responses:      30000
Total transferred:      127650000 bytes
HTML transferred:       122130000 bytes
Requests per second:    222.87 [#/sec] (mean)
Time per request:       673.051 [ms] (mean)
Time per request:       4.487 [ms] (mean, across all concurrent requests)
Transfer rate:          926.07 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    3 100.8      0    3007
Processing:     8  668 1206.4    178    7333
Waiting:        2  555 1048.4    133    6941
Total:          8  671 1215.5    178    7333

Percentage of the requests served within a certain time (ms)
  50%    178
  66%    183
  75%    187
  80%    226
  90%   3018
  95%   3031
  98%   3163
  99%   6006
100%   7333 (longest request)
2004年04月08日星期四下午22时46分36秒[root@tian root]#[/code:1]


看样子您的机器比我的要高档 !
回复

使用道具 举报

 楼主| 发表于 2004-4-8 23:19:02 | 显示全部楼层
我的机器配置:
P4 2.4+1G RAM+IDE。
在我测试的时候同时提供了两百个左右的下载连接有一百多个左右的Apache连接(只用来提供图片的)。
Apache是用with-mpm=worker编译的。
版本大大您的机器应该是自己工作的机器吧?我的是用来做服务器~~但配置也是很低的那种了。

但是我的测试中有:
Failed requests:        85
   (Connect: 0, Length: 7, Exceptions: 7
而您的没有~~这说明什么问题呢?
回复

使用道具 举报

发表于 2004-4-8 23:27:01 | 显示全部楼层
我的:
Document Length:        4071 bytes
Transfer rate:          926.07 [Kbytes/sec] received


您的可是:
Document Length:        29359 bytes
Transfer rate:          9191.71 [Kbytes/sec] received
回复

使用道具 举报

 楼主| 发表于 2004-4-9 04:04:20 | 显示全部楼层
是啊~~我也觉得不可思议~~。你的也是本机测试,为什么会是:
Transfer rate: 926.07 [Kbytes/sec] received
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-8 23:37 , Processed in 0.042629 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表