Re: apc improvements

From: Date: Sat, 11 Jun 2005 00:38:02 +0000
Subject: Re: apc improvements
References: 1 2 3  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-2459@lists.php.net to get a copy of this message
Gonzalo Arana wrote: > On Fri, Jun 10, 2005 at 02:19:21PM -0700, Rasmus Lerdorf wrote: > >> >>Gonzalo Arana wrote: >> >>>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 >> >>Wait a second, why do you have more running processes with APC? That >>makes no sense to me and makes all your other numbers rather meaningless > > > In fact, yes it does (at least I think). I gues this is a 'thunerding > herd' problem (too many processes waiting for a rwlock, the lock is > released, and all processes are awaked, but only one gets the lock). > > This would explain why the number of context switches have increased > drastically. > > >>since it doesn't look like you are comparing similar Apache configurations. > > > Actually the figures are from the same web server, same apache > configuration, and same http traffic. The only difference is with apc > turned on and turned off. Normally on a busy web server you fix the number of client processes and don't waste cycles killing any off and re-forking. And I don't see where APC can cause a thundering herd problem. An APC request finishes faster than a non-APC request, so if the traffic is the same you should be seeing less processes. If the lock has that big of an effect on your system, there is a serious problem. Which OS are you on? And which locking mechanism did you build APC with? Your numbers don't look anything like what I see on Linux and FreeBSD. -Rasmus

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