Optimizing BPD execution for latency

Select the optimization for latency to reduce thread context-switching for BPDs that require low latency responses. When enabled, this optimization causes the BPD to keep its execution thread rather than releasing it back to the pool of threads that are shared between activities. By default, new BPDs are not optimized for latency, which means that, between activities, instances return their execution threads to the shared thread pool. You can change the optimizing setting for a BPD in Process Designer.

About this task

The execution of implementations of system tasks and decision tasks, is scheduled by the Event Manager. Every cluster member has one Event Manager, which uses a pool of threads to schedule work in the order that it was created. This use of a pool of threads makes it possible for implementations of a BPD to run independently and in parallel.

If the IBM BPM system is running under high load, the processing of an implementation of a specific process instance might be delayed because other work is already scheduled to be executed before it. This thread sharing behavior can increase the latency for the overall process instance. However, some types of BPD need higher performance to minimize the straight-through processing latency. If a straight-through processing BPD does not contain any parallel paths, but performs a series of system tasks or decision tasks that are implemented by integration services, this work might be run more efficient and with less latency by using a single thread on one cluster member.

This optimization setting defines two classes of BPD:
  • The default processing behavior is not optimized for latency, which means that the thread is released after each unit of work. This behavior ensures that all BPD instances that use the default setting have an equal chance to continue navigation of the process.
  • BPD system tasks and decision tasks that are optimized for latency are executed on the same thread that the BPD uses for navigation. If multiple system tasks or decision tasks exist in parallel paths of the BPD, only one path is executed by the same thread, the other paths are scheduled to use the default behavior by the Event Manager. Process instances with this execution optimization use the Event Manager threads for longer and so they provide a more predictable latency.
You must take care to avoid causing a negative performance impact on other instances, services, undercover agents, and other functions that use the shared pool of threads.
  • Do not enable this optimization option for all BPDs in your system, otherwise the wait time to acquire one execution thread might increase for your process instances.
  • Make sure that the number of requests for BPDs that have this optimization enabled that are sent to a cluster member per unit of time does not exceed the capacity of the execution threads that are available to process the requests.

Procedure

To enable the optimization for latency, complete the following actions.

  1. Open the Process Designer desktop editor.
  2. Open the BPD in the Designer view.
  3. On the Overview tab, open the Advanced section.
  4. Select Optimize Execution for Latency to reduce thread context-switching for the BPD. Clearing the option turns off the optimization for the BPD.