On Thu, 2006-06-22 at 18:04 -0500, Matthew wrote:
> What really gets the water boiling is that the CGI is coded 'worse' (ie: 
> no strict, no warning, every var a global var, etc..).

There must be something in your new code that is coded in a way that
makes it slow.  A profiler like Apache::DProf is the way to find the
slow part.

> sniplets of my httpd.conf:
> ----------------------------------
> StartServers            10
> MinSpareServers         10
> MaxSpareServers         15
> MaxClients              150
> MaxRequestsPerChild     500

Do you really have enough memory to run 150 apache processes with
mod_perl loaded?  Most people don't.

> <restarted apache>
> Trial 1 CGI - 2.9265
> Trial 2 CGI - 1.8933
> Trial 3 CGI - 2.1517
> Trial 4 CGI - 2.4451
> Trial 5 CGI - 1.9838

Those numbers are too inconsistent to draw any meaningful conclusions.
My guess is that you may be driving the machine into swap here or
choking some other resource like your database.

> Just ran "ab -c 5 -n 1000" once on each and CGI still beat MOD by 0.6 
> seconds.

If you were able to run the same code under Registry and as a handler, I
would expect the handler to be very slightly (a tenth of a second or
less) faster.  In this test though, you're really just measuring the old
code vs. the new code.

- Perrin

Reply via email to