Expose all GlobalThreadPool config params#31285
Expose all GlobalThreadPool config params#31285nikitamikhaylov merged 2 commits intoClickHouse:masterfrom
Conversation
|
@nikitamikhaylov Hi! What steps should I take to make the PR mergeable, please? |
|
|
||
| ## max_thread_pool_free_size {#max-thread-pool-free-size} | ||
|
|
||
| The number of threads that are free in the Global Thread pool. |
There was a problem hiding this comment.
Better to say that this is a number of threads that global pool holds all the time even if there are no compute load. Other threads could be released to OS and then allocated from it once again.
|
|
||
| The limit to the number of jobs that can be scheduled on the Global Thread pool. | ||
|
|
||
| Default value: 10000. |
There was a problem hiding this comment.
It should be noticed that increasing this number will lead to more memory consumption. Better to set it to the value equals to max_thread_pool_size if the latter is changed.
programs/server/Server.cpp
Outdated
| config().getUInt("max_thread_pool_size", 10000), | ||
| config().getUInt("max_thread_pool_free_size", 1000), | ||
| config().getUInt("thread_pool_queue_size", 10000), | ||
| config().getBool("thread_pool_shutdown_on_exception", false) |
There was a problem hiding this comment.
I am convinced that this is bad idea (to allow the user to change this flag).
There was a problem hiding this comment.
I wanted to be consistent, but I’ll remove it. Thanks!
|
@gyfis Thanks for PR! But a couple of comments raised... |
Thanks! I implemented the recommended changes (plus a ThreadPool.h change I missed) |
|
Internal documentation ticket: DOCSUP-18492 |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Exposes all GlobalThreadPool configurations to the configuration files.
Detailed description / Documentation draft:
Adds three new configuration options
max_thread_pool_free_size: The max number of threads that are free in the Global Thread pool.
thread_pool_queue_size: The limit to the number of jobs that can be scheduled on the Global Thread pool.
thread_pool_shutdown_on_exception: The flag deciding if the thread pool should shutdown on exception.
Fixes this issue: #31256