# Performance tuning PHP5

- Thread: https://externals.io/message/1832
- Original archive: https://news-web.php.net/php.internals/1832
- Started by Sterling Hughes on 2003-05-21T00:38:52+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #1832 — Sterling Hughes — 2003-05-21T00:38:52+00:00

URL: https://externals.io/message/1832#1832

Hey,

I've been benchmarking the PHP5 and PHP4.  Found a neat little way to
improve the performance like crazy.  Go into zend_mm.h and change:

#define ZEND_MM

To:

#undef ZEND_MM

And touch zend_alloc.c, recompile, and then rebenchmark.  My tests show
a 15-20% performance improvement *across the board* between before and
after.  This probably increases if you're using a webserver like apache,
where the memory manager really screws things up.

-Sterling


-- 
"C makes it easy to shoot yourself in the foot; C++ makes it harder,  
 but when you do, it blows away your whole leg." 
    - Bjarne Stroustrup

---

## #1836 — Daniel T. Gorski — 2003-05-21T03:16:25+00:00

URL: https://externals.io/message/1832#1836 · In reply to: #1832

Hi,

> #define ZEND_MM
> To:
> #undef ZEND_MM

> And touch zend_alloc.c, recompile, and then rebenchmark.  My tests show
> a 15-20% performance improvement *across the board* between before and
> after.  This probably increases if you're using a webserver like apache,
> where the memory manager really screws things up.

I've here a midsize PHP5 application (about 50K LOC) with a lot of
abstraction layers running as CGI ... disabling MM accelerated the whole
thing by about 25%, or even more.

Are there any problems expected without the MM?

regards dtg

---

## #1868 — Andi Gutmans — 2003-05-21T20:48:58+00:00

URL: https://externals.io/message/1832#1868 · In reply to: #1832

At 05:16 AM 5/21/2003 +0200, Daniel T. Gorski wrote:
>
>
>Hi,
>
> > […]
>
> > […]
>
>I've here a midsize PHP5 application (about 50K LOC) with a lot of
>abstraction layers running as CGI ... disabling MM accelerated the whole
>thing by about 25%, or even more.
>
>Are there any problems expected without the MM?

Nope.

Andi
