Boost your PHP Page Generation Times with Zend
Date: Sunday, September 14 @ 21:50:35 CEST
Topic: Off-Topic


A friend of mine recently installed Zend Optimizer 2.1.0 as we have here at Nuke Cops. Both sites are high traffic (50,000+ page hits daily) and pound the web server. Zend Optimizer 2.1.0 increases page generation times at least 50%. To provide a baseline example, lets set the base at 250 pages viewed at any given past 5 minutes. [This is from a Nuke Cops perspective, mind you, Computer Cops was also seeing roughly the same during test times since both share the same server.]

Prior to having ZO installed our PHP generation times were anywhere from 2 to 4 seconds consistent. Once ZO was installed and set to default configuration out of the box, generation times dropped down to roughly 1.1 seconds. Default config had an optimization configuration set to "15". Server load times actually decreased as well from a 1.x-2.x down to a 0.5-1.x.

Do you support Zend Optimizer on your server? Run a phpinfo(); script and look for the "Zend Optimizer" block. There are five optimization passes, and a loader. By default the first three are enabled, as the next two are disabled, and finally the loader is enabled:

Optimization Pass 1 enabled
Optimization Pass 2 enabled
Optimization Pass 3 enabled
Optimization Pass 9 disabled
Optimization Pass 10 disabled
Zend Loader enabled

The loader is only used for encoded PHP files. If you do not use encoded files, disabling this one will boost performance slightly.

So how to increase it even more? Enable optimization passes 9 and 10. Its not very well documented, however change the setting in your php.ini from "15" to "1023" for optimization passes. With this new setting, Nuke Cops noticed an increased page generation time at 0.5-0.7 seconds on average. Another boost in performance. However doing this increases serverload on average from 3.x-5.x. This is not always consistent, but be aware.

ZO is a free application from http://www.zend.com. Ensure you already have the base Zend Engine installed:

This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.2.0, Copyright (c) 1998-2002 Zend Technologies

The installation documentation points this out.

Mileage does vary, but over the long haul, its a positive increase.



This article comes from NukeCops
http://www.nukecops.com

The URL for this story is:
http://www.nukecops.com/modules.php?name=News&file=article&sid=677