Hello,
i would be interested in how your swap used. In LXC it is clear. If you have Swap on the host and set swap on container then lxc swaps to the host. If no swap is given to the host, the container can't swap.
But what is with KVM? There are three possibilities.
1. Swap on Host and Swap on VM. So when the VM goes out of Memory it's swapping inside the VM, during out of Memory of other VMs and the same time the host is out of memory, swapping continues on the host
2. Swap on Host but not on KVM. If the VM goes out of Memory it will be killed by oom killer. So most more memory on VM is necessary, an overbook of the host could be necessary. So only the host is swapping.
3. The host has now swap, KVM has swap. So the host can't swap. Swapping on out of Memory only in the VM. I have this method on all us ZFS-Machines.
So what of these three steps are used by others? What do you think is the best solution for you, and why?
i would be interested in how your swap used. In LXC it is clear. If you have Swap on the host and set swap on container then lxc swaps to the host. If no swap is given to the host, the container can't swap.
But what is with KVM? There are three possibilities.
1. Swap on Host and Swap on VM. So when the VM goes out of Memory it's swapping inside the VM, during out of Memory of other VMs and the same time the host is out of memory, swapping continues on the host
2. Swap on Host but not on KVM. If the VM goes out of Memory it will be killed by oom killer. So most more memory on VM is necessary, an overbook of the host could be necessary. So only the host is swapping.
3. The host has now swap, KVM has swap. So the host can't swap. Swapping on out of Memory only in the VM. I have this method on all us ZFS-Machines.
So what of these three steps are used by others? What do you think is the best solution for you, and why?