Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48081 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88171 invoked from network); 26 Apr 2010 08:23:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Apr 2010 08:23:36 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 74.125.82.42 mail-ww0-f42.google.com Received: from [74.125.82.42] ([74.125.82.42:60150] helo=mail-ww0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D1/03-08102-78D45DB4 for ; Mon, 26 Apr 2010 04:23:36 -0400 Received: by wwb18 with SMTP id 18so589456wwb.29 for ; Mon, 26 Apr 2010 01:23:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=gTTB0bA3VpmtkXULYrBoE3ABNgNXhJeH8jDgiobtm+c=; b=urT0CqO+4Tp1Kfl1BhY9TK4k740Jw444X9LeBjUaj1gmtBKt7IVEO2ZHQ4yuUHrnX2 J/ZIk4rcrqg53kxWlSpuOop++QGR+Tm/1CvLzn0oebk5oNh5aE7t2PYYBDWFDovVKTrW khoSV3fXjcGsJfTjiIacAmBuaYKQTrB5fR0tk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=UXJxbWXFE9rVA8XD7weFYPhknRI589NHSFpB1kQJvWz64gapTKLQQRrsbPAktKXjtt RJ+Ph2s0WL3/wqUfLb7RHSuTnhztVnKYNVNUdSeag5P+GeeCOxPF8ApDCdqk6pMFiqKg Geec0LAuTm82kUJzjx64xhj78HEqZoyD8NC1s= MIME-Version: 1.0 Received: by 10.216.90.84 with SMTP id d62mr1096280wef.211.1272270212483; Mon, 26 Apr 2010 01:23:32 -0700 (PDT) Received: by 10.216.174.145 with HTTP; Mon, 26 Apr 2010 01:23:32 -0700 (PDT) In-Reply-To: <4BD54D42.5070400@daylessday.org> References: <4BC58D10.4050609@lerdorf.com> <4BD54437.2020304@daylessday.org> <4BD54D42.5070400@daylessday.org> Date: Mon, 26 Apr 2010 10:23:32 +0200 Message-ID: To: Antony Dovgal Cc: =?ISO-8859-1?B?Suly9G1lIExveWV0?= , 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: pierre.php@gmail.com (Pierre Joye) hi, I agree with Tony. Such features should be part of memtrack or the engine but not SAPI specific. Cheers, 2010/4/26 Antony Dovgal : > On 26.04.2010 12:15, J=E9r=F4me Loyet wrote: >> 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 memo= ry usage) >>>>> or VmSize(virtual memory usage) =A0is the the memory usage of =A0the = current >>>>> 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. > > You can always add another limit and another action. > >> Moreover, it checks only the memory allocated by the Zend >> Stack. > > Nope. > >> 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. > > That's why memtrack uses mallinfo(). --=20 Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org