Optimizing Performance in the Task Engine


If your environment is taking a long time to process a tree, there is a good chance that it needs to be tuned/optimized for your environment. One way to check on the state of your engine is to look at the backlog.


The Workflow Triggers page in the Global Workflow console

If there are hundreds or thousands of triggers in your backlog, you likely need need to add more threads, optimize your trees (reduce the number of loops by combining loops into a custom task handler), or add additional task servers.

Potential Task Bottlenecks

Several variables affect the speed at which the task engine can process trees. Each variable has potentially different symptoms and solutions.

The Task Database

The task engine constantly communicates with its SQL database to determine what work needs to be processed. If your task engine is slow, it is helpful to check with your DBA to determine if a database, network, or server issue could be causing a bottleneck in processing triggers.

The Task Webserver Memory / CPU

Task engines run within a web server that has a limited amount of Memory and CPU allocated. If your task engine is slow, checking to see what resources are being consumed on the server is a good first step in determining the bottleneck. If your Memory or CPU is near 100% utilization, you will likely want to reduce the number of threads that the task engine is running and deploy an additional task server to handle the expected load.

The Task Webserver Worker Threads

Task engine worker threads work each processes a tree branch based upon the trigger. If there are too few worker threads, and the tasks that are executed as part of the branch are "slow," the worker thread is blocked, and Kinetic Task may back up. If there are too many worker threads, the tasks that are being executed may "overload" the systems they are interacting with.

Increasing the number of threads that the task engine workers can use typically solves the problem of backlogged triggers. Pay close attention to the server's CPU and memory constraints when increasing threads, as each thread will use more resources. If you max out a server's resources, you must either add more resources or deploy another Task Engine to handle the expected load.