Getting started: Performance bottleneck detection

Performance bottlenecks are places in your application that prevent the application from running as fast as it should. The Profiling and Logging perspective includes views for examining performance and detecting bottlenecks.

You can use the following views to detect performance bottlenecks:

Collecting data for performance bottleneck detection

Prerequisites:
  • Agent Controller must be running on the machine on which you are collecting data. For information, refer to the installation guide.
    Note: If you want to analyze the calls between client and server in distributed programs, you cannot use Agent Controller to collect data. Instead, use Tivoli ARM data collector, which is available, along with documentation for its use, in the IBM Rational Performance Optimization Toolkit for Rational Performance Tester. If you have directed the data for the program to trace files (trcxml files), read Importing performance data.
  • You must create a profiling configuration. Read Getting started: Creating a profiling configuration for runtime problem determination

To collect data:
  1. On the Profiling page of the Profile dialog box, select one of the following profiling sets:
    • Execution History - Performance Call Graph. This profiling set contains the Performance Call Graph Analysis profiling type, which collects data using compact format to accelerate the data collection process. This profiling type supports all views for detecting performance bottlenecks except the UML2 Sequence Diagram views.
    • Execution History - Full Graphical Detail. This profiling set contains the Execution Time Analysis profiling type, which supports all views for detecting performance bottlenecks.
  2. Click Profile to start your application.
  3. Use your application, exercising the routine that you want to investigate for performance bottlenecks. Performance data is collected and recorded either in a Performance Call Graph profiling resource or in an Execution Time Analysis profiling resource, both of which are displayed in the Profiling Navigator. You can now terminate your application.

Using the Performance Call Graph and Method Details views to detect performance bottlenecks

Both the Performance Call Graph view and the Method Details view 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.

To detect performance bottlenecks:
  1. Display the Performance Call Graph view: Right-click the Performance Call Graph Analysis or Execution Time Analysis profiling resource for the data that you collected, and then click Open With > Performance Call Graph.
    • The graph initially displays nodes for the 20 methods that are responsible for consuming the largest amount of time.
    • The lines between the nodes represent call paths. Thicker lines are used for more expensive call paths.
    • You can manage the data that is displayed in the call graph by right-clicking a node, and then clicking a command from the pop-up menu.
  2. Identify a method that you suspect of consuming more time than it should.
  3. Double-click the method to open the Method Details view.
  4. Use the Performance Call Graph and the Method Details view together to investigate the entire data set. The two views are synchronized whenever you select a new method.
  5. To examine the source code for a method, if it is available, right-click the method in either of these views, then click Open Source.

For more information, read Detecting performance bottlenecks.

Using the Execution Statistics view

With this view, you can examine performance statistics in tables that you can sort to isolate the worst-performing packages, classes, and methods. These tables display only statistics for time spent in individual methods, classes, and packages; they have no information about calls or calling relationships.

To use this view:
  1. Display the Execution Statistics view: Right-click the Performance Call Graph Analysis or Execution Time Analysis profiling resource for the data that you collected, and then click Open With > Execution Statistics.
  2. Click the icon for package-level information Package-level information button, class-level information Class-level information button, or method-level information Method-level information button to manage the display of data.
  3. Use this view to focus the Performance Call Graph and Method Details views on potential bottlenecks.

Using the Execution Flow, Method Invocation, and UML2 Sequence Diagram views

With these views, you can distinguish different ways the same method is invoked. You can display method invocation data and execution flow data in either graphical or tabular format.

To use these views:
  1. To examine potential hot spots in the performance of your code, right-click your Performance Call Graph Analysis or Execution Time Analysis profiling resource, and then click Open With > Execution Flow. The view shows a representation of the entire program execution. You can zoom in to focus on the hot spots. The status line at the lower edge of the view displays cumulative time values when you hover the cursor over a method invocation.

    You can see this same information in table format by right-clicking in the Execution Flow view and then clicking Show Execution Table.

  2. To display data for a single invocation of a method, select that invocation in the Execution Flow or Execution Flow Table view, right-click, and click Show Method Invocation. Note that you cannot select a method if you are in zoom mode.
  3. To display data for all invocations of the method, in the Method Invocation view, right-click, and then click Show Invocation Table to open the Method Invocation Table view.
  4. To examine the same data in UML2 sequence diagram format (available if you used the Execution Time Analysis profiling type), right-click the Execution Time Analysis profiling resource for the data that you collected, and then click Open With, followed by the UML2 view for the type of interactions you want to analyze.
Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.