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

Is the Score plugin ClusterAffinity necessary? #6022

Open
zhzhuang-zju opened this issue Jan 7, 2025 · 6 comments
Open

Is the Score plugin ClusterAffinity necessary? #6022

zhzhuang-zju opened this issue Jan 7, 2025 · 6 comments
Labels
kind/question Indicates an issue that is a support question.

Comments

@zhzhuang-zju
Copy link
Contributor

Please provide an in-depth description of the question you have:
During the scheduling process, the clusters filtered by the filter plugin will be scored by the score plugin, currently there are two score plugins

ClusterAffinity also functions as a filter plugin, removing member clusters that do not meet its specified criteria. It is already effective during the filtering stage of the clustering process. However, is it necessary for ClusterAffinity to also serve as a scoring plugin to evaluate the clusters, given that it does not impact the results of the scoring phase?

What do you think about this question?:
I did a local test by propagating two workloads to the member clusters, and using the metrics collected during the scheduling process to find out how long each step took.
If keep the Score plugin ClusterAffinity

# in container karmada-scheduler
$  curl 127.0.0.1:8080/metrics | grep Score
karmada_scheduler_scheduling_algorithm_duration_seconds_sum{schedule_step="Score"} 0.00019877799999999999
karmada_scheduler_framework_extension_point_duration_seconds_sum{extension_point="Score",result="Success"} 5.5774e-05

without Score plugin ClusterAffinity

# in container karmada-scheduler
$  curl 127.0.0.1:8080/metrics | grep Score
karmada_scheduler_scheduling_algorithm_duration_seconds_sum{schedule_step="Score"} 0.00010575999999999999
karmada_scheduler_framework_extension_point_duration_seconds_sum{extension_point="Score",result="Success"} 1.3979999999999998e-05

While the time consumption impact of a single instance is minor, it can also save some time when there are a larger number of resources.

Environment:

  • Karmada version:
  • Kubernetes version:
  • Others:
@zhzhuang-zju zhzhuang-zju added the kind/question Indicates an issue that is a support question. label Jan 7, 2025
@LavredisG
Copy link
Contributor

While it may not be needed, it's at least useful as a Score plugin example, since there is only Filter example in the docs.

@zhzhuang-zju
Copy link
Contributor Author

since there is only Filter example in the docs.

What docs?

@LavredisG
Copy link
Contributor

since there is only Filter example in the docs.

What docs?

On the "Customise the Scheduler" page of the docs 😅

@zhzhuang-zju
Copy link
Contributor Author

it's at least useful as a Score plugin example, since there is only Filter example in the docs.

If it's only intended as a Score plugin example, plugin ClusterLocality could also handle this task.

@LavredisG
Copy link
Contributor

While that's true, there is the extra NormalizeScore() function on the Affinity which could be useful for a beginner trying to understand how it works. Idk though, that's just my opinion.

@RainbowMango
Copy link
Member

Glad you bring this up, it's a good chance to revisit all these plugins, so I created #6088 to track the effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Indicates an issue that is a support question.
Projects
None yet
Development

No branches or pull requests

3 participants