Determining the optimal XU pool size

The optimal execution union (XU) pool size setting in Rule Execution Server depends on many parameters. The best way to determine the optimal XU spool size setting is to run benchmark tests and incrementally adjust the setting until performance is optimal for your environment.

About this task

When the Rule Execution Server is deployed on a Jakarta EE environment, the rule engine is made available through a Jakarta EE Connector Architecture (JCA) resource adapter. This resource adapter is referred to as the “execution unit” (XU). See Execution unit (XU).

The XU defines a standard SPI (Service Provider Interface), which sets the system-level contract between the resource adapter and the application server when they connect.

The application server pools JCA SPI connections and you can change the default configuration to adjust the size of the pool and improve performance. See XU services for execution for more information about pooling. However, it is difficult to determine the optimal pool size setting because it depends on many parameters:

  • The number of rulesets
  • The memory size of the rulesets
  • The size of available memory
  • The number of concurrent executions
  • The execution frequency of each ruleset
  • The number of CPUs
  • And so on

The following procedure is a starting point for you to determine the optimal XU pool size setting. You benchmark the overall rule application and change the settings incrementally until the performance is acceptable.

Procedure

  1. Before you set the XU pool size, you need to know the following information:
    • The number of rulesets ( 'R')
    • The number of possible concurrent ruleset executions ('C')
  2. Set the XU pool size to R x C, provided there is enough memory to handle this pool size.
  3. Perform benchmark tests and adapt the settings.
    Repeat steps 2 and 3 until you reach optimal performance.