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

feature: Support choosing Kubernetes QoS class through the decorator #2155

Merged
merged 11 commits into from
Dec 5, 2024

Conversation

saikonen
Copy link
Collaborator

enables choosing the Kubernetes QoS class out of Guaranteed/Burstable/BestEffort through the decorator.

metaflow/plugins/kubernetes/kubernetes_decorator.py Outdated Show resolved Hide resolved
# Guaranteed - has both cpu/memory limits. requests not required, as these will be inferred.
qos_limits = {
"cpu": str(cpu),
"memory": "%sM" % str(memory),
Copy link
Collaborator

Choose a reason for hiding this comment

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

what about storage?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

storage limit/request does not affect the QoS class from what I could tell, so I kept it out of this portion. Same withgpu requests. I can pre-emptively move these into the same function for introducing custom QoS classes, but for now it shouldn't have any effect.

should I make the change so ephemeral-storage and gpu requests/limits get the same treatment as cpu/memory?

Copy link
Collaborator

Choose a reason for hiding this comment

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

just ephemeral-storage. gpu's always need to specified with both requests and limits. also, can you verify airflow too?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

handling storage as well now. For the BestEffort case, I figure we keep the ephemeral-storage in the requests, or do we omit it completely?

@saikonen saikonen marked this pull request as ready for review December 3, 2024 10:43
# Guaranteed - has both cpu/memory limits. requests not required, as these will be inferred.
qos_limits = {
"cpu": str(cpu),
"memory": "%sM" % str(memory),
"ephemeral-storage": "%sM" % str(storage),
}
elif qos == "BestEffort":
elif qos == "besteffort":
# BestEffort - no limit or requests for cpu/memory
qos_requests = {"ephemeral-storage": "%sM" % str(storage)}
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we even support best effort at the moment? there doesn't seem to be a use case for it at the moment

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removed this and left a comment on adding support once there is a proper use case.

@savingoyal
Copy link
Collaborator

lgtm! can you verify airflow works as expected?

@saikonen saikonen merged commit 0469eeb into master Dec 5, 2024
29 checks passed
@saikonen saikonen deleted the feature/kubernetes-QoS-support branch December 5, 2024 18:26
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