APC config files

Tis page is veing updated at APC Debian

Once you activate APC from PHP.INI, you should probably use some directives to make this magical invention work.

For example, APC and smarty templates don’t go together bery well, SMARTY caches it’s results into PHP files rather than reparsing them, if APC is set not to check for changes in files, it will simply not load the new SMARTY template untill the APC cached version is gone.

But APC is such a beuty, and it translates to lower load on your server.

First, you should understand that on a big PHP server, many changes need to be done.

First, APC data lives in shared memory, By default on a linux system this is usually 33 Megabytes, not enough for one big PHP program, you need to increase it

1- How much shared memory is there now

cat /proc/sys/kernel/shmmax

2- Change that to something suitable

vi /etc/sysctl.conf (Reboot don’t you think )

remember, Don’t go too high, if your system gets low on memory and starts swapping, you are out of luck

3- Make sure you know what the settings here do… what you can change for directories and what you can’t etc..

Directive Description Use Warnings More Notes
apc.cache_by_default
apc.coredump_unmap
apc.enable_cli
apc.enabled
apc.file_update_protection
apc.filters
apc.gc_ttl
apc.include_once_override
apc.max_file_size
apc.mmap_file_mask
apc.num_files_hint
apc.report_autofilter
apc.rfc1867
apc.rfc1867_freq
apc.rfc1867_name
apc.rfc1867_prefix
apc.shm_segments
apc.shm_size
apc.slam_defense
apc.stat
apc.stat_ctime
apc.ttl
apc.user_entries_hint
apc.user_ttl
apc.write_lock