perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "McCarrell, Jeff" <jmcca...@akamai.com>
Subject Re: Debugging a long process
Date Wed, 15 Jun 2011 21:00:42 GMT
Hey Tosh

>From my experience, I would guess you may seeing interactions between the
major components of your system as load grows.
If my hunch is true, then following a single request may not show the
issue.
You may need a way to load your system to the point where it shows the
issue.
If all these guesses are true, NYTProf, while an excellent tool, didn't
really help me and may not be much help to you.

You mention you may be running in an EC2 instance, which adds another
layer at which your code may be getting suspended.

When I faced a similar problem, I resolved it by:

- create a test environment that I could push to show the problem
- instrument major blocks of the code with markers and tv_interval() calls
so I could see where time was being spent.
- write a row of timing data for each request
- post process the timing data spread over, in my case, many many
individual requests so I could see how response time changed as load
increased

This took me a few days to get worked out, but once I had it in place, I
was able to tune my system more effectively.
I could 'see' where the bottlenecks were occurring as load increased.
In my case, it pointed to a single component in my stack which was the
bottleneck.
So I fixed that one, then fixed the next hot spot ... you get the picture.

There are a lot of assumptions here that may or may not actually be true
in your case...
HTH,

-- jeff


On 6/15/11 1:29 PM, "Tosh Cooey" <tosh@1200group.com> wrote:

>Hi Fred, I like the idea of "Apache may be blocking on other processes"
>but the Devel::NYTProf docs don't seem to indicate if it would be
>helpful in tracking down the reason for a 30 second execution under
>mod_perl versus a 9 second execution from the shell.  Also there seems
>to be some issues WRT Devel::NYTProf and virtual machines, which I
>believe my EC2 instance is one of.
>
>Is there anywhere to point me to find out more about the blocking issue
>and how to resolve it?


Mime
View raw message