Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67686 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88407 invoked from network); 11 Jun 2013 10:13:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jun 2013 10:13:34 -0000 Authentication-Results: pb1.pair.com smtp.mail=ellison.terry@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ellison.terry@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.181 as permitted sender) X-PHP-List-Original-Sender: ellison.terry@gmail.com X-Host-Fingerprint: 209.85.212.181 mail-wi0-f181.google.com Received: from [209.85.212.181] ([209.85.212.181:59625] helo=mail-wi0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 80/C7-35222-D48F6B15 for ; Tue, 11 Jun 2013 06:13:33 -0400 Received: by mail-wi0-f181.google.com with SMTP id hq4so1731208wib.14 for ; Tue, 11 Jun 2013 03:13:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=TpWd/eWh6eOMK5XkaS1x/C3kPfSnpNKXXTfzpzaLE6U=; b=lpsqkm058+UYGht0lRHNP9BHyzmZOSuIaqQLgFZoRb5MgN/icO9senst9sGB3eFFFV 66kSIC+MaZ8iA+Zn0zmrFDMfgXjHmXfdCMmUkkAtdwJqrZwWGMXl9b/ttXG491NgkTbF 0IhXsvwFvPdAM3jZko1j41RODSaq3rzGzsx8TtssvOkujDK2FTxitsJQM7W5MFAYhUI+ /IMlbdB+3yUHufLhQCEomcfLzCL474OTl8Tdn2+GT7AgmnIstRQMz68HP92hRJr3/v9l HJZn8pSnQeHKiu/4rVTClAHTYsh9h+JFQzw9RXyn3nnKGsLTuVb4vUiKwHd1RwYUAao6 ZM8g== X-Received: by 10.180.198.10 with SMTP id iy10mr809532wic.29.1370945610807; Tue, 11 Jun 2013 03:13:30 -0700 (PDT) Received: from [192.168.1.91] (host86-156-145-148.range86-156.btcentralplus.com. [86.156.145.148]) by mx.google.com with ESMTPSA id x13sm16573904wib.3.2013.06.11.03.13.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 11 Jun 2013 03:13:30 -0700 (PDT) Message-ID: <51B6F847.7000004@gmail.com> Date: Tue, 11 Jun 2013 11:13:27 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: Dmitry Stogov CC: "internals@lists.php.net" , Stas Malyshev , Zeev Suraski References: <51850D2B.80902@ellisons.org.uk> <51AE6ECB.209@ellisons.org.uk> <51AF669A.5010101@ellisons.org.uk> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Multi-level Caching Fork of OPcache -- update From: ellison.terry@gmail.com (Terry Ellison) On 10/06/13 09:20, Dmitry Stogov wrote: > Sorry for slow response. > I'm very busy with other work and have no time for MLC OPcache review. > I don't think we can include it into main tree before 5.5.0 release > anyway. > But in general I think we may include your work in the future releases. > > Also, thanks for useful reports about problems you've found in OPcache :) > > Thanks. Dmitry. > Dmitry, One useful side-effect of writing the MLC support is that I've really had to take apart the core OPcache code to understand how it works. It's probably the first in-depth review that this extension has had from someone _outside_ the Zend team, so its only to be expected that anyone doing this would find a few issues. What I do think needs to be said it that I think that you guys have done a fantastic job here in this development. 9 times out of 10 when I've initially thought "why didn't they do it this way?" when digging into the code, I've dug down in and discovered that you already had, or had approached it a better way. IMO, the whole OPcache approach is tighter and more sound than that of APC. Take one example of this: the 2-pass algo for compiled scripts which enables the storage for a compiled script be to allocated as a single storage unit. This has two major performance benefits at runtime: 1) The memory allocator overheads of preparing scripts for execution (and deallocation at rundown) are reduced by more than an order of magnitude. 2) The memory needed to execute the script is in a contiguous memory areas, and this gives improved hardware (as in L1/L2/L3) caching which passes through to a runtime performance improvement. There are a couple of things that I would refactor if I had written OPcache. (I'll raise a couple of issues on these to discuss what I mean in more depth. and when the MLC work reaches a plateau if you think its worthwhile I can cut a couple of branches to show you a possible solution.) A) The SMA startup bootstrap is just messy and needs refactoring. B) The simple dead-and-rebirth method of refreshing caches isn't going to scale well on real systems. Terry (Note the new email addr that I am using for php.net work, as this one isn't being blocked by the php.net server)