Newsgroups: php.apc.dev,php.internals Path: news.php.net Xref: news.php.net php.apc.dev:205 php.internals:43306 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49994 invoked from network); 11 Mar 2009 16:02:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Mar 2009 16:02:34 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.163 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 212.25.124.163 il-gw1.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.163] ([212.25.124.163:47427] helo=il-gw1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1E/73-56240-890E7B94 for ; Wed, 11 Mar 2009 11:02:34 -0500 Received: from ws.home ([10.1.10.16]) by il-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 11 Mar 2009 18:03:56 +0200 Message-ID: <49B7E092.2070004@zend.com> Date: Wed, 11 Mar 2009 19:02:26 +0300 User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: shire CC: Lukas Kahwe Smith , PHP Internals List , apc-dev@lists.php.net, Andi Gutmans , Stas Malyshev References: <49A097FE.10205@tekrat.com> <49B6AF73.2050506@tekrat.com> <49B75142.2090808@zend.com> <49B77363.4040000@tekrat.com> In-Reply-To: <49B77363.4040000@tekrat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 11 Mar 2009 16:03:56.0271 (UTC) FILETIME=[FB4297F0:01C9A262] Subject: Re: [PHP-DEV] [RFC] APC/PHP Lazy Loading From: dmitry@zend.com (Dmitry Stogov) Hi Shire, I run patched APC on a number of real-life applications and got more than 30% speedup on XOOPS (99 req/sec instead of 60%) and 20% on ZendFramework (41 req/sec instead of 32), however most applications (drupal, qdig, typo3, wordpress) didn't show significant speed difference. As was expected the patch doesn't affects PHP without APC or with APC and lazy loading disabled. I also got APC warning with Zend Framewoek based blog application, but I didn't try to look deeper. [Wed Mar 11 17:53:02 2009] [apc-warning] [Wed Mar 11 17:53:02 2009] [apc-warning] apc_lookup_class_hook: could not install blogrow in /var/www/html/bench/fw/ZendFramework-1.5.0RC3/library/Zend/Loader.php on line 86 I didn't look careful into APC code, just into PHP patch and I see the following issues: 1) I would prefer to add additional hash_value argument into lookup_function_hook() and lookup_class_hook to prevent multiple calculation. 2) function_exists() should use lookup_function_hook(). 3) interface_exists() and class_alias() should use lookup_class_hook(). 4) ext/soap, ext/reflection, ext/wddx and ext/spl autoload support Anyway, it's very good job and 20-30% speedup on some real-life applications makes sense to include it into 5.3 (from my point of view). Thanks. Dmitry. shire wrote: > > Dmitry Stogov wrote: >> Hi, >> >> Personally, I like the patch except for some small possible tweaks, and >> I believe it can't make any harm with lazy loading disabled. > > Thanks, what are the tweaks you'd like to see so I can try to include them? > >> Could you provide some benchmark results? > > I was hoping to solicit some from others on the list, but haven't seen > anything yet. My best example of gains is Facebook, I believe these > where around 20-30% decrease in CPU usage on a bare-bones page. > > I did test Joomla and Zend Framework, the gains here aren't much if > anything as they seem to be use autoload for most files. (although I > would like to see what lazy method loading can do here). > > I intend to benchmark wordpress as well. I'll post more benchmarks for > the above and this once I make some more tweaks that also might give us > better results. I anticipate that benchmarks are going to vary pretty > drastically depending on code structure, size, autoloading, etc. > >> APC patch to play with it and see advantages/disadvantages? > > I've gone ahead and checked in the current code for APC, so you'll have > the necessary changes if you checkout CVS HEAD. > > -shire