-
Notifications
You must be signed in to change notification settings - Fork 154
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 blog post for scheduler plugin reusing #381
Conversation
Signed-off-by: Ukri Niemimuukko <ukri.niemimuukko@intel.com>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: uniemimu The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Welcome @uniemimu! |
Apolgies! Somehow this PR never showed up in my notifications, and as such I just noticed it. Thank you so much for your patience. I will review it during/after Kubecon and move it forwards. |
This passes spelling and composition check, but I'm waiting for @kubernetes/sig-scheduling-misc review; I've reached out to the SIG. |
/assign @Huang-Wei |
content/en/blog/2023/2023-03-08-scheduler-plugin-reusing/index.md
Outdated
Show resolved
Hide resolved
content/en/blog/2023/2023-03-08-scheduler-plugin-reusing/index.md
Outdated
Show resolved
Hide resolved
Signed-off-by: Ukri Niemimuukko <ukri.niemimuukko@intel.com>
OK, this looks good, should we publish? |
Yup, |
Should I squash this? |
You can if you want. I can also have Tide do it. However, I need to confer with @sftim on how we fix the date for the blog post. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
layout: blog | ||
title: "Scheduler plugin reusing" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this repo
layout: blog | |
title: "Scheduler plugin reusing" | |
date: 2023-11-08 | |
layout: blog | |
author: "Ukri Niemimuukko (Intel)" | |
title: "Code reuse in Kubernetes scheduler plugins" |
and change the path to, eg content/en/blog/2023/scheduler-plugin-code-reuse.md
title: "Scheduler plugin reusing" | ||
--- | ||
|
||
**Author:** Ukri Niemimuukko (Intel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**Author:** Ukri Niemimuukko (Intel) |
This repo puts author information in front matter.
|
||
However, the real use-case has a much more simplistic graph: | ||
|
||
{{< figure src="diagram2.svg" alt="Plugins NodeResourcesFit and TopologyScorer with connection NodeResourcesFit->TopologyScorer">}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(nit)
{{< figure src="diagram2.svg" alt="Plugins NodeResourcesFit and TopologyScorer with connection NodeResourcesFit->TopologyScorer">}} | |
{{< figure src="diagram2.svg" alt="Plugins NodeResourcesFit and TopologyScorer with connection NodeResourcesFit → cycle state → TopologyScorer">}} |
|
||
Ideally, a new plugin could ask for getting the scores from another plugin, or multiple plugins, without rerunning them. The tricky thing is, that plugins run highly parallel in order to execute faster. Thus proper synchronization would be needed. Also it would be ideal, if no changes to existing plugins would be required, and the framework would provide for plugins in need of reusing other plugins' results. | ||
|
||
This got the author thinking, that if the `framework.CycleState` object could contain a channel for the scores, and if the framework would create such a channel when it is needed, then the parallel running plugins which are interested in score reuse, could wait for the scores to appear from such "ScoreChannels". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This got the author thinking, that if the `framework.CycleState` object could contain a channel for the scores, and if the framework would create such a channel when it is needed, then the parallel running plugins which are interested in score reuse, could wait for the scores to appear from such "ScoreChannels". | |
This got me thinking that if the `framework.CycleState` object could contain a channel for the scores, and if the framework would create such a channel when it is needed, then the parallel running plugins which are interested in score reuse could wait for the scores to appear from such `ScoreChannels`. |
even better rewritten as shorter sentences (commas are not enough; a rewrite would use more periods)
|
||
A little less than 80 framework lines of PoC-code later the now very dirty scheduler was able to pick up from the arguments of plugins, whether they wanted to use scores from other plugins, and it was creating such "ScoreChannels" into the `framework.CycleState` and wrote scores to them as requested. A couple of experimental plugins later it was possible to verify that indeed, plugin scoring graphs such as the following were entirely possible: | ||
|
||
{{< figure src="diagram1.svg" alt="Plugins A, B, C and D with connections A->B, A->C, B->D, C->D">}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{{< figure src="diagram1.svg" alt="Plugins A, B, C and D with connections A->B, A->C, B->D, C->D">}} | |
{{< figure src="diagram1.svg" alt="Plugins A, B, C and D with connections A → B, A → C, B → D, C → D. The connections are via a Cycle State element." >}} |
|
||
## Next steps | ||
|
||
As per discussed in the sig-scheduling meetings, the topology resource scoring plugin will proceed with the more conservative composition approach, because it can get the job done without framework changes, associated risks and maintenance burden. However, if you find that it would indeed benefit your use-cases to be able to simply configure scheduler profiles in such a way that certain score plugins are connected, chime in at slack [#sig-scheduling]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per discussed in the sig-scheduling meetings, the topology resource scoring plugin will proceed with the more conservative composition approach, because it can get the job done without framework changes, associated risks and maintenance burden. However, if you find that it would indeed benefit your use-cases to be able to simply configure scheduler profiles in such a way that certain score plugins are connected, chime in at slack [#sig-scheduling]. | |
As per discussed in SIG Scheduling meetings, the topology resource scoring plugin will proceed with the more conservative composition approach, because it can get the job done without framework changes, associated risks and maintenance burden. However, if you find that it would indeed benefit your use-cases to be able to simply configure scheduler profiles in such a way that certain score plugins are connected, chime in via [`#sig-scheduling`][#sig-scheduling] on Kubernetes Slack (visit https://slack.k8s.io/ for an invitation). |
} | ||
``` | ||
|
||
A little less than 80 framework lines of PoC-code later the now very dirty scheduler was able to pick up from the arguments of plugins, whether they wanted to use scores from other plugins, and it was creating such "ScoreChannels" into the `framework.CycleState` and wrote scores to them as requested. A couple of experimental plugins later it was possible to verify that indeed, plugin scoring graphs such as the following were entirely possible: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A little less than 80 framework lines of PoC-code later the now very dirty scheduler was able to pick up from the arguments of plugins, whether they wanted to use scores from other plugins, and it was creating such "ScoreChannels" into the `framework.CycleState` and wrote scores to them as requested. A couple of experimental plugins later it was possible to verify that indeed, plugin scoring graphs such as the following were entirely possible: | |
A little less than 80 framework lines of PoC-code later the now very dirty scheduler was able to pick up from the arguments of plugins, whether they wanted to use scores from other plugins, and it was creating such `ScoreChannels` into the `framework.CycleState` and wrote scores to them as requested. A couple of experimental plugins later it was possible to verify that indeed, plugin scoring graphs such as the following were entirely possible: |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
@uniemimu do you have capacity to address Tim's feedback? |
Obviously I haven't had, my apologies for that. Since the somewhat related KEP PR (3925) never found any interest, I'm leaning towards closing this PR without publishing. What do you think? |
@uniemimu I think that's completely fine. If the KEP picks up traction again, this PR can always be re-opened and worked on once again. Thanks for answering! |
No description provided.