Engine Tuning Properties

The rate at which the engine can run and complete processes depends on the Thread Count and Step Count engine properties.

Refer to Setting and Overriding BusinessWorks Engine Properties for details on steps to set the properties.

Thread Count (bw.engine.threadCount)

The threadCount property specifies the number of threads that the BusinessWorks engine can allocate. The default value of engine threads is eight.

The jobs in memory are executed by the engine. The number of jobs that can be executed concurrently by the engine is limited to the maximum number of threads, indicated by this property. This property specifies the size of the job thread pool.

Threads execute a finite number of tasks or activities uninterrupted and then yield to the next job that is ready. The thread count can be tuned to the optimum value by starting with a default value of eight threads and then doubling it up until maximum CPU is reached.

The CPU and memory resources should be measured under a typical processing load to determine if the default threadCount value is suitable for the environment.

If the engine throughput has reached a plateau, but the CPU and memory are not fully utilized, you can increase the thread count to have a positive effect on the throughput.

Caution: If the engine thread count value is too high, it can cause CPU thrashing, or an increase in latency caused by a large number of messages in the queue. If the engine thread count value is too low, it can cause higher memory use and lower engine throughput as some CPU resources remain unutilized.

The process instances created by the engine are typically held in memory. However, this may not be the case if the Flow Limit property is set. (See Job Tuning Properties for details.) The number of process instances that can be created in memory is also limited by the memory available on the machine and the memory allocated to the JVM on which the engine executes.

Step Count (bw.engine.stepCount)

The engine Step Count property determines the number of activities that are executed by an engine thread, without any interruption, before yielding the engine thread to another job that is ready in the job pool. Exceptions to Step Count can occur when the job is in a transaction, is blocked, or is waiting for an asynchronous activity to complete. When a job is in a transaction, the thread is not released until the transaction is complete, even when the Step Count is exceeded. However, if a job is blocked or waiting for an asynchronous activity to complete, the thread can be yielded even when the Step Count has not been reached.

The default value of this property is -1. When the values is set to -1, the engine can determine the necessary StepCount value. A low Step Count value can degrade engine performance due to frequent thread switches. A high Step Count value may cause less concurrency in executing jobs and hence, result in an inefficient use of CPU.