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

Add option for preemptible instances on GCP #256

Merged
merged 3 commits into from
Feb 15, 2021
Merged

Conversation

tomwhite
Copy link
Contributor

@tomwhite tomwhite commented Feb 9, 2021

Here's a simple fix for #255.

As it stands, if preemptible instances are enabled, all instances in the cluster - including the scheduler - are preemptible. It would be better if the scheduler instance was always a standard (non-preemptible) instance. Suggestions for how to do that would be very welcome.

Copy link
Member

@quasiben quasiben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank @tomwhite ! This looks great. Left one small comment. I think it would also be good if there was a test for preemptible instances. Lastly, will GCP reject the submission if preemptible is True and automaticRestart is True?

@@ -146,9 +148,9 @@ def create_gcp_config(self):
},
"labels": {"container-vm": "dask-cloudprovider"},
"scheduling": {
"preemptible": "false",
"preemptible": ("true" if self.preemptible else "false"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about making the default preemptible=False rather than None ? I think keeping the massive dictionary cleaner is a good goal

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@tomwhite
Copy link
Contributor Author

tomwhite commented Feb 9, 2021

Thanks for the review @quasiben.

I haven't added a test yet - what would you recommend?

Also, any thoughts on how to make the scheduler non-preemptible?

will GCP reject the submission if preemptible is True and automaticRestart is True?

Yes, it did when I tried.

@quasiben
Copy link
Member

I haven't added a test yet - what would you recommend?

Naively, a test where preemptible=True -- thinking about this now, it's probably not worth it given how long it already takes to run the test suite. Last question according to google docs I think preemptible instances should just work, is that correct ?

@tomwhite
Copy link
Contributor Author

I've updated with a change so that scheduler instances are never preemptible. This is important, since losing the scheduler means the whole cluster is unusable.

Last question according to google docs I think preemptible instances should just work, is that correct ?

Are you asking about GPUs on preemptible instances? I haven't tried them, but that doc suggests they would work the same.

@tomwhite tomwhite marked this pull request as ready for review February 15, 2021 13:25
@quasiben
Copy link
Member

Sorry, yes. I was asking about GPU instances. The last change where schedulers are not preemptible is a very good idea. Merging now.

Thanks @tomwhite !

@quasiben quasiben merged commit 093af2f into dask:main Feb 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants