Thursday, May 24, 2007

J2EE Application Performance Tuning Approach

1.0 Set a goal: such as the response time for a given screen transaction per user. or transaction throughput, which is the number of transactions in a given time period, usually one second. For example, you could have a performance measurement that could be no more than three seconds for each screen form or a transaction throughput of one hundred transactions in one second. You should be able to find out this kind of information from project service-level or quality of service (QoS) requirements.

2.0 Identify the bottlenecks: For example, if the CPU usage on an application server is high, you will want to focus on tuning the application server first. There are some simple ways to identify the problem areas, check out my another post for some quick techniques.

3.0 Follow a methodical path: It is better spent tuning a method that takes 10 seconds but gets called 100 times than tuning a method that takes one minute but gets called only once. Make one change and stress-test it, if the change results in positive impact, only then will you make it permanent.

Two kinds of tools that are helpful in the tunning process, namely stress tools that generating load to your application and monitoring tools that collecting data of various performance indicators. For a comprehensive list of stress and monitoring tools, check out Software QA/Test Resource Center.

This is a good article about tunning strategy for the apache, tomcat & application itself, check it out. If none of the solution resolve the bottlenecks, you can consider scaling up the server (database & application). If horizontal scaling is not possible, consider the option of vertical scaling.

By the way, there is one tool I would like to mention here is the JMeter - a free tool from Apache community. It Can be used to simulate a heavy load on a server, network or object to test its strength or to analyze overall performance under different load types. It can also make a graphical analysis of performance or test server/script/object behavior under heavy concurrent load. To get to know it, check out this demo from my colleague - Srini.

No comments:

´