Boosting OwnCloud’s Performance with APCU on Ubuntu with Plesk

Memcaching boosts the performance of OwnCloud dramatically. Read about this here. My server is running Ubuntu 12.04 LTS. PHP 5.6 and 7.0 is handled by Plesk. In my experience 5.6 is the most stable running with OwnCloud. APCU is supported by OwnCloud but was not present as a module in PHP (Only on the Sytem providing PHP 5.4). So here’s how you install it.

This is a follow up to my previous post on installing custom modules for PHP handled by Plesk. So I assume that all required software to build the modules is installed.

No ACPU module available
No ACPU module available

For PHP 7.0 simply run:

$ /opt/plesk/php/7.0/bin/pecl install apcu

PHP 5.6 is a bit more stable for running OwnCloud. However you will get an error that you need at least PHP 7.0 for installing ACPU. This is true for the current release (>5.0). So simply install the stable 4.x release:

$ /opt/plesk/php/5.6/bin/pecl install apcu-4.0.10

Register the module with PHP:

For PHP 7.0.x:

$ echo "extension=apcu.so" > /opt/plesk/php/7.0/etc/php.d/apcu.ini

For PHP 5.6.x:

$ echo "extension=apcu.so" > /opt/plesk/php/5.6/etc/php.d/apcu.ini

Reread the config:

$ plesk bin php_handler --reread
ACPU module available
ACPU module available

Now the only thing left is to add

'memcache.local' => '\OC\Memcache\APCu',

to your configuration file of OwnCloud (e.g. /var/www/owncloud/config/config.php).

 

Leave a Reply

Your email address will not be published. Required fields are marked *