Finding the root cause of performance problems

Previous topic: Collecting performance data

Once you have collected performance data, you can analyze the result in the profiling tools to identify exactly what part of the code is causing the problem. Generally speaking, you will first narrow down the component (which application on which server) has the problem. Then, you can continue narrowing down to determine which package, class, and finally method is causing the problem. Once you know which method the problem is in, you can go directly to the source code to fix it.

Open the Logging and Profiling perspective (Window > Open Perspective > Other > Show All > Profiling and Logging) to use the profiling tools. Follow these steps to narrow down the location of the problem:

  1. Use the Performance Call Graph and Method Details views. These views display all the timed performance data for the run. The Performance Call Graph view presents a global view of the data for the entire run, while the Method Details view displays the data method by method.
  2. Use UML2 sequence diagrams. Start at the host interactions level and drill down to process interactions, thread interactions, class interactions, and possibly object interactions. To open the host interactions view:
    1. Select the monitor object.
    2. From the monitor object's pop-up menu, select Open with > Host interactions.
    3. Ensure the Distributed Layout is selected for the Profiling Monitor view.

    Look for “hot spots” indicated by a red spot on the Time Compression bar on the left-hand side of the sequence diagram. These indicate major delays or errors associated with events such as method calls. Take note of these problematic sections of code.

  3. Use statistical views. With the statistical tables, you can see which package, classes, or methods are taking the most time. Examine areas that were highlighted as problematic in the sequence diagram, and take note of the problems highlighted in the statistical tables.
  4. Examine the source code. Once you have used the profiling tools to narrow down where the problem is, use the source views and editors to manually examine the sections of code highlighted by those other methods, to determine what is wrong with the code.
Terms of use | Feedback
(C) Copyright IBM Corporation 2005. All Rights Reserved.