Remove unnecessary log message causing significant overhead on preemption evaluation

This commit is contained in:
Abdullah Gharaibeh 2020-06-05 16:03:45 -04:00
parent b8b4186a14
commit 8bf30530e8

View File

@ -273,6 +273,13 @@ func (g *genericScheduler) Preempt(ctx context.Context, prof *profile.Profile, s
// In this case, we should clean-up any existing nominated node name of the pod. // In this case, we should clean-up any existing nominated node name of the pod.
return "", nil, []*v1.Pod{pod}, nil return "", nil, []*v1.Pod{pod}, nil
} }
if klog.V(5).Enabled() {
var sample []string
for i := 0; i < 10 && i < len(potentialNodes); i++ {
sample = append(sample, potentialNodes[i].Node().Name)
}
klog.Infof("%v potential nodes for preemption, first %v are: %v", len(potentialNodes), len(sample), sample)
}
var pdbs []*policy.PodDisruptionBudget var pdbs []*policy.PodDisruptionBudget
if g.pdbLister != nil { if g.pdbLister != nil {
pdbs, err = g.pdbLister.List(labels.Everything()) pdbs, err = g.pdbLister.List(labels.Everything())
@ -1042,7 +1049,6 @@ func nodesWherePreemptionMightHelp(nodes []*framework.NodeInfo, fitErr *FitError
if fitErr.FilteredNodesStatuses[name].Code() == framework.UnschedulableAndUnresolvable { if fitErr.FilteredNodesStatuses[name].Code() == framework.UnschedulableAndUnresolvable {
continue continue
} }
klog.V(3).Infof("Node %v is a potential node for preemption.", name)
potentialNodes = append(potentialNodes, node) potentialNodes = append(potentialNodes, node)
} }
return potentialNodes return potentialNodes