Raise concurrent_threads_soft_limit_ratio_to_cores code default to 2 by alexey-milovidov · Pull Request #103446 · ClickHouse/ClickHouse · GitHub
Skip to content

Raise concurrent_threads_soft_limit_ratio_to_cores code default to 2#103446

Open
alexey-milovidov wants to merge 2 commits intomasterfrom
enable-concurrent-threads-scheduler
Open

Raise concurrent_threads_soft_limit_ratio_to_cores code default to 2#103446
alexey-milovidov wants to merge 2 commits intomasterfrom
enable-concurrent-threads-scheduler

Conversation

@alexey-milovidov
Copy link
Copy Markdown
Member

@alexey-milovidov alexey-milovidov commented Apr 23, 2026

Align the in-code fallback of concurrent_threads_soft_limit_ratio_to_cores in src/Core/ServerSettings.cpp with the shipped programs/server/config.xml value, so both are 2.

Previously the code default was 0 (unlimited) while config.xml shipped 2, meaning the max_min_fair scheduler effectively had no cap for anyone running without the shipped config.xml.

Related history: #86516, #89542.

Changelog category (leave one):

  • Improvement

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Align the default of the server setting concurrent_threads_soft_limit_ratio_to_cores in code with the shipped config.xml value (2), so the default max_min_fair concurrent threads scheduler caps query processing threads at 2x cores out of the box even when the shipped config.xml is not used.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

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: #86516, #89542.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@alexey-milovidov alexey-milovidov requested a review from serxa April 23, 2026 15:37
@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh Bot commented Apr 23, 2026

@clickhouse-gh clickhouse-gh Bot added the pr-improvement Pull request with some product improvements label Apr 23, 2026
Keep `programs/server/config.xml` at the existing `2` and align the
in-code fallback in `ServerSettings.cpp` with it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@alexey-milovidov alexey-milovidov changed the title Raise concurrent_threads_soft_limit_ratio_to_cores default to 10 Raise concurrent_threads_soft_limit_ratio_to_cores code default to 2 Apr 23, 2026
@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh Bot commented Apr 23, 2026

LLVM Coverage Report

Metric Baseline Current Δ
Lines 83.70% 83.80% +0.10%
Functions 91.10% 91.10% +0.00%
Branches 76.20% 76.20% +0.00%

Changed lines: 100.00% (6/6) · Uncovered code

Full report · Diff report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-improvement Pull request with some product improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant