Jup.I’ll ask you an additional question a bit OT, just to avoid posting something maybe already asked by others. I’ve seen from the guide that you can specify the maximum and minimum amount of ram to assign to the VMs, as in the attached screenshot. From the GUI I can max ram, min ram and the balloon flag. I was looking about the configuration file syntax page and I’ve found two settings, one of which is called balloon but it’s not a flag, it is an amount of memory. Does it correspond to the minimum ram of the GUI or how do the three GUI parameters translate to the config file syntax?
You can't really overprovision RAM...using ballooning or not. How ballooning will work is that it slowly steals RAM from the VM no matter if that VM actually needs that RAM or not. So lets say you set the RAM to 2-4 GB and that VM is using 3GB for processes, 0.5GB for cache and 0.5GB free. Ballooning will only kick in when your hosts RAM exceeds 80%. Then it will steal RAM from VMs until either the hosts RAM drop below 80% again or until all VMs reached the minimum RAM assigned. So lets say the hosts RAM will not drop below 80% first. Then ballooning will slowly reduce the VMs RAM from 4 down to 2GB. When shrinking down from 4 to 3.5GB RAM this is no problem as the VM got 0.5GB free RAM. Next from 3.5 to 3GB RAM it is still no problem as the VM can drop cached data. But from 3 to 2GB it will run out of memory and will have to kill 1GB of processes (most likely killing your kubernetes containers) so the VMs OS won't crash.II’m looking at the config file params since I’ll configure the VMs with terraform and if possible I’d like to set the minimum amount of ram to avoid allocating a fixed size of ram to all my kubernetes cluster VMs that will maybe use far less than the amount allocated (I’m thinking about minimum 1 and max 2 or 4GB of ram).
So in my opinion it is safest to just skip ballooning, buy enough RAM so that guests don't have to fight for ressouces and don't assign your guests more RAM then they actually need to minimize wasted RAM by excessive caching.
Last edited: