Workflow Performance

The results of our performance tests of Workflow Engine and Workflow Server, measured under both Windows and Linux, with the numbers we actually got.

Optimajet Team·Published·4 minutes

Workflow Performance

Introduction

We’ve tested the performance of Workflow Engine and are happy to share the results with you. The tests were conducted on Windows and Linux. The standard version without further optimizations was tested.

Here we go…

Test description

We’ve measured the performance with SoapUI, a free automated testing tool, using the Simple strategy (SoapUI strategies) with different amount of threads: 1, 4, 8, and 16 threads. The control performance measurement was done over a set of 10 000 processes.

A scheme comprising three Activities and two Transitions is used in the test:

The test scheme, three activities and two transitions

A single test consists of 14 steps executed successively. Each step in the test is a call of one of the basic API methods. You can read full description in the Workflow Engine basic operations and Workflow Server workflow API documentation.

#Step titleDescription
Step 1createinstanceCreating of an instance
Step 2isexistprocessChecking whether a process exists
Step 3getinstanceinfo1Getting a process instance with all parameters
Step 4getcommands1Getting a list of available commands
Step 5executecommand1Executing a command
Step 6getinstanceinfo2Getting a process instance with all parameters
Step 7getcommands2Getting a list of available commands
Step 8executecommand2Executing a command
Step 9getinstanceinfo3Getting a process instance with all parameters
Step 10getstatesGetting a list of available states
Step 11setstate1Setting process state
Step 12getinstanceinfo4Getting a process instance with all parameters
Step 13setstate3Setting process state
Step 14getinstanceinfo5Getting a process instance with all parameters

Windows Test

We used a dedicated server with the following configuration for the test:

Workflow Server, the database and the testing tool were deployed to a single server in this test. 500 000 processes were created in the database before running the control test.

Single-server test results with 500 000 processes in the database

Windows test results

TestTotal TimeAvg test time (ms)Tests per secondOperations per second
1 thread10:1238.8116.34228
4 threads3:1949.0150.13701
8 threads2:1275.4575.791 061
16 threads2:07175.6578.251 095

The results of the test show that using eight threads is the optimal solution. It provides you with the best combination of a single test time and overall performance.

You should also pay attention to CPU and memory usage by the apps. I made the following screenshot during the test:

Task Manager showing CPU and memory use during the test

.NET Core Host is a Workflow Server’s process launched in the console. You can see that Workflow Server uses 27.5% CPU and 27.9 RAM. The SoapUI tool which generates loads is deployed to the same server in our test and uses 45% CPU. If we deployed SoapUI to another server, then Workflow Engine’s performance would be higher.

Linux test

We used DigitalOcean’s One-Click Docker Droplet of the following configuration for this test:

  • 2 CPUs
  • 4 GB RAM
  • 80 GB SSD
  • PostgreSQL
  • .NET Core 2.1
  • Workflow Server 2.3

In this test, Workflow Server and the database are deployed to one server, and the utility is deployed to another server. Ping between the servers is 5ms-the servers are located in different data centers in the same region. 150 000 processes were created in the database before running the control test.

Two-server test results with 150 000 processes in the database

Linux test results

TestTotal TimeAvg test time (ms)Tests per secondOperations per second
Thread 154:34291.013.0542.7
Thread 413:41302.8812.17170.38
Thread 810:05458.8316.52231.28
Thread 168:28787.7519.7275.80

The results of the test show that using eight threads is the optimal solution. It provides you with the best combination of a single test time and overall performance. Let’s have a look at resource load in the Digital Ocean’s admin panel.

Resource load in the Digital Ocean admin panel during the eight-thread test

Conclusion

Workflow Engine demonstrates perfect performance both on weak machines and powerful servers. A well-thought-through architecture ensures stable processing times even with default database settings and hundred thousands to millions of processes, including active/unfinished ones.

You can process up to 1000 basic operations per second with an average time of processing one request of 5 to 30 milliseconds on an average server. This is enough for any solution from corporate systems to IoT platforms.

Test it on your own process

The reading ends where a proof of concept begins. Model one process you already run, with a deadline, an escalation, and a restart in the middle of a wait, then count the code that lives outside the definition.