We are launching processes in bulk (say 100 instances) in JBPM5 at a time. And each and every tasks of the process are started and completed by external programs asynchronously. In this scenario, the JBPM engine is taking much time to generate the next task and thus the overall performance is getting affected. (eg: Its taking an average of 45 mins to complete 100 process instances) Kindly suggest a way to optimize the performance of the jbpm5 engine.
3 Answers
Something must be wrong or misconfigured, as 45min to complete 100 process instances seems way too much, each request in general should take significantly less than a second in normal cases. But it's difficult to figure out what might be wrong. Do you have more info on your set up and what is actually taking up a lot of time? What types of external services are you invoking? Do you have a prototype available that we might be able to look at?
Kris

- 2,918
- 1
- 15
- 5
-
The sample workflow contains 8 human tasks and and the war is deployed in jboss server and daemon threads running in the background.On the launch of 100 processes the thread will start all the reserved tasks and another thread will complete the inprogress tasks. The starting and completion of the first task of all process is faster but the generation of later tasks is slower and subequently its taking much time. – Arun Selva Apr 10 '12 at 05:33
-
Now its faster. After completing the task by client.complete() i'm intimating/signalling the server with ksession.getWorkItemManager().completeWorkItem(id, data); with this the engine is generating the subsequent tasks faster and i could able to retrieve it for my processing. But is this the ideal way of completing any tasks..? – Arun Selva Apr 23 '12 at 05:26
Yes that sounds as problem in your domain, and not in your engine. Some time ago we did some performance tests for in memory processes and for DB persisted processes and the latency introduced by the engine were less that 2ms per activity (in memory) and 5ms per activity (persisted in the database). How exactly are you calling the engine, how are you hosting it? what kind of calls are you doing? Do yo have a way to measure how much time takes your external services to answer?
Cheers

- 4,123
- 1
- 14
- 15
-
-
Threads running in the background will start and complete the tasks of each process.In the mysql db we witnessed that once 100 task is completed the new task generation is taking time and that's where we suspected that the engine might be slow. – Arun Selva Apr 10 '12 at 05:50
-
It shouldn't. What do you mean with Threads Running in the back? Humans are supposed to complete those Human Tasks right? What are those threads doing? take a look at the sql logs to see what is happening.. probably you are killing the database sending tons of queries with those background threads. – salaboy Apr 10 '12 at 08:06
-
The sample workflow contains 8 human tasks and and the war is deployed in jboss server and daemon threads running in the background.On the launch of 100 processes the thread will start all the reserved tasks and another thread will complete the inprogress tasks. The starting and completion of the first task of all process is faster but the generation of later tasks is slower and subequently its taking much time. May be is there a way to intimate the process engine about the completion of the task and generate new one. – Arun Selva Apr 17 '12 at 14:25
Now its faster. After completing the task by
client.complete()
i'm intimating/signalling the server using the command
ksession.getWorkItemManager().completeWorkItem(id, data);
with this the engine is generating the subsequent tasks faster and i could able to retrieve it for my processing. But is this the ideal way of completing any tasks..?

- 117
- 3
- 15