You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reduce resource utilization during startup and resyncs #1797
Currently with a large number of CRs the gateway controller's resource utilization is very spiky at startup and at re-syncs when resources are periodically re-reconciled. This requires high resource limits to be configured in order to handle these short infrequent bursts.
Ideally the resource usage would be lower and more consistent during large re-sync events.
This could be accomplished by compacting many reconcile calls into a single run of the main reconciliation loop rather then wasting resources re-building the state of the world for each CR. external-dns does something similar here.
The minimum interval the reconciliation loop runs could be configurable with a sensible default (something like 1-5 seconds). The behavior should allow the controller to react immediately to a single event but then wait the the configured interval before running again.
Here is the behavior observed at startup where cpu and memory usage is high while the controller tries to reconcile ~600 TLSRoutes.
trying to limit this specific issue to one problem, @dboslee is this the thundering herd problem when many resources are applied at once to the k8s API server, triggering EG's Reconcile to run multiple times (since we have one Reconcile for all resources) ?
@arkodg Yes sounds like the same issue. And to clarify this happens under normal operations (startup and re-syncs) when a large number of resources already exist not just when resources are created/updated.
the normal operations case, feels like it should have been solved with #1455 & #1723 which were part of v0.5 and this one #1384 should have helped reduce mem
Activity
arkodg commentedon Aug 17, 2023
@dboslee can you also share which version you are running, we made some changes in the last few weeks, that may improve things
arkodg commentedon Aug 17, 2023
the
MinEventSyncIntervaldesign pattern of batching events into one, is a great idea, def worth implementing !dboslee commentedon Aug 17, 2023
I am pretty far back on v0.4.0. I did hack together a quick proof of concept and saw a huge improvement main...dboslee:gateway:david/demo/compact-updates.
arkodg commentedon Aug 17, 2023
trying to limit this specific issue to one problem, @dboslee is this the thundering herd problem when many resources are applied at once to the k8s API server, triggering EG's Reconcile to run multiple times (since we have one
Reconcilefor all resources) ?dboslee commentedon Aug 17, 2023
@arkodg Yes sounds like the same issue. And to clarify this happens under normal operations (startup and re-syncs) when a large number of resources already exist not just when resources are created/updated.
arkodg commentedon Aug 17, 2023
the normal operations case, feels like it should have been solved with #1455 & #1723 which were part of v0.5 and this one #1384 should have helped reduce mem