-
-
Notifications
You must be signed in to change notification settings - Fork 718
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
Scheduling using stateless co-groups algorithm #7394
Closed
Closed
Conversation
This file contains 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
obviously profoundly slow; want to figure out what logic works before we think about what to pre-compute. note that I doubt this works at all without being able to oversaturate workers with a family. otherwise, with single-threaded workers, we'll just keep jumping along to a new worker for every task.
this probably isn't quite the right way to do it; only works if root tasks really are in priority order (which I guess they are??)?
hoping this makes `getitem`s in `test_anom_mean` not be queued anymore? (not actually sure if it matter that they were queued though, fwiw)
This reverts commit 796eaf5.
need to figure out good strategies/helpers for assertions. currently not trying to abstract too much before we know what we need. would like tests to be relatively flexible / insensitive to changes in cogrouping behavior. just assert no transfers and even load. (even load is harder; haven't figured that out yet.)
adding replicas doesn't transition state, of course.
`_remove_key` could take a ton of time. list wasn't necessary; we weren't using ordering for anything.
This reverts commit 7b0abf9.
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 is a rough/minimal implementation of using the stateless co-assignment algorithm in dask/dask#9755 for scheduling while queuing is active, for evaluating #7298 (see that issue for more general takeaways and discussion).
One nice thing here is a (nearly) static definition of
is_rootish
. At least, it no longer depends on cluster size or task group size.To preserve co-assignment, we submit all root-ish tasks in a co-group to worker at once, even if it means oversaturating the worker. Unfortunately, this means that the tendency of the algorithm to make too large of groups can cause us to assign far too many tasks at once, causing root task oversaturation. To avoid this, we try to ignore cogroups that look "too big" by a very rough heuristic. Of course, that also means we lose co-assignment for those groups.
Another issue was how the algorithm likes to co-group tasks like
split-shuffle
orrechunk-split
—the opposite of what we'd want, since it's critical to run those on the same worker as the input task, and not transfer the large input.Grouping of a task-based shuffle
We work around that with a little hack in
is_rootish
that skips tasks with dependencies that aren't tiny.Overall
If the cogroup algorithm were more predictable and could guarantee it wouldn't make too large of groups, this would be pretty reasonable and not too invasive to add.
Opening this as a PR just for posterity and future reference; not planning to merge (and please don't review).