How to improve the workflow services in a farm?
There are few steps to do to improve workflow services. The common issues that can be faced in workflow services are slow startup, more run time to completel one workflow.
1. Increase Throttle size
There is a throttle setting for each server and this controls the number of workflows that can be processed at the same time on the entire server.
a)How many throttle services can be run at the same time in a farm?
We can find this using the below stsadm command and the default in almost all the servers will be 15.
stsadm -o getproperty -pn workflow-eventdelivery-throttle
b) Can you increase the number of throttle services?
Yes, of course you can and also again by using stsadm command. I am increasing the size to 25 here.
stsadm -o setproperty -pn workflow-eventdelivery-throttle -pv “25”
Recommended Settings(Ref MSDN): The value is highly dependent on your environment and the details of your workflows. If the workflow is simple – set throttle as high, and if the workflow is complicated – set throttle as low value.
The best advice is to adjust the setting and then monitor your environment. Continue to adjust and monitor until you reach an acceptable level of performance for both workflows and standard site operations.
2. Increase Batch Size
Batch size controls the number of workflow items that are ready to be executed. it helps in improving performance for all those immediate executable workflow and all for those that do have a time to start off.
a) What is the default batch size?
To identify the default size, you can use the below stsadm command and the default size would be 100 in almost all the servers.
stsadm -o getproperty -pn workitem-eventdelivery-batchsize
b) Can you increase the size and how to do it?
To increase the batch size, we use setproperty stsadm command as below:
stsadm -o setproperty -pn workitem-eventdelivery-batchsize -pv “125”
Timeout is a maximum minute setting for each and every workflow until when it can take to complete the timer job. If the job is not completed with that time limit, it will be handled during the next workflow cycle.
a) What ist he default minute setting for timeout?
Again, you can use the below getproperty stsadm command to find this and the default is set to 5 minutes.
stsadm -o getproperty -pn workflow-eventdelivery-timeout
b) Can we increase the timeout limit?
Yes, it can be increased using the set property stsadm command as below:
stsadm -o setproperty -pn workflow-eventdelivery-timeout -pv “15”
4. Workflow timer interval
This is the timer setting that is done for SPTimer job to decide on how many times it should run to process workflow items. This setting is to be done in the Application level and not on farm level. The workflow timer interval specifies how often the workflow SPTimer job fires to process pending workflow tasks. This interval also represents the granularity of delay timers within your workflow. If a timer is set to delay for one minute, but the interval timer fires only every five minutes, the workflow delays for five minutes, not one minute. (Ref MSDN)
a) How can we identify the existing timer interval setting for a specific application?
We can identify it using getproperty stsadm commands as below:
stsadm -o getproperty -pn job-workflow -url http://<servername:host>/applicationname
By default there will be no property set.
b) Can we change or set a property for timer interval?
Yes there are few string formats to be used to set the property for workflow timer interval and they are as follows:
“Every 10 minutes between 0 and 30”, “Hourly between 9 and 17”, “Daily at 15:00:00”, “Monthly at 15 15:00:00”
stsadm -o setproperty -pn job-workflow -pv “Every 10 minutes between 0 and 30” -url http://<servername:host>/applicationname
The above is for Sharepoint 2007 version and can do using Powershell for Sharepoint 2010.
For more information on Workflow management please refer to the below site:
Technet site gives help on the “stsadm” command that is used for all the above mentioned changes and MSDN site helps to advise more on the recommended settings and how you can achieve a better managed workflow in your farm.