Skip to content

make os thread nice values configurable#86703

Merged
mstetsyuk merged 21 commits intomasterfrom
os-thread-nice-values-configurable
Sep 12, 2025
Merged

make os thread nice values configurable#86703
mstetsyuk merged 21 commits intomasterfrom
os-thread-nice-values-configurable

Conversation

@mstetsyuk
Copy link
Copy Markdown
Member

@mstetsyuk mstetsyuk commented Sep 4, 2025

Changelog category (leave one):

  • Improvement

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

Make nice values of Linux threads configurable to assign some threads (merge/mutate, query, materialized view, zookeeper client) higher or lower priorities.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Sep 4, 2025

Workflow [PR], commit [345ce97]

Summary:

job_name test_name status info comment
Stress test (arm_asan) failure
Server died FAIL
Hung check failed, possible deadlock found (see hung_check.log) FAIL
Killed by signal (in clickhouse-server.log) FAIL
Fatal message in clickhouse-server.log (see fatal_messages.txt) FAIL
Killed by signal (output files) FAIL
Stress test (amd_ubsan) failure
Server died FAIL
Hung check failed, possible deadlock found (see hung_check.log) FAIL
Killed by signal (in clickhouse-server.log) FAIL
Fatal message in clickhouse-server.log (see fatal_messages.txt) FAIL
Killed by signal (output files) FAIL
Found signal in gdb.log FAIL

@clickhouse-gh clickhouse-gh bot added the pr-improvement Pull request with some product improvements label Sep 4, 2025
@Algunenano Algunenano self-assigned this Sep 4, 2025
@mstetsyuk mstetsyuk added the pr-performance Pull request with some performance improvements label Sep 10, 2025
@mstetsyuk mstetsyuk marked this pull request as ready for review September 10, 2025 13:00
@clickhouse-gh clickhouse-gh bot removed the pr-performance Pull request with some performance improvements label Sep 10, 2025
@mstetsyuk mstetsyuk added this pull request to the merge queue Sep 12, 2025
Merged via the queue into master with commit cd080d6 Sep 12, 2025
120 of 123 checks passed
@mstetsyuk mstetsyuk deleted the os-thread-nice-values-configurable branch September 12, 2025 12:36
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Sep 12, 2025
MAKE_OBSOLETE(M, Bool, enable_variant_type, true) \
MAKE_OBSOLETE(M, Bool, enable_dynamic_type, true) \
MAKE_OBSOLETE(M, Bool, enable_json_type, true) \
MAKE_OBSOLETE(M, Int64, os_thread_priority, 0) \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mstetsyuk let's make it alias to os_threads_nice_value_query otherwise it is a backward incompatible change

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CheSema
Copy link
Copy Markdown
Member

CheSema commented Mar 31, 2026

Do we have a profit from granular os nice values? Do we use them? Do we have tests (except that which only turn it ad check that it just not crash)?

else
res_group = create(context);
{
const Int32 os_threads_nice_value = context->getSettingsRef()[Setting::os_threads_nice_value_materialized_view];
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This almost newer happens. That else is needed only for corner cases ie Buffer flush.

@mstetsyuk
Copy link
Copy Markdown
Member Author

Do we have a profit from granular os nice values? Do we use them?

It's basically a failed experiment - we don't use them for now

@mstetsyuk
Copy link
Copy Markdown
Member Author

Do we have tests (except that which only turn it ad check that it just not crash)?

https://github.com/ClickHouse/ClickHouse/pull/86703/changes#diff-771740c5f56192ffc9ee0c089e991149d791b6f2cdcb78948cacbc5c54f59a4b

@mstetsyuk
Copy link
Copy Markdown
Member Author

It's basically a failed experiment

But I don't rule out that, in the future, we may want to give more priority to some "niche" threads for performance tuning (e.g. in the keeper)

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 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