-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Adjust scheduler assignment queue for node #15168
Conversation
ea013ce
to
3b5d156
Compare
core/trino-main/src/main/java/io/trino/execution/RemoteTask.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/server/remotetask/TaskInfoFetcher.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/server/remotetask/HttpRemoteTask.java
Outdated
Show resolved
Hide resolved
5c2871a
to
e6411d1
Compare
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Outdated
Show resolved
Hide resolved
08260d9
to
bcdcbdf
Compare
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/NodeScheduler.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/NodeScheduler.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/NodeAssignmentStats.java
Show resolved
Hide resolved
23e7cfc
to
bd32624
Compare
core/trino-main/src/main/java/io/trino/execution/scheduler/NodeSchedulerConfig.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/TopologyAwareNodeSelector.java
Outdated
Show resolved
Hide resolved
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.
Please run throughput benchmarks
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Outdated
Show resolved
Hide resolved
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.
comments, but I think the approach generally looks good
core/trino-main/src/main/java/io/trino/execution/scheduler/NodeSchedulerConfig.java
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/NodeSchedulerConfig.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/NodeSchedulerConfig.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelectorFactory.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Outdated
Show resolved
Hide resolved
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.
lgtm % comments
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/test/java/io/trino/execution/TestNodeScheduler.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/test/java/io/trino/execution/TestNodeScheduler.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/test/java/io/trino/execution/TestNodeScheduler.java
Outdated
Show resolved
Hide resolved
Splits statistics are taken at the begining of computeAssignments method, breaking a loop of assingmnet allows more efficient scheduling without testing if exhausted nodes can accept another split. Sending assignments to nodes is done after exit from this method.
bc1940f
to
40dc472
Compare
core/trino-main/src/main/java/io/trino/execution/scheduler/TopologyAwareNodeSelector.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/NodeSchedulerConfig.java
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/test/java/io/trino/execution/scheduler/TestUniformNodeSelector.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/test/java/io/trino/execution/scheduler/TestUniformNodeSelector.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/test/java/io/trino/execution/scheduler/TestUniformNodeSelector.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/test/java/io/trino/execution/scheduler/TestUniformNodeSelector.java
Show resolved
Hide resolved
core/trino-main/src/test/java/io/trino/execution/scheduler/TestUniformNodeSelector.java
Show resolved
Hide resolved
core/trino-main/src/test/java/io/trino/execution/scheduler/TestUniformNodeSelector.java
Outdated
Show resolved
Hide resolved
Add splits assignment adjustment based on node statistics. If the node is able to process all splits in the queue, the amount of max pending splits to be assigned is doubled in the next iteration of the computeAssignments method. Scaling down is done after interval from previous scaling up. Queue adjustment is limited to be in range of newly created `min-pending-splits-per-task` and changed `max-pending-splits-per-task` to `max-adjusted-pending-splits-per-task`.
|
||
// contents of taskMap indicate the node-task map for the current stage | ||
nodeScheduler = new NodeScheduler(new UniformNodeSelectorFactory(nodeManager, nodeSchedulerConfig, nodeTaskMap)); | ||
// contents of taskMap indicate the node-task map for the current stage |
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.
nit: duplicate comment
Description
Aim to fix #15146.
PR is splitting max-pending-task into the separated configuration variables and adds adjustment during scheduling of splits to increase assignments based on queue clearance. Also adding the possibility to exit assignment split loop if all nodes are filled with assignments.
Additional context and related issues
Allow scheduler to adjust size of assignments based on how fast nodes are processing splits.
Release notes
( ) This is not user-visible or docs only and no release notes are required.
(x) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text: