docs/src/main/sphinx/admin/properties-task.md
task.concurrencyprop-type-integertask_concurrencyDefault local concurrency for parallel operators, such as joins and aggregations. This value should be adjusted up or down based on the query concurrency and worker resource utilization. Lower values are better for clusters that run many queries concurrently, because the cluster is already utilized by all the running queries, so adding more concurrency results in slow-downs due to context switching and other overhead. Higher values are better for clusters that only run one or a few queries at a time.
task.http-response-threadsprop-type-integer1100Maximum number of threads that may be created to handle HTTP responses. Threads are created on demand and are cleaned up when idle, thus there is no overhead to a large value, if the number of requests to be handled is small. More threads may be helpful on clusters with a high number of concurrent queries, or on clusters with hundreds or thousands of workers.
task.http-timeout-threadsprop-type-integer13Number of threads used to handle timeouts when generating HTTP responses. This value
should be increased if all the threads are frequently in use. This can be monitored
via the trino.server:name=AsyncHttpExecutionMBean:TimeoutExecutor
JMX object. If ActiveCount is always the same as PoolSize, increase the
number of threads.
task.info-update-intervalprop-type-duration1ms10s3sControls staleness of task information, which is used in scheduling. Larger values can reduce coordinator CPU load, but may result in suboptimal split scheduling.
task.max-drivers-per-taskprop-type-integer12147483647Controls the maximum number of drivers a task runs concurrently. Setting this value reduces the likelihood that a task uses too many drivers and can improve concurrent query performance. This can lead to resource waste if it runs too few concurrent queries.
task.max-partial-aggregation-memoryprop-type-data-size16MBMaximum size of partial aggregation results for distributed aggregations. Increasing this value can result in less network transfer and lower CPU utilization, by allowing more groups to be kept locally before being flushed, at the cost of additional memory usage.
task.max-worker-threadsprop-type-integerSets the number of threads used by workers to process splits. Increasing this number
can improve throughput, if worker CPU utilization is low and all the threads are in use,
but it causes increased heap space usage. Setting the value too high may cause a drop
in performance due to a context switching. The number of active threads is available
via the RunningSplits property of the
trino.execution.executor:name=TaskExecutor.RunningSplits JMX object.
task.min-driversprop-type-integertask.max-worker-threads * 2)The target number of running leaf splits on a worker. This is a minimum value because
each leaf task is guaranteed at least 3 running splits. Non-leaf tasks are also
guaranteed to run in order to prevent deadlocks. A lower value may improve responsiveness
for new tasks, but can result in underutilized resources. A higher value can increase
resource utilization, but uses additional memory.
task.min-drivers-per-taskprop-type-integer13The minimum number of drivers guaranteed to run concurrently for a single task given the task has remaining splits to process.
task.scale-writers.enabledprop-task-scale-writers(prop-task-min-writer-count)=
task.min-writer-countprop-type-integer1task_min_writer_countThe number of concurrent writer threads per worker per query when
{ref}preferred partitioning <preferred-write-partitioning> and
{ref}task writer scaling <prop-task-scale-writers> are not used. Increasing this value may
increase write speed, especially when a query is not I/O bound and can take advantage of
additional CPU for parallel writes.
Some connectors can be bottlenecked on the CPU when writing due to compression or other factors.
Setting this too high may cause the cluster to become overloaded due to excessive resource
utilization. Especially when the engine is inserting into a partitioned table without using
{ref}preferred partitioning <preferred-write-partitioning>. In such case, each writer thread
could write to all partitions. This can lead to out of memory error since writing to a partition
allocates a certain amount of memory for buffering.
(prop-task-max-writer-count)=
task.max-writer-countprop-type-integertask_max_writer_countThe number of concurrent writer threads per worker per query when either
{ref}task writer scaling <prop-task-scale-writers> or
{ref}preferred partitioning <preferred-write-partitioning> is used. Increasing this value may
increase write speed, especially when a query is not I/O bound and can take advantage of additional
CPU for parallel writes. Some connectors can be bottlenecked on CPU when writing due to compression
or other factors. Setting this too high may cause the cluster to become overloaded due to excessive
resource utilization.
task.interrupt-stuck-split-tasks-enabledprop-type-booleantrueEnables Trino detecting and failing tasks containing splits that have been stuck. Can be
specified by task.interrupt-stuck-split-tasks-timeout and
task.interrupt-stuck-split-tasks-detection-interval. Only applies to threads that
are blocked by the third-party Joni regular expression library.
task.interrupt-stuck-split-tasks-warning-thresholdprop-type-duration1m10mPrint out call stacks at /v1/maxActiveSplits endpoint and generate JMX metrics
for splits running longer than the threshold.
task.interrupt-stuck-split-tasks-timeoutprop-type-duration3m10mThe length of time Trino waits for a blocked split processing thread before failing the task. Only applies to threads that are blocked by the third-party Joni regular expression library.
task.interrupt-stuck-split-tasks-detection-intervalprop-type-duration1m2mThe interval of Trino checks for splits that have processing time exceeding
task.interrupt-stuck-split-tasks-timeout. Only applies to threads that are blocked
by the third-party Joni regular expression library.