High Latency Camunda 7 BPM

Hi,

We are using Camunda 7 BPM. specifically

    <dependency>
        <groupId>org.camunda.bpm</groupId>
        <artifactId>camunda-bom</artifactId>
        <version>7.15.0</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>

Also the way we are spinning up the Process Engine is

 processEngineConfiguration
                .setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE)
                .setHistory(ProcessEngineConfiguration.HISTORY_NONE)
                .setProcessEngineName(camundaConfig.getProcessEngineName())
                .setJdbcMaxActiveConnections(200)
                .setJdbcMaxIdleConnections(200)
                .setJdbcUrl(camundaDatabaseConfig.getJdbcUrl())
                .setJdbcUsername(camundaDatabaseConfig.getUsername())
                .setJdbcPassword(camundaDatabaseConfig.getPassword())
                .setJobExecutor(new CustomJobExecutor())
                .setJobExecutorActivate(camundaConfig.isJobExecutorActivate());

The CustomJobExecutor is

public class CustomJobExecutor extends DefaultJobExecutor {

    public CustomJobExecutor() {
        this.corePoolSize = 16;
        this.maxPoolSize = 16;
        this.queueSize = 1000;
    }
}

We have tried both External Tasks and internal tasks the latency of the External task is surprisingly in the order of minutes

   taskClient =
                ExternalTaskClient.create()
                        .baseUrl(
                                String.format(
                                        "%s/engine/%s",
                                        config.getEndpoint(), config.getEngineName()))
                        .maxTasks(5)
                        .asyncResponseTimeout(120000)
                        .backoffStrategy(new ExponentialBackoffStrategy(0, 0, 0))
                        .build();

        taskClient
                .subscribe(config.getTopicName())
                .lockDuration(config.getLockDuration().toMillis())
                .handler(handler)
                .open();

This is how we are configuring the External task.

For the database we are using Oracle Autonomous DB. We are passing 20 Qps and we are instantiating the process instance by key using

        RuntimeService runtimeService =
                ProcessEngines.getProcessEngine("MyOrchestrator").getRuntimeService();
runtimeService.startProcessInstanceByKey("create_workflow", variables);

the variables are <1KB.

I am following this document Performance tuning Camunda 7 | Camunda Platform 8 to improve performance but the suggestions only marginally improved it. Can someone please help us to identify and major issues in the code?

Hi @tonyl,

try .disableBackoffStrategy() instead of .backoffStrategy(new ExponentialBackoffStrategy(0, 0, 0)).

This may flood your network with requests.

Maybe as an alternative, limit the exponetial backoff to a much smaller amount like (50, 2, 200) which limits the backoff at 200 ms instead of a minute by default.

Hope this helps, Ingo