Conversation
Contributor
bharatnc
reviewed
Mar 20, 2025
Co-authored-by: Bharat Nallan <[email protected]>
Member
Author
|
Member
Author
|
1 task
alexkats
reviewed
Apr 5, 2025
Co-authored-by: Alexey Katsman <[email protected]>
Co-authored-by: Alexey Katsman <[email protected]>
Co-authored-by: Alexey Katsman <[email protected]>
Co-authored-by: Alexey Katsman <[email protected]>
Co-authored-by: Alexey Katsman <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements concurrency control on top of the resource scheduler and introduces a new type of RESOURCE and a new WORKLOAD setting to limit the number of concurrent threads for a specific workload.
Usage example:
This configuration example provides independent CPU slot pools for admin and production. The production pool is shared between analytics and ingestion. Furthermore, if the production pool is overloaded, 9 of 10 released slots will be rescheduled to analytical queries if necessary. The ingestion queries would only receive 1 of 10 slots during overload periods. This might improve the latency of user-facing queries. Analytics has its own limit of 60 concurrent thread, always leaving at least 40 threads to support ingestion. When there is no overload, ingestion could use all 100 threads.
WARNING: Slot scheduling provides a way to control query concurrency but does not guarantee fair CPU time allocation yet. This requires further development of CPU slot preemption and will be supported in the follow-up PR.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Added CPU slot scheduling for workloads, see https://clickhouse.com/docs/operations/workload-scheduling#cpu_scheduling for details
Documentation entry for user-facing changes