Open chaunceyjiang opened 2 months ago
/cc @Garrybest @jwcesign @RainbowMango @whitewindmills
Please take a look.
You can add an agenda to the community meeting to introduce it in detail.
I have a question, do we really need prefilter, postFilter and postScore now? Is there a definite plugin to add in this step? If we currently do not have a clear built-in plug-in at this step, how can we judge that users have the need for this extension?For example, a typical postfilter implementation is preemption, but Karmada does not involve now. We can discuss it in next meeting.
Yes, that's a very good question. I'm not able to fully answer your question at the moment. As described in the issue Convert all the information needed by the scheduler into scores
, I just wanted to convert AvailableReplicas
into scores. However, as you can see in the PR, its implementation is very poor due to insufficient extensibility of the current scheduling framework.
Hopefully we will have a clear conclusion in Karmada next meeting.
I think Prefilter
is necessary so far, we need this extension point to get all available replicas. Other extension could be added in the future if it is necessary.
For the current implementation of the assignment algorithm based on weight, the weight information in Placement
is directly read. I have an idea 😂, is it possible to convert the weights into scores and assign Replicas
according to the weight of the scores?
I have thought this before. Firstly by Filter plugin, we caculate the upper boundary replicas of every member cluster. And then Score plugin help us caculate the weight of all member clusters. But I'm not sure if this method could meet the requirement of all scenarios.
I find that the scheduler uses cluster resources in the three steps of score
, selectClusters
and assignReplicas
. These steps are not dependent on timing and can use the same data.
I wonder if we can put cluster resources into the snapshot
. We use the same data in all steps of one scheduling.
// Snapshot is a snapshot of cache ClusterInfo. The scheduler takes a
// snapshot at the beginning of each scheduling cycle and uses it for its operations in that cycle.
type Snapshot struct {
// clusterInfoList is the list of nodes as ordered in the cache's nodeTree.
clusterInfoList []*framework.ClusterInfo
}
We use the same data in all steps of one scheduling.
This is the core idea of my PR #3299.
I'm trying to design a new scheduelr framework. A little bit difficult. I will show you ASAP.
Is it possible to extract this framework as a utility library? Doing so would enable other areas to utilize the scheduling logic in the future, such as FederatedHPA.
I'm trying to design a new scheduelr framework. A little bit difficult. I will show you ASAP.
👍
What would you like to be added:
Optimize scheduler framework.
Why is this needed:
When I wanted to add a scheduling plugin to the scheduler, I found it difficult to do it under the current scheduling framework. The current scheduling process lacks scheduling steps, such as:
preFilter
,postFilter
,preScore
, etc., and also lacks a cycle state, which is used to share data in different plug-ins.The scheduler should only use the score to select the cluster to be scheduled, no other additional reasons are required.
So there are two goals for this optimization.
Now:
Disadvantages: There are too few scheduler extension points, and data cannot be shared between plug-ins.
After:
Data can be shared between different plugins via CycleState.