Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68345 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21695 invoked from network); 31 Jul 2013 10:35:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Jul 2013 10:35:52 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain zend.com from 209.85.128.177 cause and error) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.128.177 mail-ve0-f177.google.com Received: from [209.85.128.177] ([209.85.128.177:49732] helo=mail-ve0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5A/D1-07795-788E8F15 for ; Wed, 31 Jul 2013 06:35:51 -0400 Received: by mail-ve0-f177.google.com with SMTP id cz11so539911veb.36 for ; Wed, 31 Jul 2013 03:35:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=PZLG4SGrpWLaALonkH4vyJFBKn7PwwM5KDdJlFqZsec=; b=oa1mLtSW6EBR/bLc57fBML2bap5550ULYApTJVNfU+bct6hU2n6WvtnqE98V+HY7Ke 4/CEHtnaIPQQCohbA8idQGWdu7YBpchu6x40dc/RK5fSG07BQpJCxMXd6vokxypomb8P sJ9zbJ10ehxmF2f3IK++adFcqSLADqbzR6h4o+iVj06VwqFQpKJY3VYYQ7RFKZNKxKg9 AgFyvrUviGb9/lahipEZnKEVCCL9/kOH25fXdPWL0Cl7jvv78/Y2fcMjub+sGHmShuwn t0hZqATT0zX2z4jWxrttE31qrcWQYJ4FUNBVhJUVgx3ULAfn16qEPGvjQd9z1dxlp90L eZPg== MIME-Version: 1.0 X-Received: by 10.58.251.144 with SMTP id zk16mr27777981vec.37.1375266949103; Wed, 31 Jul 2013 03:35:49 -0700 (PDT) Received: by 10.52.112.74 with HTTP; Wed, 31 Jul 2013 03:35:48 -0700 (PDT) In-Reply-To: <51B6F847.7000004@gmail.com> References: <51850D2B.80902@ellisons.org.uk> <51AE6ECB.209@ellisons.org.uk> <51AF669A.5010101@ellisons.org.uk> <51B6F847.7000004@gmail.com> Date: Wed, 31 Jul 2013 14:35:48 +0400 Message-ID: To: Terry Ellison Cc: "internals@lists.php.net" , Stas Malyshev , Zeev Suraski Content-Type: multipart/alternative; boundary=089e013cbfbef9446904e2cc4932 X-Gm-Message-State: ALoCoQkLSiZ7NqruX8ImtF5FwCS3jyqhC5srHsGo49okYASfKwvu5E2PSBtxLfAaO9voOpZ6lOeTYvfDf6NSN0lv2PoxO1Ygl5+1kV5K3IDPpw23PB9a0PF/v65O7U2d6ybbEI7ZikrD Subject: Re: [PHP-DEV] Re: Multi-level Caching Fork of OPcache -- update From: dmitry@zend.com (Dmitry Stogov) --089e013cbfbef9446904e2cc4932 Content-Type: text/plain; charset=UTF-8 I agree with both (A) and (B). However (B) was done on purpose and has its advantages and disadvantages. Anyway, I've opened https://github.com/zendtech/ZendOptimizerPlus/issues/118 C) file based opcode caching may be interesting as well but all these requests are going to be a part of next major release (may be in php-5.6) Thanks. Dmitry. Thanks. Dmitry. On Tue, Jun 11, 2013 at 2:13 PM, Terry Ellison wrote: > 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) > --089e013cbfbef9446904e2cc4932--