Skip to main content
Output workers run workflows and activities through Temporal. These settings control compute, memory, and IO behavior:
  • Compute: how many Workflow and Activity Tasks can execute concurrently.
  • Memory: how many Workflow Executions stay in the sticky cache.
  • IO: how many pollers long-poll Temporal for new tasks.
Start with the defaults. Tune only when you see backlog in Temporal, high memory use, underused CPU, or task timeouts.

Concurrency and Polling

These env vars map to Temporal worker execution slots, cache, and pollers. See Temporal’s Worker performance guide, Worker tuning quick reference, and WorkerOptions. Example:

Worker Tuner

TEMPORAL_WORKER_TUNER accepts a JSON-encoded Temporal WorkerOptions.tuner. Use it when fixed concurrency limits are too rigid and you want Temporal’s slot suppliers to control how many tasks the worker accepts. Resource-based auto-tuning is most useful for avoiding out-of-memory failures and absorbing bursts of low-resource work, such as Activities that spend most of their time waiting on external HTTP or I/O. Temporal recommends validating it by monitoring host CPU and memory under full load and confirming they settle near your configured targets. See Temporal’s resource-based auto-tuning announcement for the model behind the feature. Choose exactly one tuner shape:
  • Resource-based tuner: one set of tunerOptions, plus optional *SlotOptions.
  • Mixed slot suppliers: one *SlotSupplier object for each task type.
Do not mix tunerOptions / *SlotOptions with *SlotSupplier fields in the same JSON object. When TEMPORAL_WORKER_TUNER is set, Output passes it to Temporal as tuner and does not pass these incompatible execution options:
  • TEMPORAL_MAX_CONCURRENT_ACTIVITY_TASK_EXECUTIONS
  • TEMPORAL_MAX_CONCURRENT_WORKFLOW_TASK_EXECUTIONS
Polling and cache settings still apply:
  • TEMPORAL_MAX_CONCURRENT_ACTIVITY_TASK_POLLS
  • TEMPORAL_MAX_CONCURRENT_WORKFLOW_TASK_POLLS
  • TEMPORAL_MAX_CACHED_WORKFLOWS

Resource-Based Tuner

Use a ResourceBasedTuner to let Temporal adjust slots based on target CPU and memory usage. This is the simpler tuner shape. You can provide only workflow and activity slot options; Temporal applies defaults for local activity and Nexus slots.
Resource-based fields:

Mixed Slot Suppliers

Use a TunerHolder to choose a slot supplier per task type. This is useful when workflow tasks should remain fixed but activities should scale with CPU and memory.
When using the per-task supplier form, Temporal requires all four supplier fields: workflowTaskSlotSupplier, activityTaskSlotSupplier, localActivityTaskSlotSupplier, and nexusTaskSlotSupplier. Omitting local activity or Nexus suppliers can fail worker startup.
Supplier types: Temporal also supports custom slot suppliers in code, but TEMPORAL_WORKER_TUNER is JSON and should be used only for fixed-size and resource-based suppliers.

What to Watch

Use Temporal metrics before changing values. The main question is whether the worker has no execution capacity left, or whether it has capacity but is not polling fast enough. See Temporal’s SDK metrics reference, Worker health, and performance bottlenecks guide.

Choosing Values

If memory is high, lower activity slots first. Activities usually hold network responses, LLM payloads, browser state, or other heavier objects. If Temporal shows activity backlog and the worker has spare CPU and memory, raise activity execution slots or use a resource-based tuner with a higher maximumSlots. If workflow task backlog grows while CPU is low, check temporal_worker_task_slots_available first. If workflow slots are depleted, raise workflow task execution slots. If slots are available but schedule-to-start latency is high, raise workflow task pollers. If workflow task timeouts increase, lower workflow task execution slots. If CPU and memory vary heavily by workload, prefer TEMPORAL_WORKER_TUNER with resource-based activity slots over a large fixed activity concurrency. Tune incrementally and load test before applying large production changes. Temporal’s Introduction to Worker Tuning is a good overview of when to scale workers horizontally versus increasing per-worker slots or pollers.