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

provide option to set MaxConcurrentReconciles #203

Merged
merged 2 commits into from
Aug 19, 2022

Conversation

Madhu-1
Copy link
Member

@Madhu-1 Madhu-1 commented Aug 16, 2022

Current MaxConcurrentReconciles is 1, which is the default, meaning only one request will be processed at a time. This is not useful when we have 100/1000 CR to reconcile, which can affect the performance. This PR provides a way to set the MaxConcurrentReconciles to the user's desired value so that the user can tune the configuration based on the requirement.

Note:- Currently we have performance issue in DR VolRep because of this one, the failover and failback time are slightly affected because of the default value. with this, things will be better and same change need to be done when we add VolRep Reconciler also.

Signed-off-by: Madhu Rajanna [email protected]

Current MaxConcurrentReconciles is 1, which
is the default, meaning only one request
will be processed at a time. This is not
useful when we have 100/1000 CR to reconcile,
which can affect the performance. This PR
provides a way to set the
MaxConcurrentReconciles to the user's desired
value so that the user can tune the
configuration based on the requirement.

Note:- Currently we have performance issue
in DR VolRep because of this one, the
failover and failback time are slightly
affected because of the default value.
with this, things will be better and
same change need to be done when we add
VolRep Reconciler also.

Signed-off-by: Madhu Rajanna <[email protected]>
@Madhu-1
Copy link
Member Author

Madhu-1 commented Aug 17, 2022

@nixpanic added doc for the command line arguments PTAL

@Madhu-1 Madhu-1 force-pushed the option-max-reconcile branch 2 times, most recently from a14f248 to 7e1c664 Compare August 17, 2022 05:42
document available command line agruments
avaiable for configuration when  starting
the controller.

Signed-off-by: Madhu Rajanna <[email protected]>
@Madhu-1 Madhu-1 force-pushed the option-max-reconcile branch from 7e1c664 to 9be5a13 Compare August 17, 2022 05:42
Copy link
Member

@Rakshith-R Rakshith-R left a comment

Choose a reason for hiding this comment

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

The changes seem fine to me,
Ack, I'll make similar changes to vol-rep controller which will have pr up within next week,

just left a question regarding the default value.

flag.StringVar(&metricsAddr, "metrics-bind-address", ":8080", "The address the metric endpoint binds to.")
flag.StringVar(&probeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.")
flag.BoolVar(&enableLeaderElection, "leader-elect", false,
"Enable leader election for controller manager. "+
"Enabling this will ensure there is only one active controller manager.")
flag.DurationVar(&reclaimSpaceTimeout, "reclaim-space-timeout", defaultTimeout, "Timeout for reclaimspace operation")
flag.IntVar(&maxConcurrentReconciles, "max-concurrent-reconciles", 100, "Maximum number of concurrent reconciles")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
flag.IntVar(&maxConcurrentReconciles, "max-concurrent-reconciles", 100, "Maximum number of concurrent reconciles")
flag.IntVar(&maxConcurrentReconciles, "max-concurrent-reconciles", 100, "Maximum number of concurrent reconciles")

Do we really need 100 as default value ?
most controllers have just a single loop.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, having 100 in default doesn't cause any harm, and also, it doesn't make sense to have different configurations per controller. This helps to have concurrent reconciles, which fasten the process when we have more requests.

@mergify mergify bot merged commit 8146cb0 into csi-addons:main Aug 19, 2022
Madhu-1 added a commit to Madhu-1/kubernetes-csi-addons that referenced this pull request Aug 23, 2022
Added option to set MaxConcurrentReconciles
for VolumeReplication which was pending and for
all other controllers this is set in csi-addons#203

Signed-off-by: Madhu Rajanna <[email protected]>
Madhu-1 added a commit to Madhu-1/kubernetes-csi-addons that referenced this pull request Aug 24, 2022
Added option to set MaxConcurrentReconciles
for VolumeReplication which was pending and for
all other controllers this is set in csi-addons#203

Signed-off-by: Madhu Rajanna <[email protected]>
Madhu-1 added a commit to Madhu-1/kubernetes-csi-addons that referenced this pull request Aug 24, 2022
Added option to set MaxConcurrentReconciles
for VolumeReplication which was pending and for
all other controllers this is set in csi-addons#203

Signed-off-by: Madhu Rajanna <[email protected]>
Madhu-1 added a commit to Madhu-1/kubernetes-csi-addons that referenced this pull request Aug 24, 2022
Added option to set MaxConcurrentReconciles
for VolumeReplication which was pending and for
all other controllers this is set in csi-addons#203

Signed-off-by: Madhu Rajanna <[email protected]>
mergify bot pushed a commit that referenced this pull request Aug 24, 2022
Added option to set MaxConcurrentReconciles
for VolumeReplication which was pending and for
all other controllers this is set in #203

Signed-off-by: Madhu Rajanna <[email protected]>
openshift-cherrypick-robot referenced this pull request in openshift-cherrypick-robot/kubernetes-csi-addons Aug 30, 2022
Added option to set MaxConcurrentReconciles
for VolumeReplication which was pending and for
all other controllers this is set in red-hat-storage#203

Signed-off-by: Madhu Rajanna <[email protected]>
Nikhil-Ladha pushed a commit to Nikhil-Ladha/kubernetes-csi-addons that referenced this pull request Sep 18, 2024
Syncing latest changes from upstream main for kubernetes-csi-addons
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants