ClickHouse / ClickHouse/ClickHouse

max_threads_for_leaf setting

Open
#83,515 0 comments 0 reactions 0 assignees View on GitHub
comp-settings external feature
Dominant language
C++
Stars
49.9k
Forks
9k
Avg merge
21h 32m
Merged PRs (30d)
515

Description

### Company or project name

_No response_

### Use case

Clusters with huge amount of shards.
Due model of how clustered queries are executed in ClickHouse:
Initial node may handle disproportionally big chunk of query execution pipeline.
It force users to set higher max_threads value to handle this load, but it's not useful for shards as processing parallelism depends first (and scale better) with amount of shards. So, it make sense to set max_threads to lower value for them (it will be multiplied by number of shards anyway).

### Describe the solution you'd like

Set different concurrency level for initial node and remote shards
(max_threads vs max_threads_for_leaf)

### Describe alternatives you've considered

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.