We've just installed APC on our server, and after looking at the stats for APC it appears that APC's cache takes around 5 - 10 minutes to fill up, and is then completely emptied.
Current settings include:
- apc.shm_segments 1
- apc.shm_size 256M
- apc.ttl 1800
- apc.user_ttl 1800
The server has 16GB of RAM, running ~40 vhosts. My main queries are:
- What, roughly, should the shm_size value be set to? Is 1 - 2GB safe? Or does it depend entirely on the applications being run on the server?
- I read that the ttl will delete 'expired' cache files, so is it a good idea to set the ttl to be just below the time it takes for the cache to fill?
- Is there any advantage to be had by setting more than one shared memory segment?