Backing up what Jason says, really need to see the Apache/mod_wsgi 
configuration you are using. This should include which Apache MPM is being 
used, MPM settings and any mod_wsgi daemon settings.

Also indicate what version of mod_wsgi you are using.

What you are seeing is typical behaviour when you overload an application. 
Benchmarking at full tilt is nearly always not help to understand where 
bottlenecks are except perhaps to see how your application will die.

One could use a web monitoring solution such as New Relic to try and understand 
bottlenecks, or there are some internal ways of getting at least some capacity 
utilisation metrics out of mod_wsgi itself. Recent mod_wsgi versions (4.X) also 
add in various keys to the WSGI environ dictionary with start times for when 
request hits Apache, is proxied, when hits daemon process etc. This can be used 
to track queuing time and backlogging.

Anyway, place to start is what configuration you are using.

Graham

On 31/10/2014, at 5:16 AM, Jason Garber <[email protected]> wrote:

> You have not mentioned if you are in daemon mode or embedded mode.  I'll 
> assume Daemon Mode, and if you are not already, maybe switching is a good 
> idea.
> 
> Assuming the external web service can handle the load you are throwing at it 
> (which isn't something we should do), then the issue perhaps has to do with 
> your processes and threads configuration.  Unless you have 10 processes with 
> 15 threads, and enough oomph on your server to handle that, then your 
> requests are going to be backlogged while the others complete.
> 
> Suggest you write the request start, api call start, processing start, and 
> processing end time to a log file for each request, and then see what is 
> really happening.
> 
> 
> On Thu, Oct 30, 2014 at 11:29 AM, Ice Prince <[email protected]> wrote:
> Hello again,
> I'm getting a situation related to my application performance that out of my 
> knowledge.
> In short, my app has 2 steps: first, queries a external web service to 
> retrieve some data and the second, process that data and return the result.
> For every single request, the 1st step takes 0.18 sec and the 2nd step takes 
> 0.02 sec for average, so it takes 0.2 sec in total to serve an single 
> request. (just put a time measurement in code to get these numbers)
> And if i using: siege -i -d1 -c1 http://my_applition  , the "Response time:" 
> also is 0.2sec too.
> 
> Now the issue happens if i run: siege -i -d1 -c150 http://my_applition , the 
> 1st step which queries external web service increase the time consumption to 
> 1sec (i'm not sure it is overloaded or not), the 2nd step still the same 
> 0.02sec as normal, but overall, my app become slowly and the "Response time:" 
> by siege show the result is 6sec.
> 
> I don't know which progress consume my time, please help me an idea. Thanks 
> in advance.
> 
> Minh Tuan. 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/modwsgi.
> For more options, visit https://groups.google.com/d/optout.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/modwsgi.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to