-
-
Notifications
You must be signed in to change notification settings - Fork 719
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
Repeatedly use the same worker on first task #4637
Comments
Tinkering with this. The test indeed fails ;) but perhaps the reason is not what you were trying to trigger? I'm seeing Is your |
Yes, this was exactly my intent. The issue was authored in haste, my apologies for the messiness here. Looking again at worker.py it looks like we might look at |
Thanks for the clarification! |
Apparently in a quiet cluster we end up sending new tasks to the same worker repeatedly. So probably the following test would fail:
This outcome is determined here:
distributed/distributed/scheduler.py
Lines 2122 to 2136 in bf9ddab
It looks like when there are no dependencies and we have only a few workers we currently choose the worker with minimum occupancy. In a quiet cluster all workers have zero occupancy, so probably we're getting whatever Python uses to break a tie in this setting.
In the case where the occupancy is zero we might do something like a round-robin (this is done just below in the case where we have greater than 20 workers) among the worker pool for as long as that worker has zero occupancy.
Reported in conversation by @crusaderky
The text was updated successfully, but these errors were encountered: