2009/8/21 neilgoldsmith <ne...@avaya.com> > My first question, what is the best tool to monitor this so we can get an > accurate description of when the problems occur and what might be at fault? > They just started running perfmon (on a Windows system), but as of yet I > have not seen any data from it. Is there a better monitoring tool?
For a first cut, there probably isn't. Perfmon will show you whether the issue is CPU, RAM, disk or (theoretically) network; that then shows where to focus effort. If it's none of those... does your app use a database? Might there be contention to that database? Does the app use any internal locking? Might there be contention for those locks? I would use some of the extra options in Perfmon after that first cut, though. If you determine it's a CPU issue, for example, then gather CPU statistics by process (it's under the Process object) and make sure it's really Tomcat that's eating CPU. If you find that it's Tomcat eating CPU, or you find that there's no obvious bottleneck, then somebody needs to be standing by when the slowdown occurs ready to take a thread dump on Tomcat. Try to get several: some under normal operation, and as many as you can get, in sequence, when it's running slowly. Now look for differences! Also, you might want to enable garbage collection logging. Do the slowdowns correspond to periods when large objects (or large numbers of objects) are allocated, and you're thus more likely to trigger a GC? If so, what JVM are you using, and what GC options? If it's a realtime application, you might find one of the more realtime-optimised GCs helps - and you may find that increasing thread counts and RAM make things no better and may actually makes things worse, as GCs may take a little longer when they occur. > Second question, what might we do to improve Tomcat performance? Should we > continue to tweak the max threads and heap size? Any other Tomcat settings > that we should look at that might directly relate to this server slowdown? > It's very hard to give more advice without the customer performing some of the above steps, so that you've narrowed down the possible areas of slowdown. It's a little too easy to tune something expecting it to make a difference... and it does, the wrong way! Good luck! - Peter