Re: APC's performance improvement patch for single process multithreaded php

From: Date: Wed, 07 Oct 2009 23:46:30 +0000
Subject: Re: APC's performance improvement patch for single process multithreaded php
References: 1 2  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-6679@lists.php.net to get a copy of this message
If you think it is useful for muli-process too, then I think "apc.single_proc" is confusing. How about "apc.use_process_mem" instead of "apc.single_proc". I can provide the documentation about this configuration flag. Regards, Basant. On Wed, Oct 7, 2009 at 8:17 AM, Brian Moon <brian@moonspot.net> wrote: >>      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. >

« previous php.pecl.dev (#6679) next »