Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76310 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48735 invoked from network); 1 Aug 2014 22:17:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Aug 2014 22:17:16 -0000 Authentication-Results: pb1.pair.com smtp.mail=laruence@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=laruence@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.181 as permitted sender) X-PHP-List-Original-Sender: laruence@gmail.com X-Host-Fingerprint: 209.85.217.181 mail-lb0-f181.google.com Received: from [209.85.217.181] ([209.85.217.181:44097] helo=mail-lb0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 69/64-23250-BE11CD35 for ; Fri, 01 Aug 2014 18:17:15 -0400 Received: by mail-lb0-f181.google.com with SMTP id 10so3584806lbg.40 for ; Fri, 01 Aug 2014 15:17:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=SRV+cR81x6WBHQw7KDo8xPGIrJKyomQ7qroe5pnFfUc=; b=X8Y7oaqEaIQ9fSa+FLVahxRSSxqvZ5EBWIwUzphNXttilJ417uVb8IJnYkWRmC7zhF TvCHHMTW1lBrJOwebofQnyOXA5gcdzydP2L7A26Be2LTio933fraFmrvkaHFPCb+lESO 6u0xZQiKpIj7wd7U0Ulzg0yUNyYuFupkVSouHQAidJo8YOPhQxqHeFE090NWdOkvGPWa +rJLqEud4t9GQQ53Ywyyp7HcAwAcSPxCPpKk7X7EDXltXTJyUDochVItM9AtrLRkdCi8 fqnEUDJLEj51WgXSpo1FOi7e9MCyPPKpsmf3yOmflXKRnFbcNdeXGxM6qGdXEWxgJPJG vwBw== X-Received: by 10.153.7.101 with SMTP id db5mr3816066lad.46.1406881280976; Fri, 01 Aug 2014 01:21:20 -0700 (PDT) MIME-Version: 1.0 Sender: laruence@gmail.com Received: by 10.114.187.72 with HTTP; Fri, 1 Aug 2014 01:21:00 -0700 (PDT) In-Reply-To: <21.50.09748.8007AD35@pb1.pair.com> References: <25.82.08559.C1852D35@pb1.pair.com> <21.50.09748.8007AD35@pb1.pair.com> Date: Fri, 1 Aug 2014 16:21:00 +0800 X-Google-Sender-Auth: WitiYyD2TfaqJDPbcKGz3lYzGGE Message-ID: To: Pascal Chevrel Cc: PHP Internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Reporting bugs for phpng From: laruence@php.net (Laruence) On Fri, Aug 1, 2014 at 12:34 AM, Pascal Chevrel wr= ote: > Le 31/07/2014 16:23, Laruence a =C3=A9crit : > >> Hey: >> >> On Thu, Jul 31, 2014 at 8:29 PM, Pascal Chevrel >> wrote: >>> >>> Le 26/07/2014 04:42, Laruence a =C3=A9crit : >>> >>>> Hey: >>>> >>>> On Fri, Jul 25, 2014 at 9:14 PM, Pascal Chevrel >>>> wrote: >>>>> >>>>> >>>>> Hi, >>>>> >>>>> I tried the .deb package for phpng that Zend provides since yesterday >>>>> (thanks for that!) and I hit a memory consumption issue with the firs= t >>>>> of >>>>> my >>>>> scripts I tried: >>>>> >>>>> PHPNG: >>>>> Memory peak: 62914560 (55.97MB) >>>>> Elapsed time (s): 0.3383 >>>>> >>>>> PHP 5.5: >>>>> Memory peak: 1835008 (1.64MB) >>>>> Elapsed time (s): 0.0717 >>>>> >>>>> How/where can I make a bug report about it? Is https://bugs.php.net/ = ok >>>>> for >>>>> PHPNG bugs? >>>> >>>> >>>> PHPNG is not listed in bugs.php.net yet. but as it's a branch of PH= P >>>> , I think it's okey to report it there, and note it's PHPNG in the >>>> comment. for now. >>>> >>>> thanks >>> >>> >>> >>> Hi, >>> >>> I opened this bug: >>> https://bugs.php.net/bug.php?id=3D67725 >>> >>> I put a testcase triggering the memory leak in a github repo referenced >>> in >>> the bug. >> >> I am afraid this is not a bug. >> >> it's due to our new immutable array implementation. >> >> all these langs map array are constant array, such it will be treat as >> immutable array, which means it will not be released untill the >> request shutdown. (which will bring significant performance >> improvement for saving array construct/destruct while use with >> opcache) >> >> I suggest you to increase the memory_limit as a workaround .. >> >> Anyway, Dmitry, what do you think? maybe something like >> interned_string_size? >> > > Hi, > > The problem is that the more arrays I load, the more memory PHPNG consume= s > while current versions of PHP have that value mostly stable. I have with > PHPNG a scalability issue I don't have with regular PHP. If tomorrow I > increase the number of languages I support in my app from 70 to 200 (whic= h > is my long term goal btw), I would probably need to set memory_limit to > 700MB which seems honestly crazy when PHP 5.x needs 8MB for the same scri= pt > to run at the same speed. As an end user, I think it's a bug not a featur= e, > I hope you understand my point of view :). I understand your point, and the problem, but the thing here is, do you really needs loads all langs map arrays in a single request(as I understand you only need one per request, right?) > > Also, people on shared hosting can't change the memory_limit value, it > doesn't sound like a change that is good for PHP in shared hosting > environment which is a large part of PHP success. > > You mention that it is beneficial when OPCache is activated, but it isn't > activated by default, so the theoretical gain would only work for people > that can activate it, right? Or does it mean that OPCache would be activa= ted > by default in PHP 7? I will suggest to enable it by default in NG. > > Is there no way to release the memory programmatically before the request > ends? Shouldn't explicitely using unset() on the array at the end of each > iteration indicate to the engine that I don't just want to destroy the ar= ray > reference but also get the memory back? That sounds like a very significa= nt > change in how PHP behaves today with arrays, doesn't it? PHPNG is promote= d > as a big speed optimization that wouldn't impact userland code, well, in = my > case it does and very significantly if parts of my app crash or use 20 or= 30 > times more memory than before for a 5% speed gain, it's not a win. If the= re > is a way to force PHP to unload that data from memory and basically behav= e > like PHP 5.x it could at least be in PHP 7 upgrade release notes for peop= le > like me that build stuff on today's PHP strengths. hmm, I will definitely ask dmitry 's idea.. thanks > > Thanks, > > > Pascal > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > --=20 Laruence Xinchen Hui http://www.laruence.com/