APC Optimisations for Magento
Optimising Magento for peak performance can be variable depending on your store. As the platform contains so many files and is very resource hungry, we need to tune the stack accordingly.
APC is a great byte code cache to enhance the performance of your eCommerce application.
Out of the gate with defaults it will work ok but it may throw errors such as intermittently such as
‘Unable to allocate memory for pool” on occasion and sometimes intermittent ‘segmentation faults’ depending on the version and it’s match with your PHP version.
To combat this tune your APC cache:
apc.shm_size=256M # Step up the memory size from 64M to 256M
apc.user_entries_hint=10000 # default 1024)
apc.max_file_size=5M # max file size default 1M(
apc.num_files_hint=1024
apc.stat=1 # Force APC to flush when you restart php-fpm or nGinx/Apach