Open
Description
What would you like to be added:
I would like to start a conversation to understand if we may improve GetContainerOOMScoreAdjust
to:
- Calculate the
oom_score_adj
in a CPU-agnosticy way - Take in account Pod Priority too
Why is this needed:
Currently, the kubelet
sets a oom_score_adj
value for each container based on the Pod QoS:
Guaranteed
:-998
BestEffort
:1000
Burstable
:min(max(2, 1000 - (1000 * memoryRequestBytes) / machineMemoryCapacityBytes), 999)
The QoS class depends both on the CPU and memory requests/limits, which means the oom_score_adj
also depends on the CPU resources and not just on the memory resources, while OOM score is a purely memory management thing. Moreover, oom_score_adj
is also Pod priority agnostic (except that critical pods always get -998
, regardless their QoS class) which can cause higher priority pods to get evicted before lower priority pods under node memory pressure.
Metadata
Metadata
Assignees
Labels
Categorizes issue or PR as related to a new feature.Denotes an issue or PR has remained open with no activity and has become stale.Indicates an issue or PR lacks a `triage/foo` label and requires one.Higher priority than priority/awaiting-more-evidence.Categorizes an issue or PR as relevant to SIG Node.