Discussions

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 minProcessorsfor 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

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.

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 allocateheap 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.

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)

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.

TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations technology projects - with its network of technology-specific websites, events and online magazines.