Skip to main content

IMPORTANT - Product End of Life Statement - IMPORTANT

Request RE, Survey, and Calendar 1.5 Support Ending December 31, 2020
Contact Kinetic Data Support with Questions
Kinetic Community

Optimizing Performance in the Task Engine

In a production environment with many task processes running, there may be a need to "tune" or optimize the task engines performance. There are a number variables that can be adjusted to achieve desired task engine performance. This article outlines a few of them.

When is tuning / performance optimization required?

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 (see image below)

Screen Shot 2018-05-31 at 12.20.49 PM.png

If there are hundreds or thousands of triggers in your backlog, there is a good chance that you will 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

There are a number of variables that affect the speed in which the task engine can process trees. Each variable has potentially different symptoms and solutions.

The Task Database

The task engine is in constant communication 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 there is a database, network, or server issue that 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

The way that the Task engine worker threads work, is that each one processes a branch of the tree based upon the trigger.  If there are too few worker threads, and the tasks that are executed as part of the branch are "slow" (which blocks the worker thread) than 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 engines workers can use will typically solve the problem of backlogged triggers. When increasing threads, pay close attention to the servers CPU / Memory constraints as each thread will use more resources. If you max out a servers resources, you will need to either add more resources or deploy another Task Engine to handle the expected load.