controller-runtime icon indicating copy to clipboard operation
controller-runtime copied to clipboard

Improve doc over MaxConcurrentReconciles

Open camilamacedo86 opened this issue 3 years ago • 17 comments

Would be nice be very nice we are able to provide further information for MaxConcurrentReconciles here for we have a better go doc here.

People have been asking when/how using this option. We might add that It is not possible to have two or more reconcile loops that handle the same object at the same time and some other further explanations. See that people have also been providing further docs about the topic and would be nice to have something official. e.g: https://openkruise.io/en-us/blog/blog2.html

camilamacedo86 avatar Mar 06 '21 20:03 camilamacedo86

@camilamacedo86 Any process of issue,
i want to share my experience since it suffer me for several days: if you want to enhance the performance of your controller, you could set MaxConcurrentReconciles to a big number, but do not forget to increase the QPS and Burst who is for restClient. or you reconcile will block when they try to update resource at the end of reconciling.

vincent-pli avatar Mar 26 '21 01:03 vincent-pli

/assign

rashmigottipati avatar Mar 29 '21 18:03 rashmigottipati

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale

fejta-bot avatar Jun 27 '21 18:06 fejta-bot

/remove-lifecycle stale

MadhavJivrajani avatar Jun 27 '21 19:06 MadhavJivrajani

It is not possible to have two or more reconcile loops that handle the same object at the same time

Hey @camilamacedo86! Thanks for attaching that blog post, it was very helpful and informative. However from what I understand, it is possible to have two or more loops handling the same object due to the work queue implementation? And considering the dirty and processing structures, not sure if the same object can actually be handled by two separate loops at the same time. Please correct me if I've misunderstood something here. Thanks!

MadhavJivrajani avatar Jun 27 '21 19:06 MadhavJivrajani

The workqueue is specifically designed to protect against concurrently processing the same object. When an object is added to the workqueue, it first gets placed in the dirty set and gets enqueued only if the object is not in the processing set. When that object gets pulled from the queue, it is transitioned from the dirty set to the processing set. This prevents the object from being enqueued if it is added again. Once the object is finished processing, it is removed from processing and if it is in the dirty set, it will be added to the queue again. Relevant source code: https://github.com/kubernetes/client-go/blob/v0.22.0/util/workqueue/queue.go#L113-L182

This comment also implies that the same object can't be processed at the same time https://github.com/kubernetes-sigs/controller-runtime/blob/v0.9.6/pkg/internal/controller/controller.go#L213

kevinfrommelt avatar Aug 16 '21 21:08 kevinfrommelt

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Nov 14 '21 22:11 k8s-triage-robot

/remove-lifecycle stale

camilamacedo86 avatar Dec 13 '21 13:12 camilamacedo86

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Mar 13 '22 13:03 k8s-triage-robot

/remove-lifecycle stale

People have been asking when/how using this option. We might add that It is not possible to have two or more reconcile loops that handle the same object at the same time and some other further explanations. See that people have also been providing further docs about the topic and would be nice to have something official. e.g: https://openkruise.io/en-us/blog/blog2.html

Also the blog link we have changed to https://openkruise.io/blog/learning-concurrent-reconciling now :)

FillZpp avatar Mar 14 '22 03:03 FillZpp

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Jun 12 '22 03:06 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Jul 12 '22 04:07 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

k8s-triage-robot avatar Aug 11 '22 05:08 k8s-triage-robot

@k8s-triage-robot: Closing this issue.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Aug 11 '22 05:08 k8s-ci-robot

I think this would still be valuable. /reopen /remove-lifecycle rotten

schrej avatar Aug 11 '22 07:08 schrej

@schrej: Reopened this issue.

In response to this:

I think this would still be valuable. /reopen /remove-lifecycle rotten

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Aug 11 '22 07:08 k8s-ci-robot

/remove-lifecycle rotten

camilamacedo86 avatar Aug 11 '22 13:08 camilamacedo86