We have Dell PowerEdge Dual Processor Machine with 1GB RAM.
We are using tomcat 4.1.29 server for running struts-based application. Application needs to support around 4000 user simultaneoulsy with moderate response time.
should i increase number of maxProcessor and minProcessors
for connector in server.xml file for more performance if yes how much it should be?
Besode it how can i utilize my system to full potential
-
Tomcat Processors (8 messages)
- Posted by: adnan memon
- Posted on: March 25 2004 06:52 EST
Threaded Messages (8)
- Tomcat Processors by Atlas Casa on March 25 2004 09:52 EST
- Session Replication by Darrick Baldwin on March 25 2004 10:39 EST
- Session Replication by Atlas Casa on March 25 2004 12:56 EST
- JavaGroups by Darrick Baldwin on March 25 2004 02:42 EST
- Session Replication by Atlas Casa on March 25 2004 12:56 EST
- Tomcat Processors by Sean Sullivan on March 25 2004 18:55 EST
- documentation by leerutg leerutg on March 25 2004 21:00 EST
- Tomcat Processors by Andrew McGhee on March 29 2004 08:20 EST
- Tomcat Processors by Dorel Vaida on May 04 2004 06:44 EDT
-
Tomcat Processors[ Go to top ]
- Posted by: Atlas Casa
- Posted on: March 25 2004 09:52 EST
- in response to adnan memon
Adnan,
1- You should change the jvm parameters to take advantage of your 1G Ram
2- you could also configure multiple tomcat instances along with in memory session replication.
A -
Session Replication[ Go to top ]
- Posted by: Darrick Baldwin
- Posted on: March 25 2004 10:39 EST
- in response to adnan memon
We are currently testing the multiple instances on tomcat on the same box using 4.1.27 but we are going to use sticky session with apache and the modjk connector because I thought tomcat session replication was only introduced in 5. Can you explain the memory session relplication. -
Session Replication[ Go to top ]
- Posted by: Atlas Casa
- Posted on: March 25 2004 12:56 EST
- in response to Darrick Baldwin
-
JavaGroups[ Go to top ]
- Posted by: Darrick Baldwin
- Posted on: March 25 2004 14:42 EST
- in response to Atlas Casa
So does the new Tomcat 5.0 use the JavaGroups jars for their session replication or do they use another method or implementation? -
Tomcat Processors[ Go to top ]
- Posted by: Sean Sullivan
- Posted on: March 25 2004 18:55 EST
- in response to adnan memon
Application needs to support around 4000 user simultaneoulsy with moderate response time.
1) Do you want to support 4000 concurrent sessions?
2) Are you expecting 4000 HTTP requests per minute?
Or 4000 HTTP requests per second? -
documentation[ Go to top ]
- Posted by: leerutg leerutg
- Posted on: March 25 2004 21:00 EST
- in response to Sean Sullivan
Although you can get tips and tricks here a good place to start is tomcat documentation and performance tuning guides. It takes couple of hours of reading but bottom line you should be able to understand what parameters you are changing for your application
You can tune your JVM as well as App server and the database if you have one
Few parameters you can play with are
# of threads or thread pool, based on user need and availbility you can allocate
heap size ( not recommended beyond 75% of available memory)
Frequency of garbage collection - depends on how long each session (4000) would typically last
This is basic tuning. You can tune the app server for execute queues, detect/release stuck threads, connection pools etc. Your requirements define what you can do. -
Tomcat Processors[ Go to top ]
- Posted by: Andrew McGhee
- Posted on: March 29 2004 08:20 EST
- in response to adnan memon
Have to agree with previous posts.
Setup your tomcat to a large chunk of memory if you can, to handle the possible large number of sessions needing replication "CATALINA_OPTS=-server -Xms768m -Xmx768m".
Storing 4000 session objects within tomcat shouldn't be a problem (unless you are going to be putting heavy objects into each session) - as long as the session per user doesn't contain too much data.
The real question, listed previously, is how many "truely concurrent users".
You really need to know how many users "per second" or at least "per hour" are comming onto the system. Only from this can you see how many threads you are going to need for tomcat.
A possible starting point, 4000 users per hour (thats 1.11 users "per second" accessing your system).
Assume a "burstiness" ratio of 3-4 (this is a fudge factor to account for uncertainties, and that you never get a real average.) this gives 4.44 users "per second" worst case.
Need to know worst possible query response time - lets assume 2 seconds for tomcat/struts to serve up a response (use of agressive caching to achieve this, can hopefully be done). This means you need to handle 8.88 users simultaneously at any moment in time. Tomcat would need 10 worker threads dedicated towards handling requests.
Should users per hour go up, or response increase, you'll need more threads.
Main points - keep your request time as low as possible (agressive caching / good design), and make sure you are running in server mode (easy to forget, we have on many occaisons! And it makes a hell of a difference) -
Tomcat Processors[ Go to top ]
- Posted by: Dorel Vaida
- Posted on: May 04 2004 06:44 EDT
- in response to adnan memon
and make sure you are running in server mode (easy to forget, we have on many occaisons! And it makes a hell of a difference)
Also you might want to give JRockit a chance. Last time I checked the difference between Sun JVM and JRickit, simply using it gave me a certain performance boost (around 50% even better). Used Tomcat5 though.