Apache下有ApacheBench的测试程序,在Apache的bin文件夹下的有ab.exe程序,可以在加载eAccelerator
前后测试php程序并发的时间,以测试eAccelerator的加速性能:
下面是未使用加速器的情况下:
C:\Documents and Settings\Administrator>ab -n 1000
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd,
Copyright 2006 The Apache Software Foundation,
Benchmarking localhost (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Finished 1000 requests
Server Software: Apache/2.2.4
Server Hostname: localhost
Server Port: 80
Document Path: /drupal
Document Length: 315 bytes
Concurrency Level: 1
Time taken for tests: 2.156140 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Non-2xx responses: 1000
Total transferred: 547000 bytes
HTML transferred: 315000 bytes
Requests per second: 463.79 [#/sec] (mean)
Time per request: 2.156 [ms] (mean)
Time per request: 2.156 [ms] (mean, across all concurrent requests)
Transfer rate: 247.66 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 1.4 0 15
Processing: 0 1 5.0 0 15
Waiting: 0 1 5.0 0 15
Total: 0 2 5.1 0 15
下面是使用eAccelerator的测试数据:
C:\Documents and Settings\Administrator>ab -n 1000
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd,
Copyright 2006 The Apache Software Foundation,
Benchmarking localhost (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Finished 1000 requests
Server Software: Apache/2.2.4
Server Hostname: localhost
Server Port: 80
Document Path: /drupal
Document Length: 315 bytes
Concurrency Level: 1
Time taken for tests: 2.93737 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Non-2xx responses: 1000
Total transferred: 547000 bytes
HTML transferred: 315000 bytes
Requests per second: 477.61 [#/sec] (mean)
Time per request: 2.094 [ms] (mean)
Time per request: 2.094 [ms] (mean, across all concurrent requests)
Transfer rate: 255.05 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 1.3 0 15
Processing: 0 1 4.9 0 15
Waiting: 0 1 4.8 0 15
Total: 0 1 5.0 0 15
阅读(1234) | 评论(1) | 转发(0) |