|
测试环境:
硬件:赛扬2.66G,512M DDR
软件:Windows2003,Mysql-4.1.13,apache2.0.54,php5.1.0beta3(内置PDO,哈哈)
用ab做1000个连接,50个并发,不是很多,呵呵
ADODB:不是我说,最慢的果然是它
没有使用cache:D:\server\Apache2\bin>ab -k -n 1000 -c 50 -k http://127.0.0.1/adotest.php
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) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 (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
Server Hostname: 127.0.0.1
Server Port: 80
Document Path: /adotest.php
Document Length: 0 bytes
Concurrency Level: 50
Time taken for tests: 72.593750 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Keep-Alive requests: 991
Total transferred: 220596 bytes
HTML transferred: 0 bytes
Requests per second: 13.78 [#/sec] (mean)
Time per request: 3629.688 [ms] (mean)
Time per request: 72.594 [ms] (mean, across all concurrent requests)
Transfer rate: 2.96 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 1.0 0 31
Processing: 62 449 3823.1 78 66125
Waiting: 62 448 3823.1 78 66125
Total: 62 449 3823.4 78 66125
Percentage of the requests served within a certain time (ms)
50% 78
66% 234
75% 281
80% 296
90% 328
95% 375
98% 421
99% 468
100% 66125 (longest request)
使用了cache:D:\server\Apache2\bin>ab -k -n 1000 -c 50 -k http://127.0.0.1/adotest.php
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) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 (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
Server Hostname: 127.0.0.1
Server Port: 80
Document Path: /adotest.php
Document Length: 0 bytes
Concurrency Level: 50
Time taken for tests: 70.265625 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Keep-Alive requests: 991
Total transferred: 220596 bytes
HTML transferred: 0 bytes
Requests per second: 14.23 [#/sec] (mean)
Time per request: 3513.281 [ms] (mean)
Time per request: 70.266 [ms] (mean, across all concurrent requests)
Transfer rate: 3.06 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 1.0 0 31
Processing: 62 413 3760.9 78 63968
Waiting: 62 413 3760.9 78 63968
Total: 62 413 3761.3 78 63968
Percentage of the requests served within a certain time (ms)
50% 78
66% 78
75% 187
80% 203
90% 234
95% 250
98% 281
99% 343
100% 63968 (longest request)[/HTML]
MDB2,Pear的class,和ADODB功能相近[HTML]D:\server\Apache2\bin>ab -k -n 1000 -c 50 -k http://127.0.0.1/mdb2test.php
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) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 (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
Server Hostname: 127.0.0.1
Server Port: 80
Document Path: /mdb2test.php
Document Length: 0 bytes
Concurrency Level: 50
Time taken for tests: 53.484375 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Keep-Alive requests: 991
Total transferred: 220596 bytes
HTML transferred: 0 bytes
Requests per second: 18.70 [#/sec] (mean)
Time per request: 2674.219 [ms] (mean)
Time per request: 53.484 [ms] (mean, across all concurrent requests)
Transfer rate: 4.02 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.5 0 15
Processing: 46 326 2796.3 62 48609
Waiting: 15 326 2796.3 62 48609
Total: 46 326 2796.5 62 48609
Percentage of the requests served within a certain time (ms)
50% 62
66% 171
75% 203
80% 218
90% 250
95% 265
98% 296
99% 343
100% 48609 (longest request) |
|