2008
10.26
10.26
Environment:
- Macbook Pro, Intel Core 2 Duo 2.33 GHz, 2GB RAM, 120 GB FUJITSU MHW2120BH
- Prebuilt MAMP installation (Apache/2.0.59 (Unix) PHP/5.2.1 DAV/2 mod_ssl/2.0.59 OpenSSL/0.9.7l)
- Background Applications running during tests: Safari, Firefox, TextMate, JMeter, MySQL Administrator, iTunes, Adium, Terminal… I had 25% RAM available!
Test Mule:
- CakePHP 1.2.0.7692 RC3 Framework
- Unfinished project’s controller that pulls two random user id’s, and adds them as friends.
- I decided to do the test without writing to the database, since it created too much inconsistency (depending on how well my local MySQL was responding)
- All methods involved are read-only.
- There’s a few checks in between like user1 and user2 cannot be the same, not friends yet, etc.
- No View caching involved.
Benchmarking Tools:
- Test Mule (see above)
- Jakarta JMeter (yes, running on the same system as the web server). JMeter will visit the site using 5 threads (concurrent users) and 100 loop counts; a total of 500 hits each run.
Benchmarking Cases:
- Baseline (no optimizers and no opcaching)
- Zend Optimizer v3.2.6 only
- Zend Optimizer + eAccelerator
- Zend Optimizer + XCache
- eAccelerator v0.9.5 only
- XCache v1.2.0 only
Now to the nitty-gritty…
Baseline
Average 383ms per request at 12.7 requests/sec. See graph & summary
Zend Optimizer v3.2.6 only
Average 443ms per request at 11.1 requests/sec. See graph & summary
Zend Optimizer + eAccelerator
Average 154ms per request at 30.4 requests/sec. See graph & summary
Zend Optimizer + XCache
Average 149ms per request at 32.5 requests/sec. See graph & summary
eAccelerator v0.9.5 only
Average 138ms per request at 35.9 requests/sec. See graph & summary
XCache v1.2.0 only
Average 133ms per request at 36.5 requests/sec. See graph & summary
Summary
To be fair, I ran about 10 runs each before I finally took a screenshot. This allows the web server and application to warmup from a restart. I also monitored the graphs and only took the run that had the most consistency. Some runs would have weird hiccups in between, and that was unacceptable for me.
I have been running a Zend Optimizer + eAccelerator combo for awhile now. Mostly due to ignorance and reading other blogs and articles out there. Now that I have an idea of what I’m dealing with, I’m turning off Zend Optimizer, eAccelerator and will be running on XCache alone. I’ll run these same tests against one of our Web Servers at work. We’ll see what happens.
GsIKmy Thanks for good post