# wget http://internap.dl.sourceforge.net/sourceforge/eaccelerator/eaccelerator-0.9.5.tar.bz2
# tar jxf eaccelerator-0.9.5.tar.bz2
# cd eaccelerator-0.9.5
# /usr/local/bin/phpize
# ./configure --enable-eaccelerator=shared --with-php-config=/usr/local/bin/php-config
# make && make install
# mv /usr/local/lib/php/extensions/no-debug-non-zts-20020429/eaccelerator.so /usr/local/lib/php/extensions/
# rm -rf /usr/local/lib/php/extensions/no-debug-non-zts-20020429/
/usr/local/lib/php/extensions/no-debug-non-zts-20020429/)
[eAccelerator]
extension="/usr/local/lib/php/extensions/eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
mkdir /tmp/eaccelerator
chmod 0777 /tmp/eaccelerator
# /usr/local/apache2/bin/ab -c 50 -n3000 http://localhost/phpinfo.php各10轮结果如下:
Default Default + ZendOptimizer-3.2.0 Default + ZendOptimizer-3.2.0 + eAccelerator 0.9.5 Server Software: Apache Server Software: Apache Server Software: Apache Server Hostname: localhost Server Hostname: localhost Server Hostname: localhost Server Port: 80 Server Port: 80 Server Port: 80 Document Path: /phpinfo.php Document Path: /phpinfo.php Document Path: /phpinfo.php Document Length: 209 bytes Document Length: 209 bytes Document Length: 209 bytes Concurrency Level: 20 Concurrency Level: 20 Concurrency Level: 20 Time taken for tests: 3.304046 seconds Time taken for tests: 3.325664 seconds Time taken for tests: 2.409044 seconds Complete requests: 1000 Complete requests: 1000 Complete requests: 1000 Failed requests: 0 Failed requests: 0 Failed requests: 0 Write errors: 0 Write errors: 0 Write errors: 0 Non-2xx responses: 1007 Non-2xx responses: 1010 Non-2xx responses: 1006 Total transferred: 375611 bytes Total transferred: 376730 bytes Total transferred: 375238 bytes HTML transferred: 210463 bytes HTML transferred: 211090 bytes HTML transferred: 210254 bytes Requests per second: 302.66 [#/sec] (mean) Requests per second: 300.69 [#/sec] (mean) Requests per second: 415.10 [#/sec] (mean) Time per request: 66.081 [ms] (mean) Time per request: 66.513 [ms] (mean) Time per request: 48.181 [ms] (mean) Time per request: 3.304 [ms] (mean, across all concurrent requests) Time per request: 3.326 [ms] (mean, across all concurrent requests) Time per request: 2.409 [ms] (mean, across all concurrent requests) Transfer rate: 110.77 [Kbytes/sec] received Transfer rate: 110.35 [Kbytes/sec] received Transfer rate: 151.93 [Kbytes/sec] received Connection Times (ms) Connection Times (ms) Connection Times (ms) min mean[+/-sd] median max min mean[+/-sd] median max min mean[+/-sd] median max Connect: 0 12 14.1 9 98 Connect: 1 24 15.0 22 122 Connect: -2 9 4.8 9 44 Processing: 19 49 34.2 38 219 Processing: 12 38 29.8 28 240 Processing: 18 35 11.2 33 254 Waiting: 7 39 31.4 31 178 Waiting: 0 26 21.3 21 226 Waiting: 7 30 9.1 30 88 Total: 33 61 39.8 46 298 Total: 28 63 36.3 50 265 Total: 31 45 10.8 43 258 Percentage of the requests served within a certain time (ms) Percentage of the requests served within a certain time (ms) Percentage of the requests served within a certain time (ms) 50% 46 50% 50 50% 43 66% 50 66% 55 66% 45 75% 56 75% 61 75% 47 80% 63 80% 71 80% 48 90% 122 90% 114 90% 56 95% 154 95% 145 95% 63 98% 210 98% 198 98% 72 99% 220 99% 210 99% 74 100% 298 (longest request) 100% 265 (longest request) 100% 258 (longest request)
(END)