-- Aldemar Bernal <[EMAIL PROTECTED]> wrote
(on Saturday, 05 April 2008, 02:40 PM -0500):
> I've been trying to make my app perform better, every request takes (according
> ab: apache stress tool) ~510ms, which is a lot!, over half second in every
> request?, so I installed and enabled APC but surprisly it performed even worst
> than w/o APC, ~650ms per request. Any of you have tried using APC w/ ZF?
>  
> The best results I had was using a RAM Disk, putting in it only zf it perform
> ~420ms and w/ the app ~330ms.
>  
> My setup is:
>  
> - apache 2.2
> - php 5.2.5
> - apc 3.0.17-dev
> - zf 1.5.1
> - windows xp home
>  
> With the best configuration (zf and app running from ram disk) and using apc
> returns the same results ~330ms (so, no difference at all when using it from a
> ramdisk).

A few things to note.

First, I'm assuming you're using apache with mod_php. On windows, my
understanding is that this simply doesn't perform terribly well. You may
get better results with IIS+FastCGI (heck, you might try FastCGI with
apache to see if that goes better, too). Regardless, Windows and Mac
environments tend not to get you your best performance, though.

Second, IIRC, APC allows you to preload classes. I'd recommend
investigating that option.

Third, how many requests are you benching? You need to run a fair number
of requests with APC to ensure that the cache gets loaded and that
you're actually hitting the cache (one or two requests simply won't do
it). You may be already doing this, but you don't indicate that fact in
your description.

Also, are you using a DB? or any web services? These may also be
contributing to the lag you're seeing.

I've benched some barebones apps in the past, as has Paul M. Jones, and
the fact of the matter is that frameworks tend to be performance hogs,
even when serving simple "Hello World" style pages.  That said, being
able to handle only 1 or 2 requests per second sounds seriously slow,
and I know that most apps I've done with ZF perform much better than
that... particularly when using good caching strategies and not hitting
a DB or web service.

-- 
Matthew Weier O'Phinney
Software Architect       | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/

Reply via email to