Hi,
I am doing a performance benchmark of camunda . To my surprise, the user task completion is very slow even on the basic process.
I am testing on the below env -
Java - 13
Camunda Version - 7.18.0
Postgres 13
Model -

Stats -
No. of process instances - 10000
Total Time for completing 10000 tasks - 65 Sec
Code -
long start = System.currentTimeMillis();
List<Task> tasks = taskService.createTaskQuery().list();
tasks.forEach(t -> {
taskService.complete(t.getId());
});
long end=System.currentTimeMillis();
long timeTaken = (end-start)/1000;
Please suggest.
Hello @kuldeeparora89 ,
are there any async flags set?
You should have „async after“ on the task. This would make your benchmarking thread returning after the task is finished while the rest of the process is executed in the background.
Also, you could think about parallel execution of the tasks. The engine is thread-safe, so instead of directly executing in a loop, you could use an executor service with some parallel threads.
I hope this helps
Jonathan
Thanks @jonathan.lukas .
I am executing the completion in 5 parallel threads now . Also tried setting the async flag.
Still, the average time is 30 sec.
Hello @kuldeeparora89 ,
that‘s not bad after all.
An average of 333,3 completed user tasks per second is a good performance I would say regarding the fact that each user task completion requires a db transaction.
What would be your performance goal?
Jonathan
1 Like