How to fine tune the Bizagi Scheduler in Cluster Environments

<< Click to Display Table of Contents >>

Navigation:  Automation Server > Automation Server configuration and administration guide > System maintenance and monitoring > Environment settings and administration > Management Console > Scheduled jobs administration >

How to fine tune the Bizagi Scheduler in Cluster Environments

Overview

Configuring Bizagi Scheduler for better performance depends on each environment's configuration. It is dependent on three factors: the client's infrastructure, parallelism, and the client's modeling. The best practice when tuning your Bizagi Scheduler is to include performance check tasks that work together with load tests. This allows Scheduler configuration fine-tuning to obtain the best combination in which the performance is optimal.

 

The following document presents a brief explanation of the keys used to do a Scheduler fine tuning. Furthermore, it gives you details about the master and slave schedulers and details on how you can tune up the performance for your Production environment.  

 

Master and slave Scheduler

Take into account the following definitions for Master and Slave Scheduler.

A Master scheduler is the scheduler which coordinates the tasks executed per each slave scheduler and runs additional tasks such as the maintenance tasks. It is mandatory to have one and only one Master scheduler configured.

A Slave scheduler is the scheduler which processes an assigned task.

 

Configuration files

To fine tune the Bizagi scheduler, locate these files:

 

Locate the web.config file located in C:\Bizagi\Projects\[ProjectName]\WebApplication and open it using the text editor of your choice.

 

FineTune_01

 

Locate the BizAgi.Scheduler.Services.exe.config files located in C:\Bizagi\Projects\[ProjectName]\Scheduler folder of every scheduler.

 

FineTune_02

 

Add the configuration keys required to fine tune your Bizagi Scheduler in the <appsettings> key. Example:

<add key="AsyncTaskWorkingSetSize" value="10"/>

 

Configuration keys

According to the infrastructure of your project, take into account the following minimum configuration:

 

 

Configuration Key

Description

Default /Suggested Value

Threaded Scheduler configuration

ID_STACK_SIZE

Add this key in the web.config and BizAgi.Scheduler.Services.exe.config files of each scheduler. The key reduces the locks on business IDs assignation during  high rates of case creation.

The default value is 50 and for production environments, it is recommended to increase it to 500.

This value should never be decreased and each scheduler must have the same value.

AsynchTaskWorkingSetSize

Add this key in the BizAgi.Scheduler.Services.exe.config files of each scheduler. This key defines the number of asynchronous workitems to be retrieved from the database to be processed per thread.

The default value is 50.

SchedulerAsyncProcessorIntervalInMillis

Add this key in the BizAgi.Scheduler.Services.exe.config files of each scheduler. This key sets the time in milliseconds that define the threads at internal scheduler processor to wait for the next execution of the asynchronous tasks when the BizagiSchedulerInterval was executed.

The suggested value is 500.

JobWorkingSetSize

Add this key in the BizAgi.Scheduler.Services.exe.config files of each scheduler. This key defines the number of tasks of the stack that will be provided to be executed.

The suggested value is 10.

SchedulerMaxJobWaitInterval

Add this key in the BizAgi.Scheduler.Services.exe.config files of each scheduler. This key defines the number of wait execution time when the jobs max number is reached.

The suggested value is 1.

LaunchThreadForLog

Add this key in the BizAgi.Scheduler.Services.exe.config files of each scheduler. This key defines you need an extra thread to improve the logging.

The suggested value is 1.

Enable a threaded option for each function

MaxThreadsForCustomJobs

Add this key in the BizAgi.Scheduler.Services.exe.config files of each scheduler. This key defines the maximum number of threads to run the custom jobs.

The default value is 2.

Take into account that this number CANNOT exceed the number of processor cores. For example, if you have two quad-core processors, the maximum number should be 16.

MaxThreadsForJobs

Add this key in the BizAgi.Scheduler.Services.exe.config files of each scheduler. This key defines the maximum number of threads to run the jobs.

The default value is 2.

Take into account that this number CANNOT exceed the number of processor cores. For example, if you have two quad-core processors, the maximum number should be 16.

MaxThreadsForAsyncEcm

Add this key in the BizAgi.Scheduler.Services.exe.config files of each scheduler. This key defines the maximum

number of threads to run the ECM when the asynchronous feature is active.

The default value is 2.

Take into account that this number CANNOT exceed the number of processor cores. For example, if you have two quad-core processors, the maximum number should be 16.

MaxThreadsForAsynchWorkitems

Add this key in the BizAgi.Scheduler.Services.exe.config files of each scheduler. This key defines the maximum number of threads to run the asynchronous tasks.

The default value is 10.

Take into account that this number CANNOT exceed the number of processor cores. For example, if you have two quad-core processors, the maximum number should be 16.

Scheduler execution interval

BizagiSchedulerInterval

Add this key in the BizAgi.Scheduler.Services.exe.config files of each scheduler. This key defines the time (in seconds) used by Bizagi to process the workitems retrieved  from the database.

The default value is 30.

This key should be increased when AsynchTaskWorkingSetSize increases.  Increase this value by adding 15.

MASTER / SLAVE

DisableAsynchCaseClosing

Add this key in the BizAgi.Scheduler.Services.exe.config files of each scheduler. This key is used to name the primary scheduler and ensure that this scheduler will be the only one which runs the maintenance tasks.

The default value is 0. Set 0 for the Master scheduler and 1 for the Slave scheduler. It is mandatory to have one and only one Master scheduler configured.

DisableInterfaceErrorLogger

Add this key in the BizAgi.Scheduler.Services.exe.config files of each scheduler. This key is used to enable the interface error logger only on the primary scheduler and ensures that this scheduler will be the only one which log all the interface errors.

The default value is 0. Set 0 for the Master scheduler and 1 for the Slave scheduler. It is mandatory to have one and only one Master scheduler configured.

 

Tuning up the Scheduler

The tuning of the values for the present keys must be performed according to the results of the performance testing phase of your project. Follow these recommendations to tune up the performance:

 

It is recommended to have an independent machine for the Schedulers.

The ideal performance happens when the number of asynchronous workitems (MaxThreadsForAsynchWorkitems key) is processed in the time frame defined by Bizagi Scheduler Interval (BizagiSchedulerInterval key). Increase the AsynchTaskWorkingSetSize and BizagiSchedulerInterval key values until your asynchronous tasks are processed in an optimal time.

If you reach the maximum value for the MaxThreadsForAsynchWorkitems key, it is recommended to add another scheduler using the default values and then, increase the values until you have the ideal performance.

 

note_pin

It is recommended to perform continuous monitoring of your infrastructure. If you find any increase in terms of Memory or CPU usage, you have to take the decision if you want to tune the schedulers or perform changes over the infrastructure to be able to support the increased demand of resources.