Optimizing the execution unit (XU)

The Decision Server execution unit (XU) can be configured at installation time or applied to an existing Operational Decision Manager instance. You can avoid deadlocks by adjusting the predetermined length of timeouts, restricting the number of rule instances to evaluate, and limiting the number of rules that can fire.

About this task

The following XU properties can be configured to optimize the runtime behavior.

Table 1. XU configuration properties
Property name Description Default value
asynchronousRulesetParsing For ruleset execution to continue during the parsing of a ruleset update, set the property to true. If you set the property to false, executions of the ruleset in memory are completed but no new executions can be run until the new ruleset is parsed. true
compiledArchivesCacheProperties To change the properties of the compiled archives cache, you need to set two parameters separated by a comma ',':
  • maxSize = maximum number of compiled archives in the cache. The default is 10.
  • path = directory of the compiled archives cache.
The cache is enabled if the path property is set to a valid directory.
empty
defaultConnectionManagerProperties To change the settings of the connection pool. For more information, see Rule session tuning.
pool.maxSize=60,
pool.waitTimeout=3000
documentBuilderPoolProperties The XU uses DocumentBuilder instances to convert XOM objects to BOM strings, and the other way around. Use pool.maxSize to set the maximum number of instances in the pool and pool.waitTimeout to set the maximum number of milliseconds before attempts at obtaining an instance from the pool fail.

pool.waitTimeout=-1 is equal to an infinite duration. A 0 value means infinite timeout. Use this value with extreme caution because if the pool is overloaded, it might cause some threads to hang in the system.

pool.waitTimeout=-1
rulesetCacheProperties To change the properties of the ruleset cache.
ruleset.cache.maintenance.period=300
traceAutoFlush To flush the log stream each time a message is written, change the value to true. false
transformerPoolProperties To change the properties of the Transformers pool. Use pool.maxSize to set the maximum number of instances in the pool and pool.waitTimeout to set the maximum number of milliseconds before attempts at obtaining an instance from the pool fail.

pool.waitTimeout=-1 is equal to an infinite duration. A 0 value means infinite timeout. Use this value with extreme caution because if the pool is overloaded, it might cause some threads to hang in the system.

pool.waitTimeout=-1

Procedure

  1. Log in to your Kubernetes cluster, create a file and name it xu-configuration.properties. The name of the file must be xu-configuration.properties.

    You can find a sample of this file in GitHub.

  2. Create a configmap with a name that corresponds to the type of configuration that you want to apply.
    Tip: It is important to be able to recognize the purpose of a configmap by its name.

    The following example creates a configmap with a name of my-odm-xu-configmap.

    kubectl create configmap my-odm-xu-configmap --from-file xu-configuration.properties
    
  3. Make a note of the name of the configmap as you will need it when you configure the custom resource (CR) file. For more information, see Configuring Operational Decision Manager.
    You will associate the configmap with the odm_configuration.decisionServerRuntime definition by setting the xuConfigRef parameter in the custom resource.
    decisionServerRuntime:
       xuConfigRef: my-odm-xu-configmap

    The new configuration will be applied after the operator updates the pod.

What to do next

You can modify the XU properties in existing containers. To update the XU configuration configmap in an existing ODM instance:

  1. Edit the configmap by running the following command:
    kubectl edit configmap my-odm-xu-configmap

    If you did not set the decisionServerRuntime.xuConfigRef parameter in the custom resource file that you used to create the ODM instance, a default configmap is created with the name my-operator-instance-odm-ds-runtime-xu-configmap. You can edit this configmap to update the XU configuration.

    Note: You can also update the xu-configuration.properties file and replace the file in the configmap by running the following command:
    kubectl create configmap my-odm-xu-configmap --from-file xu-configuration.properties -o yaml --dry-run | kubectl replace -f -
  2. Delete the decisionserverruntime pod by running the following command:
    kubectl delete pod my-operator-instance-odm-decisionserverruntime-XXXX

    A new pod is automatically started with the new XU configuration properties for the Decision Server Runtime.