Posted by & filed under server, unix.


今更ながらeAcceleratorを導入したことでどれだけPHPの実行速度が変化したのかを調べてみた.

eAccelerator OFF

$ ab -n 1000 -c 10 http://tokcs.com/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking tokcs.com (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
Completed 1000 requests
Finished 1000 requests

Server Software:        Apache
Server Hostname:        tokcs.com
Server Port:            80

Document Path:          /
Document Length:        26171 bytes

Concurrency Level:      10
Time taken for tests:   791.010 seconds
Complete requests:      1000
Failed requests:        425
(Connect: 0, Receive: 0, Length: 425, Exceptions: 0)
Write errors:           0
Total transferred:      26444725 bytes
HTML transferred:       26158725 bytes
Requests per second:    1.26 [#/sec] (mean)
Time per request:       7910.102 [ms] (mean)
Time per request:       791.010 [ms] (mean, across all concurrent requests)
Transfer rate:          32.65 [Kbytes/sec] received

Connection Times (ms)
min  mean[+/-sd] median   max
Connect:        0    0   0.8      0       9
Processing:  5616 7891 1335.2   7564   18605
Waiting:     5500 7424 1226.3   7123   16871
Total:       5616 7892 1335.2   7564   18605

Percentage of the requests served within a certain time (ms)
50%   7564
66%   7798
75%   8057
80%   8278
90%   8835
95%   9195
98%  12866
99%  15932
100%  18605 (longest request)

eAccelerator ON

$ ab -n 1000 -c 10 http://tokcs.com/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking tokcs.com (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
Completed 1000 requests
Finished 1000 requests

Server Software:        Apache
Server Hostname:        tokcs.com
Server Port:            80

Document Path:          /
Document Length:        26143 bytes

Concurrency Level:      10
Time taken for tests:   412.516 seconds
Complete requests:      1000
Failed requests:        908
(Connect: 0, Receive: 0, Length: 908, Exceptions: 0)
Write errors:           0
Total transferred:      26429908 bytes
HTML transferred:       26143908 bytes
Requests per second:    2.42 [#/sec] (mean)
Time per request:       4125.157 [ms] (mean)
Time per request:       412.516 [ms] (mean, across all concurrent requests)
Transfer rate:          62.57 [Kbytes/sec] received

Connection Times (ms)
min  mean[+/-sd] median   max
Connect:        0    0   0.3      0       4
Processing:  2489 4117 540.0   3967    6784
Waiting:     2260 3843 508.1   3703    6443
Total:       2490 4117 540.0   3967    6784

Percentage of the requests served within a certain time (ms)
50%   3967
66%   4101
75%   4247
80%   4423
90%   4809
95%   5214
98%   5705
99%   6282
100%   6784 (longest request)

だいたい半分ちょっとの短縮か.