For example, I read that while VirtualBox never overcommits memory, KVM has options to allow memory overcommit.
So I wonder if popular cloud providers (GCE, AWS, Azure ...) ever overcommit the VM instance memory (and so guest memory has chance to be swapped out on the host), or do they mlock it? Any info on that?
Edit: I meant KVM as an example where the capability is present. More generally I mean if memory overcommit is possible, by whatever means.
Also, in case overcommit is possible, two follow-up questions, for specific providers:
- What is the specific behavior on OOM event? For example instance crash or relocation? Or can guest memory be swapped out by host?
- How to prevent memory overcommit as much as possible? For example, using maxed out instances to own full node, etc?