APC  Configuration:

Once you have installed following this tutorial http://www.debian-tutorials.com/general/installing-apc-alternative-php-cache-into-php5-on-debian  you need to configure it.

APC makes use of a shared memory segment to cache php scripts. This enables multiple processes to access the cache. You can configure how massive that segment is in megabytes:

apc.shm_size=100M

By default,  APC will cache every php file requested by visitors to your website. On a typical server you will have lots of thousands of source files. So in the event you monitor the output of apc.php you will find that with time even 100MB of memory is not sufficient for APC. It will keep running  out of space as it tries to cache all the files.
To deal with this, APC will swap out old files from the cache according to this setting which specifies the time to live in seconds of files that have not been accessed recently:

apc.ttl=1300

You may prefer to cache only some of the files such as those used by the most popular websites on the server. To do that you must first set this option:

Continue Reading…

Page 1 of 11