Friday, July 3, 2015

Using Zend opcache with php-fpm

Install Zend OPcache

> yum install php55-opcache

Check if the module exists:

> php -m | grep cache

Zend OPcache
Add the following to your php.ini

opcache.enable=1
opcache.memory_consumption=128
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60

Check if opcache is enabled by

> php-fpm -i | grep cache

The opcache settings may be located in /etc/php-5.5.d/opcache.ini

use the following to set opcache.max_accelerated_files:

find . -type f -print | grep php | wc -l

If the number of php files is 2000, you may want to set it to some number slightly larger than that.

No comments:

Post a Comment