Re: Re: php daemons, memory
| From: | jvlad | Date: | Sun, 11 Jan 2009 14:51:36 +0000 |
| Subject: | Re: Re: php daemons, memory | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-42558@lists.php.net to get a copy of this message | ||
> On 11.01.2009 03:21, jvlad wrote:
>> Almost.
>> Try to compile your very-own-version of php, using configure argument
>> --disable-zend-memory-manager
>
> There is no such configure option since ages.
seems you're flying too high.
RHEL5 still ships php5.1.6 and it has this option and it undefines
ZEND_USE_ZEND_ALLOC.
For the newer versions (5.2.x) it can be set at the environment, which is
not that good btw.
> That won't affect memory usage very much.
I gives appox 2MB per php-cli instance. Sometimes it's good enough, if for
example you need to run 200 instances.
>> - --enable-debug did report some small leaks, but much less then the
>>> consumption grow.
>>
>> zend memory manager won't release memory to the system.
>
> That's plain wrong.
> Of course it does free() memory whenever it thinks the memory should be
> free()-ed.
> Though that doesn't guarantee that the OS is be able to reuse this memory.
Antony, I think you're wrong with this. ZMM does never release memory to the
system. Instead it puts free chunks into its own free memory chain.
See how _zend_mm_free_int() works in 5.2.5 and it's the only function that
is called from for example _efree, at least when ZMM is enabled.
-regards,
jv.