perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tosh Cooey <>
Subject Re: Debugging a long process
Date Wed, 15 Jun 2011 21:53:16 GMT
Hi Jeff, this is very sensible and will likely have to be what gets done.

To respond to Fred, my DEV environment is also a small EC2 instance 
since I want to mirror my production environment.  This line of thought 
prodded me to check my environments and it seems that the PROD Apache is 
running the worker MPM while DEV is running prefork, and boy is there a 
performance difference.

I am waiting to hear back from my server admin before I kill him, but it 
seems that maybe there's some issues with my Ubuntu and the worker MPM 
on a small EC2 instance.

Thank-you both for your insights!


On 6/15/11 11:00 PM, McCarrell, Jeff wrote:
> 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"<>  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?

McIntosh Cooey - Twelve Hundred Group LLC -

View raw message