Confusion regarding max concurrent execution size for activity and workflow

When I built the chart for Worker slots available, I noticed the number of slots was 68k, which I feel is too high.

At the moment, my maxConcurrentWorkflowTaskExecutionSize and maxConcurrentActivityExecutionSize are both at 4k. I was expecting the Worker slots available to be 4k for each.

worker.sticky-queue-schedule-to-start-timeout-in-seconds = 120
worker.max-concurrent-activity-execution-size = 4000
worker.max-concurrent-workflow-task-execution-size = 4000
worker.max-concurrent-local-activity-execution-size = 200
worker.max-concurrent-activity-task-pollers = 30
worker.max-concurrent-workflow-task-pollers = 30
worker.workflow-cache-size = 5000
worker.max-workflow-thread-count = 4000

A single Worker Entity can listen to only a single Task Queue. But if a Worker Process has multiple Worker Entities, the Worker Process could be listening to multiple Task Queues.

I’m wondering if the max concurrent configs above are meant for 1 Worker Entity. In other words, if my service (i.e. Worker Process) is handling tasks from all Task Queues, the total slots for Workflows would be maxConcurrentWorkflowTaskExecutionSize * No. of Workflow Task Queues and same applies for Activities.

If the above is true, my service would implode if there are suddenly many tasks in different task queues. My expectation was that maxConcurrentWorkflowTaskExecutionSize and maxConcurrentActivityExecutionSize would be applied globally across all task queues. I.e. I cannot have more than 4k activity or workflow tasks running at any point in time.

Please correct me if my understanding is wrong or my formula in Grafana is wrong.

My expectation was that maxConcurrentWorkflowTaskExecutionSize and maxConcurrentActivityExecutionSize would be applied globally across all task queues.

They are per-worker configurations
You can filter task slots available by task_queue to check for all workers that poll on specific one

If the above is true, my service would implode if there are suddenly many tasks in different task queues.

Can you give more info? Are you talking about your downstream services invoked in your activities or your Temporal workers? Whats the specific concern?