Increasing PHP Performance with APCu and OPcache

The performance of Kolab Groupware web interfaces can be increased significantly by using the Alternative PHP Cache (APC user cache) and OPcache.

This article outlines the installation and configuration of both caches.

APC user cache is the Alternative PHP Cache stripped of opcode caching, which is now available as the opcache extension to PHP.

CentOS 7 and Red Hat Enterprise Linux 7 (Maipo)

The software packages are available from the EPEL repository, and are installed as follows;

# yum -y install php-pecl-apcu php-pecl-zendopcache

Configure APCu to allow for upload progress reporting by editing /etc/php.d/apcu.ini and ensuring the following settings are included;

apc.rfc1867_prefix =upload_

Separately configuring OPcache is not required.

Restart the httpd service for the new extensions to be loaded;

# systemctl restart httpd
Posted in Guides and tagged , , , , , , , , , , , , .