Comment by rfgplk
21 hours ago
Configure overcommit_memory, overcommit_ratio, admin|user_reserve_kbytes, min_free_kbytes, oom_kill_allocating_task, oom_score_adj; if you're on a dev box make it such that even if you approach memory limits to just instantly start killing processes rather than swapping. It's not a solution for servers, but for dev environments it's basically perfect.
On servers with k8s the default is preempt based on prio, followed by oom kill and ‚newly’ memory qos:
https://kubernetes.io/docs/concepts/scheduling-eviction/pod-...
https://kubernetes.io/docs/concepts/configuration/manage-res...
https://kubernetes.io/docs/concepts/workloads/pods/pod-qos/#... (New feature)
So normally if you overcommit it might be undefined behavior if you not have enough memory. However if everything is fine pods can preempt based on prio to new nodes.
With the right settings only the faulty app might fail. Without it it can be a real pain to find the rouges