-- Dennis Fogg <[EMAIL PROTECTED]> wrote (on Friday, 12 October 2007, 06:03 PM -0700): > I did some more investigation: > > I'm not getting much of a performance boost from either eAccelerator or Zend > Optimizer > over no op code cache for my ZF infrastructure, which is a bit of a > surprise. > > I decided to try optimization on code that everyone can try. > I loaded Rob Allen's current ZF tutorial (zf_tutorial-1.4.1.zip) at > http://akrabat.com/zend-framework-tutorial/ > and added some timing functions in a file called util.php and placed it in > the library dir. > I also modified his index.php. Both these files are included in this post. > http://www.nabble.com/file/p13185506/util.php util.php > http://www.nabble.com/file/p13185506/index.php index.php > > The results: > > It's much faster: zend framework page generation takes about 0.4 sec. > > I used MySQL this time and the db connection times are quick! About 0.02 - > 0.03 sec on my computer compared to 0.57 sec with Postgres. > > The op code cache solutions are not providing much of a performance boost. > The optimizers might improve performance a bit but it's hard to tell. > I did not load the data in excel so this is more of an eyeball result, but > you can try it yourself. > > If others try the code (esp on linux), please report some numbers so > comparisons can be made. If you find op code caches are giving a big > performance improvement, that would be interesting to know. Also, if > you find that postgres on linux performances much faster, that would > be great to know!
I'm *very* surprised that you're not noticing a difference using an opcode cache. I've used them extensively, though I haven't done any benchmarks, but have always noticed a performance improvement after installing them. Unfortunately, I don't have any empirical benchmarks to point to right now. I'm fairly certain that Paul M. Jones has run benches with and without an opcode cache, but you'll need to check his research to be certain. When you ran your benches, did you do an average over a large number of iterations? You never indicated your sample size. Typically, you should run these over many thousands of requests. Opcode caches only really show their power after several requests have been made and the byte codes have been cached. If you could indicate the full environment and the number of iterations you did, that would give us all something precise to run and against which we can compare. -- Matthew Weier O'Phinney PHP Developer | [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/
