One major use case for operators is to be able to reserve a certain amount of memory in the hypervisor.
This is extremely useful when you have to recover from failures.
Imagine that you run all your virtual machines on shared storage (Ceph RBD or Sheepdog or NFS).
The major benefit from running your instances on shared storage is that it will ease live-migration and evacuation.
However, if a compute node dies you want to make sure that you have enough capacity on the other compute nodes to relaunch your instances.
Given that the
nova host-evacuate call goes through the scheduler again you should get an even distribution.
But how to make sure that you have enough memory on the other hypervisors? Unfortunately there is no real memory restriction mechanism. In this article I will explain how we can mimic such behavior.