-
Notifications
You must be signed in to change notification settings - Fork 759
Open
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.
Description
Is your feature request related to a problem? Please describe.
Descheduler use too many memory when runs in dry-run mode. In dry-run mode, we perform a full copy of the in-memory data, which results in its memory usage being twice that of the scheduler within the cluster. This is very resource-intensive in large-scale scenarios.
if d.rs.DryRun {
klog.V(3).Infof("Building a cached client from the cluster for the dry run")
// Create a new cache so we start from scratch without any leftovers
fakeClient := fakeclientset.NewSimpleClientset()
// simulate a pod eviction by deleting a pod
fakeClient.PrependReactor("create", "pods", d.podEvictionReactionFnc(fakeClient))
fakeSharedInformerFactory := informers.NewSharedInformerFactory(fakeClient, 0)
err := d.ir.CopyTo(fakeClient, fakeSharedInformerFactory)
if err != nil {
return err
}
Describe the solution you'd like
Only retain the necessary fields in the cache, removing unnecessary information to optimize memory usage.
Metadata
Metadata
Assignees
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.