TomcatExpert

Factors to consider in determining number of concurrent instances for your hardware

posted by SpringSource on April 16, 2010 06:20 AM

Determining the best configuration for concurrency is dependent upon the application running on Tomcat.

Because every application is so different, there are no general guidelines for how many instances you setup on different kinds of hardware, but there is a way to determine how your application will best run on your given hardware.

To determine what is the best config:

1. You need some sort of load test or measurement of performance
2. Start out with one instance, the reason for this is simplicity. Have this instance setup with maxThreads="400"
3. Run the load test

At this point, you'll get a sense for what the application is doing. Repeat the process with threads counts of 50, 200 and 800. Most applications do a bit better with lower counts.

Lets say that 50 gives you some good performance, then you can scale up the number of instances to 2,3 or 4.
You'd only scale up the instances if you have more CPU resources available.

The goal is always to have the least amount of instances running, simply cause its easier to manage, monitor, troubleshoot and all the other good stuff. However, not all applications handle concurrency very well. In that case, you should lower the thread counts and increase the instance number

For more than 10 years, SpringSource employees have been supporting Apache technologies, with unparalleled experience and commitment to the Apache Software Foundation. More than 400 of the Fortune 500 count on SpringSource to support their mission-critical business applications. Leaders of the Apache Software Foundation, including Board Members, work at SpringSource and dedicate a significant amount of time further developing the Apache Tomcat open source project. Over the last 2 years, 95% of the issues fixed in the Apache Tomcat project were fixed by SpringSource engineers. For more information on how SpringSource can help your enterprise, see the SpringSource website, or call 800/444-1935.

Comments

Post new comment

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.