Skip to content

Enhance the scheduling performance of karmada-schduler  #5202

@LivingCcj

Description

@LivingCcj

When karmada-scheduler schedules the rb object for the first time, it would respectively calculate the number of available replicas in the subcluster in the Select phase and the AssignReplica phase. The picture below records metric of karmada_scheduler_scheduling_algorithm_duration_seconds_bucket.
image

there could be optimized to once calculate, The result calculated in the Select phase could be directly repeated in the AssignReplica phase. In order to improve the qps of the karmada-scheduler
[](

clusters, err := g.selectClusters(clustersScore, spec.Placement, spec)
if err != nil {
return result, fmt.Errorf("failed to select clusters: %w", err)
}
klog.V(4).Infof("Selected clusters: %v", clusters)
clustersWithReplicas, err := g.assignReplicas(clusters, spec, status)
if err != nil {
return result, fmt.Errorf("failed to assign replicas: %w", err)
}
klog.V(4).Infof("Assigned Replicas: %v", clustersWithReplicas)
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    Status

    No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions