Skip to content
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

Eventually shut down scheduler when no workers return #8126

Closed
hendrikmakait opened this issue Aug 23, 2023 · 3 comments · Fixed by #8371
Closed

Eventually shut down scheduler when no workers return #8126

hendrikmakait opened this issue Aug 23, 2023 · 3 comments · Fixed by #8371
Labels
feature Something is missing

Comments

@hendrikmakait
Copy link
Member

Currently, a scheduler is not considered idle if it has tasks waiting to be processed but no workers that could process them: https://github.com/hendrikmakait/distributed/blob/4b10aa7068ff8a67cc756ef0c91f5553429963f3/distributed/scheduler.py#L7966-L7972

This makes sense in adaptive scaling scenarios or when using ephemeral workers to give new workers time to spin up. However, we should eventually shut down the scheduler if no workers return instead of leaving it running indefinitely.

We could do this by adjusting the definition of the idle timeout to include time spent without workers or adding a dedicated timeout mechanism.

@hendrikmakait hendrikmakait added the feature Something is missing label Aug 23, 2023
@FTang21
Copy link
Contributor

FTang21 commented Nov 10, 2023

Helllo @hendrikmakait,

I'm Franke Tang, a graduate student currently taking a Distributed Computing course, and part of my final project encourages us to contribute to open issues on GitHub relating to distributed systems. I would like to work on this issue if this feature has not been implemented yet.

@fjetter
Copy link
Member

fjetter commented Nov 15, 2023

Welcome @FTang21 ! Contributions are very welcome.

You'll find the logic for this here

def check_idle(self) -> float | None:
Tracking the time w/out workers is likely not trivial but it shouldn't be too difficult. If you have questions or need help, I encourage you to open a "Draft" PR and we can have a look at how far you got

@FTang21
Copy link
Contributor

FTang21 commented Nov 26, 2023

Hello,

Sorry with the late response, I was busy with other PRs. I created PR, could you guys look and see if my logic is correct or on the right track.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Something is missing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants