Determining the cause of a performance issue

When a performance issue occurs in your test or production environment, it might be difficult to determine whether it is caused by the Rule Execution Server execution stack, the environment (application servers, networks, and client APIs such as REST), or the customer code calling the ruleset execution. Setting the log to gather certain information helps you narrow down the cause of the performance problem.

Symptoms

Performance is lower than you expect for some of the ruleset executions in your test or production environment.

Diagnosing the problem

You can request the Rule Execution Server execution stack components to write messages into a log file when an operation is taking longer than expected. You can then determine whether the performance drop for ruleset execution is caused by the Rule Execution Server execution stack (rule sessions and execution units) or the code that is calling it.

The messages are written only at the FINE level when the duration is longer than a specified threshold. The duration threshold is 200 ms by default, and you can change it by setting the system property com.ibm.rules.res.log.durationthreshold.
Note: You must set this value carefully to avoid slowing down the system due to intensive logging.
For example, the following message indicates that it took 2 seconds to call the execution of a ruleset at the XU level:
1/26/16 3:07:36 PM [FINE]      GBRXU6044I - -.- - The duration of the operation engineExecute is 2,084 ms.
The following message indicates that it took 234 ms to set the parameter of a ruleset at the XU level:
1/26/16 3:13:02 PM [FINE]      GBRXU6044I - -.- - The duration of the operation engineSetParameters is 234 ms.
You can see the following messages at the rule session level:
GBRXR0032I: The duration of the execution of the rule session is longer than expected.
GBRXR0033I: The duration for setting the parameters as XOM BOM is longer than expected. 
GBRXR0034I: The duration for getting the parameters as XOM BOM is longer than expected. 
GBRXR0035I: The duration for storing the decision warehouse trace is longer than expected. 
GBRXR0036I: The duration for invoking the pre-interceptor is longer than expected. 
GBRXR0037I: The duration for invoking the post-interceptor is longer than expected. 
The following messages are other useful message codes at the XU level:
GBRXU6022I: Indicates the duration for loading a ruleset. This message is written at INFO level and does not depend on the duration threshold.
GBRXU6044I: The duration of the operation XXX is longer than expected.
GBRXU6045I: Indicates a longer duration than expected for retrieving a XU connection