-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure worker threads relative to core count #20772
Configure worker threads relative to core count #20772
Conversation
Worker threads defaults to 2*#cores. This commit allows configuration to be #cores based too. Extracted from trinodb#16303 Co-authored-by: Mateusz "Serafin" Gajewski <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
@@ -286,9 +286,9 @@ public int getMaxWorkerThreads() | |||
|
|||
@LegacyConfig("task.shard.max-threads") | |||
@Config("task.max-worker-threads") | |||
public TaskManagerConfig setMaxWorkerThreads(int maxWorkerThreads) | |||
public TaskManagerConfig setMaxWorkerThreads(String maxWorkerThreads) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add @ConfigDescription
and documentation ?
Maybe also deprecate task.shard.max-threads
in another commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe also deprecate
task.shard.max-threads
in another commit
that's orthogonal, i believe?
I think it should accept decimal number for better configurability.
|
i didn't have a use-case for this. note that effective configuration should be exact, whole number of threads, so we don't want floating point arithmetics semantics. |
Worker threads defaults to 2*#cores. This commit allows configuration to be #cores based too.
Extracted from #16303