Re: One suggestion to PHP-FPM
| From: | Antony Dovgal | Date: | Mon, 26 Apr 2010 08:22:26 +0000 |
| Subject: | Re: One suggestion to PHP-FPM | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-48080@lists.php.net to get a copy of this message | ||
On 26.04.2010 12:15, Jérôme Loyet wrote:
> 2010/4/26 Antony Dovgal <tony@daylessday.org>:
>> On 26.04.2010 10:58, Jérôme Loyet wrote:
>>> Le 26 avril 2010 04:02, looyao teng <tly.phpfans@gmail.com> a écrit :
>>>> in linux, read the /proc/self(pid)/status, and the VmRSS(real memory usage)
>>>> or VmSize(virtual memory usage) is the the memory usage of the 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().
--
Wbr,
Antony Dovgal
---
http://pinba.org - realtime statistics for PHP