When a request on a site is slow, finding the source of the problem can be challenging. On one hand, we can monitor the speed of the overall request. This tells us which request is slow, but not much else. On the other hand, enabling trace logs or using java profiling tool can tell us what is going on during a slow request, but they have a significant impact on a request performance.

In this article, I will describe a new a lightweight performance monitoring tool (PMT) bundled in WebSphere Commerce Version 7 Fix Pack 9. This tool allows you to gather execution statistics on request execution by capturing metrics on important application layers.

For those of you who are familiar with the service logger that was released before Version 7 Fix Pack 9, you should know that the new performance logger is meant to be a replacement of the service logger. It provides all the content offered by the service logger in a more consistent format.

The lightweight performance profiler

To gather performance statistics, simply follow these 4 steps:

1 - Enable the performance measurement loggers

This is done by enabling the following logger in your Websphere Administration console:

com.ibm.commerce.foundation.logging.service.*=FINE

You can gather more precise metrics by enabling the logger at the FINEST level necessary. For production systems, it is recommended to only use the FINE level to minimize the performance impact of the performance loggers.

Note that the start time, end time are logged in nano seconds relative to each other.

3 - Generate the performance reports

On a toolkit, you can run the command

%TOOLKIT_DIR%\bin\generatePerformanceReport.bat

Note: you can customize the report generation phase by modifying the configuration file located in

%TOOLKIT_DIR%\performance\config\analysis-local.properties

Note: If you wish to generate reports on a "runtime" system that doesn't have a graphical user interface, you will need to apply APAR JR52262 or use Fix Pack 10+.

4 - Read the performance reports

Once the report is generated, your web browser will show the execution statistics that were gathered during step 2. You can use those metrics to figure out where time was spent across the various layers of your application.

TIP: You can sort the report using any of the visible columns by clicking on them.

You can find the generated reports in the following folder

%TOOLKIT_DIR%\performance\reports\%CURRENT_DATE_TIME

There are 2 main reports.

Operation Performance Report

This report displays aggregated statistics of every operation that was executed.

Execution Performance Report

This report shows metrics for each request execution.

If you wonder what a column value means, you can hover over the column header to show the documentation tooltip. You can also consult the knowledge center for a complete description of the available columns.

In my future blog posts, I'll describe how to leverage the generated reports to analyze execution stacks, integrate JDBC measurement and find out where caching would bring the biggest benefit for your system.