Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48079 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85422 invoked from network); 26 Apr 2010 08:15:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Apr 2010 08:15:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=jerome@loyet.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=jerome@loyet.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain loyet.net from 209.85.218.216 cause and error) X-PHP-List-Original-Sender: jerome@loyet.net X-Host-Fingerprint: 209.85.218.216 mail-bw0-f216.google.com Received: from [209.85.218.216] ([209.85.218.216:49577] helo=mail-bw0-f216.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 98/62-08102-6AB45DB4 for ; Mon, 26 Apr 2010 04:15:35 -0400 Received: by bwz8 with SMTP id 8so11574740bwz.23 for ; Mon, 26 Apr 2010 01:15:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.7.212 with SMTP id e20mr2312919bke.117.1272269730711; Mon, 26 Apr 2010 01:15:30 -0700 (PDT) Received: by 10.204.134.152 with HTTP; Mon, 26 Apr 2010 01:15:30 -0700 (PDT) In-Reply-To: <4BD54437.2020304@daylessday.org> References: <4BC58D10.4050609@lerdorf.com> <4BD54437.2020304@daylessday.org> Date: Mon, 26 Apr 2010 10:15:30 +0200 Message-ID: To: Antony Dovgal Cc: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] One suggestion to PHP-FPM From: jerome@loyet.net (=?ISO-8859-1?B?Suly9G1lIExveWV0?=) 2010/4/26 Antony Dovgal : > On 26.04.2010 10:58, J=E9r=F4me Loyet wrote: >> Le 26 avril 2010 04:02, looyao teng a =E9crit : >>> in linux, read the /proc/self(pid)/status, =A0and the VmRSS(real memory= usage) >>> or VmSize(virtual memory usage) =A0is the the memory usage of =A0the cu= rrent >>> process. >> >> in fact I was looking of a cleaner way to do it. > > PECL/memtrack does it already. > I still don't get why do you want to duplicate it in FPM? I think the goal is not the same. PELC/memtrack produce a warning if memory is over the soft limit and stops execution if it's over the hard limit. Moreover, it checks only the memory allocated by the Zend Stack. The goal here is to mesure memory usage after each request and kill the process if it's larger than the limit. We don't wan't to limit each process but we want to check it's been free'd correctly It's easy to do when checking the Zend Stack Size (ZSS ?) but it's not the same if you want to check also memory allocation which have bypassed the ZSS.