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

Use spot instances for dask workers #605

Merged
merged 3 commits into from
Aug 15, 2021
Merged

Conversation

yuvipanda
Copy link
Member

  • Don't change the instance type of the dask workers - so no
    mixed instances. This is a straight port of what we have now
    to just use spot instances.
  • x1 spot instances can't be created due to quota issues,
    so we remove them from the pool.

Fixes #490

- Don't change the instance type of the dask workers - so no
  mixed instances. This is a straight port of what we have now
  to just use spot instances.
- x1 spot instances can't be created due to quota issues,
  so we remove them from the pool.

Fixes 2i2c-org#490
@yuvipanda
Copy link
Member Author

I've deployed and tested this.

@yuvipanda
Copy link
Member Author

yuvipanda commented Aug 13, 2021

Issues to create from here:

  • Fix x1 instances, for both notebooks and dask
  • Consider using mixed-instance types, to ensure better pricing & availability of nodes

@choldgraf
Copy link
Member

choldgraf commented Aug 13, 2021

thanks so much for tackling this!

@yuvipanda I've created a tracking issue for this one, think we could use that to track the extra items you wanted to follow-up on? And merge this PR since it is deployed? #607

Copy link
Member

@consideRatio consideRatio left a comment

Choose a reason for hiding this comment

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

With resolved comments, this LGTM

Comment on lines 21 to 22
// Node definitions for notebook nodes. Only `instanceType` is
// supported as a property.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// Node definitions for notebook nodes. Only `instanceType` is
// supported as a property.
// Node definitions for dask worker nodes. Only `instanceType` is
// supported as a property.

@@ -60,12 +69,12 @@ cluster {
"hub.jupyter.org/dedicated": "user:NoSchedule"
},

} + n for n in nodes
} + n for n in notebookNodes
Copy link
Member

Choose a reason for hiding this comment

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

I don't know jsonnet, but there is an inconsistency here.

Below it sais } for n in daskNodes, but here it sais } + n for n in notebookNodes. I'll go ahead and guess this is wrong, but perhaps its the other that is wrong? No clue.

Suggested change
} + n for n in notebookNodes
} n for n in notebookNodes

Copy link
Member Author

Choose a reason for hiding this comment

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

@consideRatio yeah, I was trying to be 'clever' and just be able to set instanceType for both non-spot and spot node pools. However, this becomes unmaintainable soon, so I've reverted that. Now the config is the same as what you'll pass to eksctl.

volumeSize: 80,
labels+: {
// Add instance type as label to nodegroups, so they
// can be picked up by the autoscaler
'node.kubernetes.io/instance-type': $.instanceType,
// can be picked up by the autoscaler. If using spot instances,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// can be picked up by the autoscaler. If using spot instances,
// can be picked up by the autoscaler. If using spot instances,

Indentation nitpick

For spot instances, `instanceType` can not be set on the
nodePool object, or eksctl complains. Before this commit,
we were still just specifying 'instanceType', but magically
converting it to the appropriate incantation for spot instances.
This leads to confusion, and missing features (for example,
the ability to specify multiple instanceTypes).

This commit switches us to using just plain eksctl schema,
at the cost of a slightly more verbose config
@yuvipanda
Copy link
Member Author

Thanks a lot, @consideRatio! what do you think of it now?

Copy link
Member

@consideRatio consideRatio left a comment

Choose a reason for hiding this comment

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

LGTM!

I don't feel comfortable in this situation: either I press merge or I don't.

If I merge, I'm not feeling comfortable as I don't know what happens in the CI system and feel that I have a responsibility if I merge something and the CI system messes things up in a deployment or something happen making me think so.

If I don't press merge, I feel that it would slowed down a process that isn't worth slowing down after one approved review in this case.

I'll opt to not press merge this time and count on self-merge is to be considered an acceptable policy given this PR review approval.

@choldgraf
Copy link
Member

@consideRatio we're discussing that topic over in here too: 2i2c-org/team-compass#175

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.

Make the dask workers be spot instances in carbonplan
3 participants