-
Notifications
You must be signed in to change notification settings - Fork 7
Fix in scorer manager in picking the best target #35
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
base: dev
Are you sure you want to change the base?
Conversation
…ill be the target for a request. Session affinity scorer added
- Rename SessionId to SessionID - Remove datastore from scoreTargets, add datastore to SessionAffinityScorer - Rename ScoredPod to PodScore
…f ScoreMng - If some specific scorer failed to score pods - just log the problem, skip it and continue to the next scorer
Signed-off-by: Shane Utt <shaneutt@linux.com>
Signed-off-by: Shane Utt <shaneutt@linux.com>
Signed-off-by: Shane Utt <shaneutt@linux.com>
Signed-off-by: Shane Utt <shaneutt@linux.com>
Signed-off-by: Shane Utt <shaneutt@linux.com>
Signed-off-by: Shane Utt <shaneutt@linux.com>
Signed-off-by: Shane Utt <shaneutt@linux.com>
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.37.0 to 0.38.0. - [Commits](golang/net@v0.37.0...v0.38.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-version: 0.38.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
…odules/golang.org/x/net-0.38.0 Bump golang.org/x/net from 0.37.0 to 0.38.0
Add scorers support in scheduler
…ev-deployments First iteration of development deployments & environments
Signed-off-by: Shane Utt <shaneutt@linux.com>
Signed-off-by: Shane Utt <shaneutt@linux.com>
…e-builds fix: basic container image builds for linux
Signed-off-by: Shane Utt <shaneutt@linux.com>
Signed-off-by: Shane Utt <shaneutt@linux.com>
Signed-off-by: Etai Lev Ran <elevran@gmail.com>
…on_yaml empty top level kustomization.yaml - make CICD happy
Fix kustomize envs
Minor fixes to enable image building matching GIE
draft changes in run-kind
Add inference model and pool yamls
Signed-off-by: Shane Utt <shaneutt@linux.com>
Signed-off-by: Shane Utt <shaneutt@linux.com>
Signed-off-by: Etai Lev Ran <elevran@gmail.com>
…oyments Add CRDs deployments
upgrade golang.org/x/oauth2 to v0.27.0
Signed-off-by: Shane Utt <shaneutt@linux.com>
This is required for full GIE support Signed-off-by: Shane Utt <shaneutt@linux.com>
Signed-off-by: Shane Utt <shaneutt@linux.com>
Signed-off-by: Shane Utt <shaneutt@linux.com>
Signed-off-by: Shane Utt <shaneutt@linux.com>
Signed-off-by: Shane Utt <shaneutt@linux.com>
Signed-off-by: Shane Utt <shaneutt@linux.com>
Signed-off-by: Shane Utt <shaneutt@linux.com>
Signed-off-by: Shane Utt <shaneutt@linux.com>
Signed-off-by: Shane Utt <shaneutt@linux.com>
Signed-off-by: Shane Utt <shaneutt@linux.com>
Signed-off-by: Shane Utt <shaneutt@linux.com>
…l-stack Add full stack deployment to Kind dev env
@@ -92,6 +92,7 @@ func (sm *ScorerMng) scoreTargets(ctx *types.Context, pods []*types.PodMetrics) | |||
if isFirst { | |||
maxScore = score | |||
highestScoreTargets = []*types.PodMetrics{pod} | |||
isFirst = false |
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.
isFirst
can be completely dropped, because it doesn't fix the negative score case, since the array is not sorted (which would beat the point). If you want to account for negative scores, maxScore
should be set to math.SmallestNonzeroFloat64
.
The code block can look like:
// select pod with maximum score, if more than one with the max score - use random pods from the list
var highestScoreTargets []*types.PodMetrics
// score weights could be negative
maxScore := 0.0
for pod, score := range podsTotalScore {
if score > maxScore {
maxScore = score
highestScoreTargets = []*types.PodMetrics{pod}
} else if score == maxScore {
highestScoreTargets = append(highestScoreTargets, pod)
}
}
I think negative scores should be prohibited textually through the Scorer interface (to avoid checking it), because allowing them would let such scorers to invade and overwrite the scoring of others. For the same reasons, scores should be normalized (cc @elevran @nirrozenbaum).
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.
I agree with @vMaroon. scorers should never return a negative value by definition.
the "normalized score" of a score should reflect in percentage the recommendation of the scorer for the pod (e.g., a float with value within the range 0-1).
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.
I recommend reading the NormalizeScores
section in kubernetes scheduling-framework:
https://kubernetes.io/docs/concepts/scheduling-eviction/scheduling-framework/
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.
Negative is useful (e.g., prefer the pod with the best cache coverage and lowest load can be expressed naively as kv - load
when both are normalized). However it is better to use weights for that and not in the score.
The downside is that we need to decide what the value represents. Working on the assumption that we prefer Pods with higher score would mean that the LoadScorer would rate pods as "1 - load" which would give lower score to loaded Pods. This would not align with the negative weights.
No description provided.