Zend Optimizer

With PHP 5.5 Zend Opcache is the default byte opcode caching. For those who do not know what that is. It will compile php scripts into executable byte code and stores it in memory for reuse. Normally php will be compiled every time it is run, which is very inefficient use of your CPU power.

On my development system the update to 5.5 was done automatically some weeks ago and APC (the other opcode caching solution) was not running anymore. Strangly the update did not install opcache, but if you use the following command (given that you have pecl installed) you can run opcache instead of apc

#pecl install zendopcache-7.0.2

I also found a nice monitoring script to see how opcache is doing. Definitely worth installing also.

https://gist.github.com/ck-on/4959032/?ocp.php

The performance I perceived is similar to APC, but the benefit should be that it is more tightly integrated and assures full php compatibility, that has not been the case with APC was my experience. You will loose the file caching capability of APC, but there are plenty of other solutions for this and ELGG is also caching a lot of files by default.

So yesterday I moved the production version of my site to opcache and the performance is good and I did not find any issues yet. The average server response time improvement is 60% to normal php processing. Page load (to DOM ready) is about 40% better. So if you don't have APC, I recommend installing opcache immediately. There is no real downside, just the work you have to do.

Just wanted to share that with you and liked to know what your experiences are.  

  • oh ok.  i confused me!
    both 5.5.3-1 and pecl 7.0.2-2 are available as packages in centos 6.
    however, i already installed the 7.0.2-2 package using yum..

    edit: ah, i think i am looking at the main php install package.. and it has been renamed to php-opcache-version#
    i mistook it for the opcache specific package

Performance and Scalability

Performance and Scalability

If you've got a need for speed, this group is for you.