window7 双核2g的笔记本,安装的wamp
测试输出均为1
1 在kohana框架下的测试
ab.exe -c 5 -n 1000 http://test.cloud.ceyu001.com/admin/index
Server Software: Apache/2.2.17
Server Hostname: test.cloud.ceyu001.com
Server Port: 80
Document Path: /admin/index
Document Length: 1 bytes
Concurrency Level: 5
Time taken for tests: 9.400 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 231000 bytes
HTML transferred: 1000 bytes
Requests per second: 106.39 [#/sec] (mean)
Time per request: 46.998 [ms] (mean)
Time per request: 9.400 [ms] (mean, across all concurrent requests)
Transfer rate: 24.00 [Kbytes/sec] received
每秒请求只有106
2 用php文件测试
ab.exe -c 5 -n 2000 http://localhost/test/index.php
Server Software: Apache/2.2.17
Server Hostname: localhost
Server Port: 80
Document Path: /test/index2.php
Document Length: 1 bytes
Concurrency Level: 5
Time taken for tests: 1.615 seconds
Complete requests: 2000
Failed requests: 0
Write errors: 0
Total transferred: 432000 bytes
HTML transferred: 2000 bytes
Requests per second: 1238.32 [#/sec] (mean)
Time per request: 4.038 [ms] (mean)
Time per request: 0.808 [ms] (mean, across all concurrent requests)
Transfer rate: 261.21 [Kbytes/sec] received
每秒请求1238
3 测试html文件
ab.exe -c 5 -n 2000 http://localhost/test/index.html
Server Software: Apache/2.2.17
Server Hostname: localhost
Server Port: 80
Document Path: /test/index.html
Document Length: 9 bytes
Concurrency Level: 5
Time taken for tests: 1.259 seconds
Complete requests: 2000
Failed requests: 0
Write errors: 0
Total transferred: 612000 bytes
HTML transferred: 18000 bytes
Requests per second: 1588.47 [#/sec] (mean)
Time per request: 3.148 [ms] (mean)
Time per request: 0.630 [ms] (mean, across all concurrent requests)
Transfer rate: 474.68 [Kbytes/sec] received
每秒请求数1588
测试结果可以提供给我们一些优化的思路,例如,试试phalcon框架,做页面静态化
转载请注明:小Y » 关于ab测试的简单结果