Camunda performance issue

Hi,

for a performance test of my application, I am trying to migrate about 50.000 process instances from one deployment to another one. Both the process query to find the relevant instances and the migration process take quite long. The migration process even several hours.

Is this the expected behaviour or rather is camunda engine designed for such process instance amounts at all?

I am using the apache distribution and a Microsoft SQL Server database.

Thanks in advance!

Best regards,
Carsten

Hi Carsten,

please post the Camunda and MSSQL Version, which you use. In the past there were some query improvements so perhaps you use an old version of Camunda.

It is also interesting to see the “process query”, which you use. Please also specify what do you mean with “take quite long”, since this is little bit to vague.

Perhaps you can create an test project on Github with your performance tests, so we can reproduce and test it.
See this unittest-project which contains an example of how to write a unit test for camunda bpm.

Greets,
Chris

1 Like

Hi Chris,

I am using camunda 7.6 with MS SQL Server 2012.

I provided a test in this project: https://github.com/SpiekerC/camunda-performance-test

Explanation:
The test creates two deployments of the same process and starts 50.000 instances. All these instances are migrated to the second version of the process.

Result:
Migrating all 50.000 instances takes

  • about 3 minutes within file based H2 database and
  • about 30 minutes within MS SQL Server.

The process query issue has been ok (about 1 second), I don´t know why this has been a problem before.

Open questions:

  1. Is the duration of migrating instances acceptable by design or is there something wrong with my settings?
  2. If the duration is acceptable by design: What is the best practice to handle big migration scenarios? In my opinion one has to ensure that the instances, which have to be migrated, cannot be used by anyone until the whole migration has been finished. Maybe the old version has such a big bug that it must not be used until the new version is active. You know what I mean? Is there any way camunda handles such a scenario? I think the priority of the problem increases with the time the migration process takes.

Best regards, Carsten

Hey Carsten,

thanks for your reply and your test project.

  1. Yes we know that migration takes awhile and Yes it is accepted. I see no problems with your settings.

  2. For bigger scenarios like bigger migrations we introduced the batching infrastructure.
    The migration will be done asynchronous. The migration will be split in several jobs and will be executed
    by the JobExecutor. For more informations see the documentation about Asynchronous batch migration execution.

If you want to use the batch infastructure simply change the Line 76 in the PerformanceTest.java from .execute() to .executeAsync().

In my opinion one has to ensure that the instances, which have to be migrated, cannot be used by anyone until the whole migration has been finished. Maybe the old version has such a big bug that it must not be used until the new version is active.

You could try to suspend the process instances and the process definition. In that case the process instances can’t be executed and no new process instances for that process definition can be created/started. After the migration set the process instances to active again.

Hope it helps.

Best regards,
Chris

1 Like

Hello Chris,

thank you for the answer. For now I will try to use the suspend mode for my scenarios while the migration is performed asynchronous. It sounds like a valid solution for my concerns.

Greetz
Carsten