mailserv/mailserv — Issue #9: Enable APC for PHP
Author: Synchro
Created: 2011-10-24 23:27:01+00:00
State: open

APC makes a huge difference to PHP performance (e.g. for roundcube), and all you have to do is enable it. On a stock OpenBSD 4.8 with the ports tree installed all I needed to do is:

cd /usr/ports/www/pecl-APC
make install
ln -fs /var/www/conf/php5.sample/apc.ini /var/www/conf/php5/apc.ini
god restart php
god restart nginx

You might also want to reduce its memory usage (it defaults to 30M) by adding this line to its config file:

apc.shm_size = 8

and then restart php using god as before.

This should probably go in the wiki, but I wondered if it was worth adding to the install script?