Discussions
Performance and scalability: Will having two TomCat improve the application performance?
-
Will having two TomCat improve the application performance? (4 messages)
- Posted by: ahmad fairuz
- Posted on: January 08 2007 03:30 EST
Hi All, Currently, my application are using 1 Tomcat to do database transaction.However, the performance are very low. I'm thinking of having another Tomcat in the same machine. Does having two Tomcats in one machine will improve the application performance? thank you, fairuzThreaded Messages (4)
- First, find the bottleneck by Cameron Purdy on January 08 2007 07:41 EST
- 2 tomcat in the same box by ahmad fairuz on January 08 2007 09:12 EST
- Re: 2 tomcat in the same box by Cameron Purdy on January 08 2007 12:25 EST
- 2 tomcat in the same box by ahmad fairuz on January 08 2007 09:12 EST
- Might degrade the perf as well by Rajesh Balamohan on January 08 2007 19:16 EST
-
First, find the bottleneck[ Go to top ]
- Posted by: Cameron Purdy
- Posted on: January 08 2007 07:41 EST
- in response to ahmad fairuz
Hi Fairuz,Currently, my application are using 1 Tomcat to do database transaction.However, the performance are very low. I'm thinking of having another Tomcat in the same machine. Does having two Tomcats in one machine will improve the application performance?
It depends on where the bottleneck is. If the application is slow with only a few users, then it is unlikely that adding another Tomcat will solve the problem. Try this: 1) While the app is running slowly, look at the database utilization. If it is very high (close to 100%) then the database is likely the bottleneck. 2) Otherwise, if the db utilization is low, then check the CPU utilization on the Tomcat box. If the Tomcat utilization is high, then you might be able to solve the problem by adding another Tomcat server (on a separate box). 3) Otherwise, if both utilizations are low, then look for problems such as poor configuration, e.g. too few db connections in the pool. Peace, Cameron Purdy Tangosol Coherence: Clustered Cache -
2 tomcat in the same box[ Go to top ]
- Posted by: ahmad fairuz
- Posted on: January 08 2007 09:12 EST
- in response to Cameron Purdy
My plan is to put the other Tomcat in the same box. I'm afraid adding another Tomcat will utilize more on the CPU.Its like adding another thread of application. Do you think adding another Tomcat will be advisable to help improve the CPU utilisation ? Does this is a smart way to resolve the problem? -
Re: 2 tomcat in the same box[ Go to top ]
- Posted by: Cameron Purdy
- Posted on: January 08 2007 12:25 EST
- in response to ahmad fairuz
Start by following the steps that I suggested, and let me know what you find. Peace, Cameron Purdy Tangosol Coherence: Java Data Grid -
Might degrade the perf as well[ Go to top ]
- Posted by: Rajesh Balamohan
- Posted on: January 08 2007 19:16 EST
- in response to ahmad fairuz
Try as Cameron pointed out. However, if the problem is in DB due to poor SQL or poor configuration, then adding another Tomcat instance might degrade the performance as well. So I would recommend to find out where the bottleneck is rather than simply increasing the tomcat count. You can add some performance counters around your sql code to know the time taken for the sql. (well...there are various ways to do this. This is the most straight forward one). ~Rajesh.B