Hello everyone,
Does some methods exist to configure scheduler to overcommit host capacity. Please look at the example below:
There is two nodes ONE installation.
Each node loaded 75% CPU
I need to poweroff (restart) one node.
To do this correctly I configured host hook whitch migrate all VMs from deactivated host. And all I need to restart/poweroff host - disable it and poweroff after all VMs migrated.
It’s realy great scenario but if host(s) where VMs migrate to is full (no free resources) VMs on disabled host just marked for rescheduling and scheduler do nothing. It will be great if scheduler can overcommit hosts resources, then I will spread VM through hosts after second host came online and be enabled.
Then reserved values of CPU and RAM should be negative and equal CPU_HOST_AMOUNT/(N-1) and RAM_HOST_AMOUNT/(N-1).
For example, I have 3 hosts with 8 GB of RAM and 2 CPU. ONE will interpret the CPU like 200% (one CPU = 100%). Now I should set RESERVERD_CPU = -1200/(3-1) = -100 (%) and RESERVED_RAM = -18/(3-1) = -4 (Gb) on each ONE host. And if one of the hosts will be disabled, all VMs will be spread through all enabled hosts.
Of course you should remember about allocated resources for VM (i.e. if VM has allocated resources like CPU 150% and RAM 5 Gb, this VM won’t be migrated from disabled host).
P.S. Enabled hosts stay overloaded even when disabled host goes back to enabled and you should provide methods to move VMs back to enabled host.