You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by CrystalCracker <su...@gmail.com> on 2009/06/01 16:03:38 UTC

Tomcat Concurrent Requests

Given that each request takes 2 seconds on average. Among them, some of them
take less than 500ms, and some take as long as 5 seconds or even a little
more sometimes.

How many  such concurrent request would a tomcat server running on a double
quad-core server handle?

I am trying to understand the relation between CPU, response time and no of
concurrent requests.
-- 
View this message in context: http://www.nabble.com/Tomcat-Concurrent-Requests-tp23815501p23815501.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Tomcat Concurrent Requests

Posted by Peter Crowther <Pe...@melandra.com>.
> From: David kerber [mailto:dckerber@verizon.net]
> CrystalCracker wrote:
> > How many  such concurrent request would a tomcat server
> > running on a double quad-core server handle?
> >
> At least 8 (1 per core), but that's about all you can tell without
> finding where the bottlenecks are.

If I wanted to *really* split hairs, I'd point out that one request might launch background threads and even this isn't necessarily true.  But I'm splitting hairs now.

                - Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat Concurrent Requests

Posted by David kerber <dc...@verizon.net>.
CrystalCracker wrote:
> Given that each request takes 2 seconds on average. Among them, some of them
> take less than 500ms, and some take as long as 5 seconds or even a little
> more sometimes.
>
> How many  such concurrent request would a tomcat server running on a double
> quad-core server handle?
>   
At least 8 (1 per core), but that's about all you can tell without 
finding where the bottlenecks are.

> I am trying to understand the relation between CPU, response time and no of
> concurrent requests.
>   

D



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Tomcat Concurrent Requests

Posted by Peter Crowther <Pe...@melandra.com>.
> From: CrystalCracker [mailto:sudarshan.acharya@gmail.com]
> The 5 seconds calls are all database or webservice calls. So
> they all go to waiting state.

OK.  So the bottleneck almost certainly isn't Tomcat.

> I did some load tests using JMeter, but I had problems coming to a
> conclusion with the data. What should I look for exactly? Because as I
> increase the no of concurrent requests, the app starts
> responding slower and slower.

1) Make sure you're measuring the important things.  You should be measuring load on Tomcat, but also on the database and on the web services - and on the network!

2) Look for the bottleneck.  It may be in an odd place - RAM or (equivalently, in many cases) disk seeks per second on the database server are both common bottlenecks.  There's no guarantee it's on your Web server at all (though it might be).

JMeter's output isn't useful for finding bottlenecks.  The output of tools on your servers *is* useful.  On Windows, Performance Monitor is your friend.  On UNIX, vmstat and iostat are good first lines of attack; your flavour of UNIX probably has better tools than those.

                - Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Tomcat Concurrent Requests

Posted by CrystalCracker <su...@gmail.com>.
The 5 seconds calls are all database or webservice calls. So they all go to
waiting state.

I did some load tests using JMeter, but I had problems coming to a
conclusion with the data. What should I look for exactly? Because as I
increase the no of concurrent requests, the app starts responding slower and
slower.




-- 
View this message in context: http://www.nabble.com/Tomcat-Concurrent-Requests-tp23815501p23816012.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Tomcat Concurrent Requests

Posted by Peter Crowther <Pe...@melandra.com>.
> From: CrystalCracker [mailto:sudarshan.acharya@gmail.com]
> Given that each request takes 2 seconds on average. Among
> them, some of them
> take less than 500ms, and some take as long as 5 seconds or
> even a little more sometimes.
>
> How many  such concurrent request would a tomcat server
> running on a double quad-core server handle?

It's totally dependent on your application.  If a 5-second request is CPU-bound for all that time, very few.  If it's mostly waiting for data to be returned from a database or web service, probably quite a lot - but you may be saturating the database.  At the extreme, I could write a webapp that slept for 500ms to 5 seconds, then returned some fixed output - almost no memory use, almost no CPU use, and it would scale very well indeed.

There is only one way to find out how your application will perform: measure it.  And measure end-to-end, with measurements of load-balancers, databases, web service back-ends and so on.  Anything else won't give you a true picture.

There is one general point, though.  You'll need to set up enough threads on your connector that you can handle that degree of concurrency, or Tomcat will become a bottleneck.

                - Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org