| Product(s): | APM Implementation and Performance Management | |
| Version(s): | All versions | |
| Environment: | N\A | |
| Area: | N/A | |
| Subarea: | N\A | |
Problem Description
Performance of a specific application function (e.g., Failure Mode Copy) is poor.
Steps to Investigate
This can often be attributable to slow execution of an underlying database query used by the function. The following steps can be used to profile database query performance. We recommend that this be done in a thick-client environment, to isolate to one user & the poorly performing function. However, if you do not have a thick-client readily accessible, a cleint-server environment may also be used.
- Open the Settings Editor for the thick-client or client-server instance to be monitored.
- Select the File -> Show Advanced Settings option.
- In the left-hand pane, select the Diagnostics category.
- In the right-hand pane, under Performance Profiling, change the Profile Slice Threshold setting to a duration (in milliseconds) over which a warning message is to be logged in the thick-client or client-server instance log file. The default is 1 second (1000 milliseconds). We recommend that you start with a 2 second setting, and adjust as needed.
- Also in the Settings Editor dialog, click on the Logging tab.
- On the What to Log sub-tab, create a new logging rule by clicking on the New Rule icon in the upper left-hand corner (
), and selecting the New emptyr rule option. - On the New Rule dialog: Set name = Ivara.Pers.Slice.Performance, and set minlevel = Warn. Click the OK button to save.
- Exit the Settings Editor dialog.
- The settings change will be immediately effective, so if already logged in to the thick-client or smart-client instance, proceed to step 10. Otherwise, log in to the desired instance now.
- Navigate the UI to the function to be profiled, and execute the problem function.
- Open the log files folder on the thick-client or server instance with which you are working. The log file location is specified in the Settings Editor's Diagnostics category, under Logging, in the Default Log Directory setting, and is typically set to %programdata%\Bentley\IvaraEXP\Logs\.
- Find the log file for the thick-client / client-server instance, and open in Notepad. Go to the end of the log file, and look for logged messages similar to the following:
2016-06-16 07:41:36.0642 Warn Roy.Suthers Ivara.Pers.Slice.Performance [20] File: oqtempl.h(1906) : Poor performance was detected for a slice. Fetchnext() took 2600ms to execute which exceededs 2000ms (Profile Slice Threshold setting). The slice query is:
SELECT c.MaintenanceA_oi FROM (MNT.RiskEvalu r LEFT OUTER JOIN MNT.CriticalityEvaluat c ON r.EconEval_oi=c.CriticalityEvaluationoi) WHERE r.RiskEvaluationoi=?
Context:
ClientSide Cursor: false
NOTE: When you have finished profiling database queries, be sure to turn off Ivara.Pers.Slice.Performance logging, by setting the minlevel property to Off.
See Also
How to log APM messages to a custom file target
| Original Author: | Roy Suthers | |