This blog promotes knowledge sharing through experience and collaboration. For more product information, visit our WebSphere Commerce CSE page. For easier navigation, utilize the Categories to find posts that match your interest.
PMT : Find your Performance Bottlenecks Using Statistics Gathered at Every Layer
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:
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.
The knowledge center contains more details on the layers that can be enabled and the impact of different logging levels. See Using the Performance Measurement tool.
2 - Execute the request to measure
Every request executed on the server will now gather execution metrics in the trace.log file.
Here is a sample metric log (added some line feeds to improve readability):
[03/10/14 13:16:22:191 EDT] 00000039 ServletReques 1 PerfLog <exit
operation="Servlet : Request : /webapp/wcs/stores/servlet/LogonForm"
parameters="catalogId= langId=[-1] myAcctMain= storeId=" id="6111981226644471817"
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
Note: you can customize the report generation phase by modifying the configuration file located in
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
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.