Zend Accelerator Evaluation	10/29/2001

Author: Eric Braswell

Versions: Alpine build 1.100, PHP version 4.05-C2_memusage,
ZendOptimizerv1.1.0 for PHP 4.05/4.06, Zend Accelerator 2.0.0RC13-PHP_4.0.5

Methodology: Pages are my standard profiling pages found in palette/profiling. Two sets of tests were conducted - The first involved limited manual testing which included peak memory usage. The send set used Apache Bench to test the Accelerator under greater loads.
Default settings were used for Zend Accelerator.

Summary: 
The Zend Accelerator (http://www.zend.com/zend/products.php) attempts to cut execution time and memory consumption of PHP scripts by caching compiled and optimized scripts in memory. Although the default memory allocation is 32MB (unacceptably high for our needs), usage in my tests never beyond about 10% of this.
The Zend Accelerator was also compared with APC (Alternative PHP Cache), an open source PHP extension that performs similar caching functions. Unfortunately development of APC lags behind PHP and the extension proved to be incompatible with the version of PHP used in both shared memory and memory mapped files modes.

Set 1 - Manual Testing:
Use of the Zend Accelerator showed a dramatic decrease in execution time as well as per script memory usage. The performance hit on the first request was no greater than without the accelerator.


Zend Accelerator (default settings) + Optimizer		
	                  - Off -               - On -          Diff	    Diff %
basic_page.php	0.45947		0.17687		
	                0.43262		0.17289		
                        0.45934		0.15522		
                        0.43717		0.15130		
                        0.43577		0.15413		
                        0.43205		0.15654		
Average	        0.44274		0.16116	    0.28158     64%
					
htmlcomponentfactory.php	(include, instantiate)
                        0.05021		0.00377		
    	                0.05037		0.00380		
                        0.05037		0.00385		
                        0.05066		0.00388		
                        0.05028		0.00385		
Average           0.05040		0.00380	    0.04655     92%
					
                        324328		26208		
                        307072		25752		
                        307072		25752		
                        307072		25752		
                        307072		25752		
Average           310523		25843	    284680      92%

scroll_list.php	0.95226		0.641073		
                        0.96329		0.647136		
                        0.94551		0.625963		
                        0.95086		0.661294		
                        0.95096		0.620778		
Average           0.95258		0.63925	    0.31333     33%

                        1692400		407480		
                        1714464		407480		
                        1657704		476184		
                        1657728		403664		
                        1657704		407480		
Average           1676000		420458	    1255542     75%


Set 2 - Apache Bench testing.
Sets of tests were conducted to simulate increasing loads. On average the time taken to retrieve pages (total time including connection and processing times) decreased 39% when using the Zend Accelerator. Requests per second and transfer rates were on average 86% and 88% greater respectively. The differences in retrieval time ranged from just 13% for cList.php (which does relatively little processing in PHP) to 60% for the IP pooling page (/base/network/pooling). Transfer rates (kb/s) and requests per second both had a peak increase of just under 190%. 
See the accompanying table accelerator_results.html for results of this series of tests.




