What happens when RAM + Swap runs out?

harmonyp

Member
Nov 26, 2020
196
4
23
47
So I have noticed that when swap starts (currently set to swappiness 0) the swap that is taken actually reduces the current RSS memory a virtual machine has. For example if I allocated a virtual machine 10GB of RAM and it peaked at 10GB of RAM the reserved memory for that running machine would remain at 100% until either swap activates or I turn the machine off/on.

What happens when both RAM and swap reaches 100%? Does the RSS memory get taken away from a virtual machine or does some of them virtual machines just get killed from being OOM?

Code:
/proc/sys/vm/overcommit_memory
is set to 1
 
If you run out of RAM the OOM kicks in and will kill VMs. Overcommiting memory isn't really working, even if you use ballooning.
 
Last edited: