Skip to content

Set correct default in config.xml (concurrent_threads_soft_limit_ratio_to_cores=0) - #86516

Merged
Algunenano merged 5 commits into
ClickHouse:masterfrom
shadrunov:master
Nov 4, 2025
Merged

Algunenano merged 5 commits into
ClickHouse:masterfrom
shadrunov:master

Conversation

@shadrunov

@shadrunov shadrunov commented Sep 2, 2025 •

Copy link
Copy Markdown
Contributor

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Details

Set correct default in config.xml (concurrent_threads_soft_limit_ratio_to_cores=0) as discussed in ClickHouse/clickhouse-docs#4371

@CLAassistant

CLAassistant commented Sep 2, 2025 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@clickhouse-gh

clickhouse-gh Bot commented Sep 2, 2025 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [578685c]

Summary: ✅

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Sep 2, 2025
@Algunenano Algunenano self-assigned this Sep 2, 2025
@Algunenano Algunenano added the can be tested Allows running workflows for external contributors label Sep 2, 2025
@den-crane

den-crane commented Sep 2, 2025 •

Copy link
Copy Markdown
Contributor

I would comment out this part of XML to fix changed flag.

SELECT
    name,
    value,
    default,
    changed
FROM system.server_settings
WHERE changed AND (name LIKE '%concurrent_t%')
   +-name-----------------------------------------+-value------------+-default----------+-changed-+
1. | concurrent_threads_soft_limit_num            | 0                | 0                |       1 |
2. | concurrent_threads_soft_limit_ratio_to_cores | 2                | 0                |       1 |
3. | concurrent_threads_scheduler                 | fair_round_robin | fair_round_robin |       1 |
   +----------------------------------------------+------------------+------------------+---------+

https://fiddle.clickhouse.com/01bac37f-2201-4279-8a19-c22bc495856b


BTW, you are changing effective default value for all ClickHouse users.
I would have considered changing default to 2 in the ServerSettings.cpp

DECLARE(UInt64, concurrent_threads_soft_limit_ratio_to_cores, 0, "Same as [`concurrent_threads_soft_limit_num`](#concurrent_threads_soft_limit_num), but with ratio to cores.", 0) \

@clickhouse-gh

clickhouse-gh Bot commented Oct 28, 2025

Copy link
Copy Markdown
Contributor

Dear @Algunenano, this PR hasn't been updated for a while. You will be unassigned. Will you continue working on it? If so, please feel free to reassign yourself.

@Algunenano
Algunenano enabled auto-merge November 4, 2025 20:25
@Algunenano
Algunenano added this pull request to the merge queue Nov 4, 2025
Merged via the queue into ClickHouse:master with commit e37cd05 Nov 4, 2025
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Nov 4, 2025
pull Bot pushed a commit to mikeyhodl/ClickHouse that referenced this pull request Apr 26, 2026
Bump the shipped default in `config.xml` from 2 to 10 and the in-code
fallback in `ServerSettings.cpp` from 0 to 10, so the concurrent
threads scheduler (`max_min_fair`) effectively caps the total number of
query processing threads at 10x the number of CPU cores out of the box.

Related: ClickHouse#86516, ClickHouse#89542.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors pr-not-for-changelog This PR should not be mentioned in the changelog pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants