APACHE VS LIGHTTPD 的简单AB测试
时间:2006-11-15 来源:garfield61
aa.com:
Server Software: Apache/2.0.59
Server Hostname: aa.com
Server Port: 80
apache/bin/ab -n 500 -c 20 http://aa.com/index.php
最高负载:6.47
Concurrency Level: 20
Time taken for tests: 14.554885 seconds
Requests per second: 34.35 [#/sec] (mean)
Time per request: 582.195 [ms] (mean)
apache/bin/ab -n 500 -c 80 http://aa.com/index.php
最高负载:8.98
Concurrency Level: 100
Time taken for tests: 13.706984 seconds
Requests per second: 36.48 [#/sec] (mean)
Time per request: 2741.397 [ms] (mean)
apache/bin/ab -n 1000 -c 100 http://aa.com/index.php
最高负载:14.71
Concurrency Level: 100
Time taken for tests: 23.801175 seconds
Requests per second: 42.01 [#/sec] (mean)
Time per request: 2380.117 [ms] (mean)
bb.com:
Server Software: lighttpd/1.4.10
Server Hostname: bb.com
Server Port: 80
apache/bin/ab -n 500 -c 20 http://bb.com/index.php
最高负载:9.33
Concurrency Level: 20
Time taken for tests: 52.501670 seconds
Requests per second: 9.52 [#/sec] (mean)
Time per request: 2100.067 [ms] (mean)
apache/bin/ab -n 500 -c 100 http://bb.com/index.php
最高负载:7.90
Concurrency Level: 100
Time taken for tests: 33.543664 seconds
Requests per second: 14.91 [#/sec] (mean)
Time per request: 6708.733 [ms] (mean)
apache/bin/ab -n 500 -c 100 http://bb.com/index.phP
最高负载:10.34
Concurrency Level: 100
Time taken for tests: 58.727335 seconds
Requests per second: 17.03 [#/sec] (mean)
Time per request: 5872.734 [ms] (mean)
从测试结果可以看出来,APACHE的处理request速度基本上是LIG的2.5倍,不过从负载能看出来,消耗的系统资源比LIG要稍多一些。不过总体效果还是比LIG上跑PHP要好。