After running MMCache for a day I have mixed feelings about it.
Our site felt faster when I browsed it but when I examined the logs the results were disappointing. Hourly adviews were almost all down by up to a 25% but mostly by 10%, but for an hour or two exceeded the previous day’s ones. By the end of the day, adviews were down by almost 10% in total.
I benchmarked both applications this morning using Siege.
MMCache performed marginally better in all tests, but only by a few percent.
MMCache caused a few problems for us, mainly because it reintroduced a limitation of PHP3. In PHP3 a class or function couldn’t be defined twice, but that’s changed in PHP4. I had to go around editing php files yesterday changing include/require to include_once/require_once which fixed 99.99% of the problems.
I may try it again next week but for now, it’s back to PHP Accelerator.
Out of curiosity I attempted the same benchmark without using any cache/optimizer. I stopped it halfway through when the load average of the box hit 40. Oops.
Related links: The Joy of Turck MMCache | TikiBoosting | which php compiler cache is stable? | PHP caching and optimization
By using the ./phpa_cache_admin tool I found out that the shm cache used by PHPA was disabled. I know it *was* enabled so that might be something to watch out for if you have it installed. Hits are way up since I activated it!
Looks like I can’t allocate more than 32MB to the shm cache too, but setting the shm_ttl to 20 minutes makes sure that only very commonly accessed pages are stored there!