help wantedkind/cleanupsig/nodetriage/accepted
仓库指标
- 星标
- (122,268 个星标)
- PR 合并指标
- (平均合并 28天 17小时) (30 天内合并 343 个 PR)
描述
Constructing a new schedulerframework.NodeInfo is a fairly heavy operation: iterate through every resource in every container 3 times (desired, actual & allocated) in every pod and add them all up. The Kubelet does this on every admission request, but also every time it retries a pending resize.
Fortunately the NodeInfo is designed to be cached, which is what the scheduler does. We should consider caching it in the Kubelet too. To keep the cache up-to-date, it will need to be updated:
- when a pod is added
- when a pod's allocation changes (resized)
- when a pod becomes inactive (see
kubelet.filterOutInactivePods) - when a pods status resources change (resize is actuated)
/sig node /kind cleanup
/cc @natasha41575