On Unix platforms, APC can be compiled with mmap or shared memory. This
performs good for multiprocess php. However when we run inside single process
multi-threaded Web Servers e.g Sun Web Server or Apache worker mpm with single
process, mmap is simply overkill. Reading APC's compiled cache from in-process
memory is much efficient than from mmap.
To achieve the above, I introduced a configurable variable apc.single_proc which
is set to 0 by default. When apc.single_proc is set to 1, cache is created
inside process memory. Also mutex which is used to synchronize the cache can
also be created as PTHREAD_PROCESS_PRIVATE. apc.single_proc can only be set to 1
when ZTS is enabled.
Most set ups with Apache worker use multi-threaded, multi-process. I guess for opcode caching it is ok, but not for data caching. You don't want that store once per process. That should probably be documented clearly someway. I would probably run with this flag on even in a multi/multi set up if it gave me better performance. Memory is cheap.
Brian.