Hi,
Please take a look into the proposed new Memory Manager for PHP:
https://github.com/php/php-src/pull/777
The patch provides visible performance improvement on real life apps
(tested on Linux 32 and 64 bit). It's based on ideas mainly borrowed from
jemalloc and tcmalloc.
I hope, the patch must implement all the features of previous memory
manager except for "overridable storage", but I might miss something.
It would be great if experienced people could analyze the sources and give
their opinion.
Thanks. Dmitry.
Hi,
Please take a look into the proposed new Memory Manager for PHP:
It looks like the gains are mostly earned by passing size information;
is that correct?
Hi,
Please take a look into the proposed new Memory Manager for PHP:
It looks like the gains are mostly earned by passing size information;
is that correct?
Nope, this is an entirely new allocator implementation. GitHub doesn't show
it in the diff because there are too many changes. See the file
https://github.com/dstogov/php-src/blob/xx_malloc/Zend/zend_alloc.c
Nikita
Hi,
Please take a look into the proposed new Memory Manager for PHP:
It looks like the gains are mostly earned by passing size information;
is that correct?Nope, this is an entirely new allocator implementation. GitHub doesn't show
it in the diff because there are too many changes. See the file
https://github.com/dstogov/php-src/blob/xx_malloc/Zend/zend_alloc.c
Ah, I knew it couldn't be that simple. Thanks for pointing out my oversight.
Hi,
I'm going to commit this on next week, if nobody cares.
MM is a self containing subsystem, and it must not affect anything else.
Thanks. Dmitry.
On Mon, Aug 18, 2014 at 12:04 PM, Nikita Popov nikita.ppv@gmail.com
wrote:Hi,
Please take a look into the proposed new Memory Manager for PHP:
It looks like the gains are mostly earned by passing size information;
is that correct?Nope, this is an entirely new allocator implementation. GitHub doesn't
show
it in the diff because there are too many changes. See the file
https://github.com/dstogov/php-src/blob/xx_malloc/Zend/zend_alloc.cAh, I knew it couldn't be that simple. Thanks for pointing out my
oversight.
Hi,
I'm going to commit this on next week, if nobody cares.
MM is a self containing subsystem, and it must not affect anything else.Thanks. Dmitry.
I compared this to master on a small PHP array vs SplFixedArray
performance test I had lying around. It's a fairly small difference,
but the new memory manager does seem to be consistently faster. No
complaints from me.