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
Currently, the implementation of the NodeGroupForNode function in the AliCloudProvider has two caches within autoScalingGroups: instanceToAsg and instancesNotInManagedAsg.
instanceToAsg records instances in Managed ASGs. instancesNotInManagedAsg records instances not in Managed ASGs.
When an unknown instance is encountered, a regenerateCache is triggered. If it’s determined to be an instance not in a Managed ASG, it’s saved to instancesNotInManagedAsg, avoiding the need to call regenerateCache on subsequent occurrences.
This functionality is correct. However, if a large number of nodes are created via instances not in Managed ASGs, every call to NodeGroupForNode->GetAsgForInstance->FindForInstance will trigger a regenerateCache. If there are a significant number of instances in Managed ASGs at that time, this could lead to frequent calls, each with a considerable time overhead for regenerateCache.
For example, if there are 1000 machines in Managed ASGs and suddenly 2000 instances not in Managed ASGs are added:
UpdateNodes->updateReadinessStats->NodeGroupForNode
This call is executed with every runOnce, and each node invokes NodeGroupForNode once. The 2000 newly added instances not in Managed ASGs will trigger regenerateCache, but it will only count instances in Managed ASGs. However, it will still execute 2000 times.
Assuming each regenerateCache call takes 10 seconds, this function will take:
2000 instances * 10 seconds/instance = 20000 seconds.
This significantly extends the duration of a single runOnce operation. During this period, if new pending pods appear, the Cluster Autoscaler might not function as expected, posing a severe risk.
The text was updated successfully, but these errors were encountered:
guopeng0
changed the title
Large sudden increase in instances not managed by ASG can impact CA performance
CA(AliCloud):Large sudden increase in instances not managed by ASG can impact CA performance
Apr 24, 2024
We changed this implementation a year ago. We prefer the implementation of AWS. Currently, our startup time is very fast, reduced from 40 minutes to 2 minutes.
Currently, the implementation of the NodeGroupForNode function in the AliCloudProvider has two caches within autoScalingGroups:
instanceToAsg
andinstancesNotInManagedAsg
.instanceToAsg
records instances in Managed ASGs.instancesNotInManagedAsg
records instances not in Managed ASGs.When an unknown instance is encountered, a
regenerateCache
is triggered. If it’s determined to be an instance not in a Managed ASG, it’s saved toinstancesNotInManagedAsg
, avoiding the need to callregenerateCache
on subsequent occurrences.This functionality is correct. However, if a large number of nodes are created via instances not in Managed ASGs, every call to
NodeGroupForNode->GetAsgForInstance->FindForInstance
will trigger aregenerateCache
. If there are a significant number of instances in Managed ASGs at that time, this could lead to frequent calls, each with a considerable time overhead forregenerateCache
.For example, if there are 1000 machines in Managed ASGs and suddenly 2000 instances not in Managed ASGs are added:
UpdateNodes->updateReadinessStats->NodeGroupForNode
This call is executed with every
runOnce
, and each node invokesNodeGroupForNode
once. The 2000 newly added instances not in Managed ASGs will triggerregenerateCache
, but it will only count instances in Managed ASGs. However, it will still execute 2000 times.Assuming each
regenerateCache
call takes 10 seconds, this function will take:2000 instances * 10 seconds/instance = 20000 seconds.
This significantly extends the duration of a single
runOnce
operation. During this period, if new pending pods appear, the Cluster Autoscaler might not function as expected, posing a severe risk.The text was updated successfully, but these errors were encountered: