Skip to main content

Opcache with Drupal

Submitted by system on
OPcache is an opcode cache for PHP. It is bundled with PHP 5.5.0 and later. The following settings work really well with Drupal. For Ubunti 14.04 , these following file can be modified to incorporate the changes /etc/php5/apache2/php.ini
Configuration: opcache.enable=1
opcache.memory_consumption=256
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1

Definition: opcache.memory_consumption - The size of the shared memory storage used by OPcache, in megabytes. opcache.max_accelerated_files - The maximum number of keys (and therefore scripts) in the OPcache hash table. opcache.revalidate_freq=60 - How often to check script timestamps for updates, in seconds. opcache.fast_shutdown=1 - The fast shutdown sequence doesn't free each allocated block, but lets the Zend Engine Memory Manager do the work. -- http://getlevelten.com/blog/kyle-taylor/tuning-drupal-performance-digitalocean https://www.scalingphpbook.com/best-zend-opcache-settings-tuning-config/