# Very high Workflow Task Schedule To Start Latency

**URL:** <https://community.temporal.io/t/very-high-workflow-task-schedule-to-start-latency/12809>\
**Category:** Community Support\
**Created:** [July 13, 2024, 4:35am UTC](https://community.temporal.io/t/very-high-workflow-task-schedule-to-start-latency/12809 "2024-07-13T04:35:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tmprl](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/tmprl/32/4923_2.png) [@tmprl](https://community.temporal.io/u/tmprl)\
**Post date:** [July 13, 2024, 4:35am UTC](https://community.temporal.io/t/very-high-workflow-task-schedule-to-start-latency/12809/1 "2024-07-13T04:35:05Z")

</div>

Hi Team,

We are facing a situation in executing our workflows in Temporal, where we are seeing increased temporal\_workflow\_task\_schedule\_to\_start\_latency which ranges between 1s to 5000s. Our workflows runs for an elongated period of time, may be from a few days to a week. Our activities are shorlived, which does not take more than 50ms on average and hence we used Local Activities. So far we have tried numerous performance tuning, but to no avail. Our workflow count is fairly high, 1M - 1.5M workflows are in running state at any given time.

- Our workflow\_task\_schedule\_to\_start\_latency is abnormally high
- The workers are less loaded (CPU \< 50%), but memory utilization is ~90 - 100%
- Worker task slots are always available (always ~200)

So, as per the Worker Performance documentation, we have set the following values (in Java SDK):

```auto
WorkerOptions workerOptions = WorkerOptions.newBuilder().setMaxConcurrentActivityTaskPollers(100)
        .setMaxConcurrentWorkflowTaskPollers(100)
        .setDefaultDeadlockDetectionTimeout(30000)
        .setMaxConcurrentLocalActivityExecutionSize(1000)
        .setMaxConcurrentWorkflowTaskExecutionSize(1000)
        .build();

```

However, so far we haven’t been able to fix the slow running workers issue. Any help will be highly appreciated.

Thanks.
