Hello!
In our project we try to achieve the maximum performance with the Flowable engine and have some problems with asynchronous serviceTask mode.
We have created a very simple BPMN definition with one step:
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:flowable="http://flowable.org/bpmn"
typeLanguage="http://www.w3.org/2001/XMLSchema"
expressionLanguage="http://www.w3.org/1999/XPath"
targetNamespace="http://www.flowable.org/processdef">
<process id="sequence1Async" name="Sequence workflow 1 async" isExecutable="true">
<startEvent id="startEvent" />
<serviceTask id="externalSystemCall" name="Test" flowable:delegateExpression="${simpleStop}" **flowable:async="true"** />
<endEvent id="approveEnd" />
<sequenceFlow sourceRef="startEvent" targetRef="externalSystemCall" />
<sequenceFlow sourceRef="externalSystemCall" targetRef="approveEnd" />
</process>
</definitions>
(simpleStop delegate only writes executionId and processInstanceId to the log and does nothing else)
And then we run a batch of requests (50 threads with 1000-10000 loop counts) with Apache JMeter. Flowable and PostgreSQL run on the same machine inside Docker with 8 CPU, 17 Gb of RAM and 128 Gb of disk space. Flowable history is disabled. We run process instances with 3 variables of type: a string, a hashmap with one key-value pair and an empty array.
We calculate the average number of completed processes per second during the test.
We have found that when flowable:async=âtrueâ is omitted, we achieve the result of 1089 processes per second but with async mode we can only get 72. The questions is: is this a normal behavior? Could we tune Flowable to achieve better performance in async mode (We have tried to increase spring.task.execution.pool.coreSize - Async Task Executor pool size - but that does not help)? We understand that the async mode adds extra operations to the process execution (an extra write of the process state to the database and an extra read from it) but that does not seem to be so resource-expensive.
Thank you!