Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48090 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79702 invoked from network); 26 Apr 2010 14:25:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Apr 2010 14:25:55 -0000 Authentication-Results: pb1.pair.com header.from=r@roze.lv; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=r@roze.lv; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain roze.lv designates 213.175.74.1 as permitted sender) X-PHP-List-Original-Sender: r@roze.lv X-Host-Fingerprint: 213.175.74.1 roze.lv Linux 2.6 Received: from [213.175.74.1] ([213.175.74.1:19240] helo=zeona.lv) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 45/84-58325-172A5DB4 for ; Mon, 26 Apr 2010 10:25:53 -0400 Received: from KD5 (hq.draugiem.lv [81.198.68.1]) by zeona.lv (Postfix) with SMTP id 720FA22812FBF for ; Mon, 26 Apr 2010 17:25:50 +0300 (EEST) Message-ID: <36701B7BE4054FB3A72CFFB6B8A81DF5@KD5> To: References: <4BD54437.2020304@daylessday.org> <4BD54D42.5070400@daylessday.org> <4BD564A9.2060000@daylessday.org> <4BD57525.50803@daylessday.org> Date: Mon, 26 Apr 2010 17:25:48 +0300 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5843 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-EsetScannerBuild: 7011 Subject: Re: [PHP-DEV] One suggestion to PHP-FPM From: r@roze.lv ("Reinis Rozitis") >> Let's start from the beginning. >> How are you going to detect how much memory a thread consumes? >> >no ideas There is an old patch in the Zends PAT directory http://devzone.zend.com/content/patch/pat38.txt (it reads the /proc/pid though or fallbacks to getrusage). Have used this for quite a time in past but got to conclusion that just finetuning the max_requests setting works better even with leaking code/extensions as the small leaks get _fixed_ when the child restarts but for the big ones (like imagemagick used to be) killing the child each time is rarely any solution either. Of course the option to make the childs permanent and from time to time check the memusage could be usefull. rr