Optimizing process execution for latency

Select the optimization for latency to reduce thread context-switching for processes that require low latency responses. When enabled, this optimization causes the process instance to keep its execution thread rather than releasing it back to the pool of threads that are shared between activities. By default, new processes 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 process 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 process 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 processes need higher performance to minimize the straight-through processing latency. If a straight-through processing process 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 processes:
  • 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 process instances that use the default setting have an equal chance to continue navigation of the process.
  • System tasks and decision tasks that are optimized for latency are executed on the same thread that the process uses for navigation. If multiple system tasks or decision tasks exist in parallel paths of the process, 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 processes 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 processes 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.
  2. On the Overview tab, open the Advanced section.
  3. Select Optimize Execution for Latency to reduce thread context-switching for the process. Clearing the option turns off the optimization for the process.