Using the service logger to identify performance issues
To get better performance, as measured in response time and reliability, review statistics and modify properties and parameters to improve results.
About this task
To identify the source of any performance problems:
Procedure
-
Enable the service log by enabling the corresponding java loggers. Edit either of the following
files to change the trace settings:
- Websphere-Liberty-Profile-Folder/servers/defaultServer/server.xml
- /SI/properties/meglogging.properties
-
To enable tracing for Global Mailbox, append one
of the following strings to traceSpecification:
- Entry tracing: com.ibm.service.entry*=fine
- Monitor main application entry points
- Negligible performance impact
- Light Application Layer Tracing: com.ibm.service.*=fine
- Monitor the main application layers
- Doesn't include result size measurement
- Light performance impact
- Complete Application Layer Tracing: com.ibm.service.*=finest
- Monitor the main application layers, including result size and entry logs
- Average performance impact
- Complete Tracing:
com.ibm.service.*=finest:com.ibm.mailbox.*=finest
- Monitor every entry and exit calls during application execution
- Significant performance impact
For example:com.ibm.service.level=fine
Tip: This can be done while the server is running. - Entry tracing: com.ibm.service.entry*=fine
-
As the application runs, the logs are gathered in the file :
(Websphere-Liberty-Profile-Folder)/servers/defaultServer/logs/trace.log.
The following text is an example of the log file:
[2014-08-28T08:38:05.600-0700] 00000001 LogMetricGath 3 com.ibm.commerce.cache.LogMetricGatherer
logMetricToLogger <exit operation="Operation : com.ibm.mailbox.api.repository.IMailboxService.getMailbox(UUID
mailboxId)" parameters="00000000-0000-0000-0000-000000000000," id="338020115243073538" parentId="0"
startTime="4518568325358" stopTime="4518584207505" duration="15882147" resultSize="517" cacheHit="false"
The definitions for the fields in the log are the following descriptions:cacheEnabled="false" />
- operation
-
Name of the operation that was executed
- parameters
-
Parameter values that were sent during the operation execution. Note that some parameter values might be hidden if they contain sensitive information.
- id
-
Unique operation execution identifier. Used to correlate operations together.
- parentID
-
Unique identifier of the parent operation execution. Used to correlate the hierarchy of operations.
- startTime
-
Start time value in nanoseconds in a value that is relative to the stopTime value.
- stopTime
- Stop time value in nanoseconds in a value that is relative to the startTime value.
- duration
-
Duration of the operation execution in nanoseconds.
- cacheEnabled
-
Boolean flag that indicates if result caching was enabled on this operation.
- cacheHit
-
Boolean flag that indicates if a cache hit was performed.
-
Review the service logs for important entry and exit events and important messages.
You can learn the following types of information from the log:
- Average execution of each operation in the important application layers
- Average response size
- A list of all the request received by the server sorted by response time (slowest ones show up first)
- The hierarchy of calls
- (Advanced) information about cache potential of each request
- Use this information to monitor the performance of your system and resolve problems or improve response.