apc improvements
| From: | Gonzalo Arana | Date: | Fri, 10 Jun 2005 20:56:31 +0000 |
| Subject: | apc improvements | ||
| Groups: | php.pecl.dev | ||
| Request: | Send a blank email to pecl-dev+get-2454@lists.php.net to get a copy of this message | ||
Hi,
I've tested apc in one of my apaches, and I've got this results:
context switches (from vmstat)
w/out apc: 4k/sec
with apc: 200k/sec
running processes (from 'vmstat 1')
w/out apc: 0-9
with apc: 20-100
Cpu usage
with aps: 30% user, 60% system
w/out aps: 50% user, 10% system
I suspect this figures may be the result of the fact that apc uses only
a rwlock (it does not implement nor use rw/ro locks).
Therefore, internal structures are always locked in a mutex-style, even
in the case of a hit.
In my opinion, apc needs a read-write/read-only locking strategy to
boost performance. With this implemented, in case of a hit to apc's
cache, the running process would not be rescheduled by the kernel.
Right now, if the lock is held by another process (even in case of a
hit to apc's cache), the running process would get scheduled.
I would like to work on this. Does a feature like this have any chance
to get into apc's official source code?
Regards,
--
Gonzalo A. Arana
Coordinador de Planificacion y Desarrollo
UOL Sinectis S.A.
Florida 537 piso 6
C1005AAK - Buenos Aires
http://www.uolsinectis.com.ar/