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

NonSlidingUntil for deployment #692

Merged
merged 1 commit into from
Jan 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/descheduler/descheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func RunDeschedulerStrategies(ctx context.Context, rs *options.DeschedulerServer
ignorePvcPods = *deschedulerPolicy.IgnorePVCPods
}

wait.Until(func() {
wait.NonSlidingUntil(func() {
Copy link
Contributor

@ingvagabund ingvagabund Jan 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intent of the jitter factor is to make sure all clients sending a request to the apiserver do not sent the request at the same time or too close to each other in time. Given the running time of all the strategies is unknown in advance, using the sliding version helps to increase the randomness.

Trying to make the run times on more of an interval in order to make executions times more predictable.

@jklaw90 I wonder what's the motivation for making the execution time more predictable and if there are measurements which might tell us if using the non-sliding version has any benefits for the overall resource utilization (e.g. API requests) of the cluster.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder what's the motivation for making the execution time more predictable

I think the use case could be for example: you expect descheduler to run every 30 minutes, but you have a giant (hypothetical) cluster where each run takes 20 minutes. If the timer doesn't start until the first run completes, that means your 2 runs will actually appear 50 minutes apart

nodes, err := nodeutil.ReadyNodes(ctx, rs.Client, nodeInformer, nodeSelector)
if err != nil {
klog.V(1).InfoS("Unable to get ready nodes", "err", err)
Expand Down