[pve-devel] batch migrate : add a optionnal flag to check available memory on target node ?

Gandalf Corvotempesta gandalf.corvotempesta at gmail.com
Sat Jan 13 08:51:14 CET 2018


Il 12 gen 2018 4:40 PM, "Alexandre DERUMIER" <aderumier at odiso.com> ha
scritto:

I would like to add an option to qm migrate, like "targethost_freememory_
percent",

and before doing the live migration, do

die "not enough free memory on target host" if "(targethost_current_memory
+ vm_current_memory) / targethost)*100) > targethost_freememory_percent"


Please don't compare the percentage but compare the real amount of memory
It's also faster as you don't have to make any percentage

On hosts with huge memory, even the 1% could mean some GBs of memory

In example, if you have to migrate a 512MB VM to a node with 256GB total
RAM with 254GB used, you won't be able to do the migration by checking the
percentage as 254GB used is more than 99% but you still have free ram to
move the small VM (512 < 2.56GB available)

This is getting worse as target node memory increase

If you compare the real amount of memory is faster, safer and more accurate
and there is no need to compare hugly decimals percentage.
I really hate to see 99.26% as it doesn't provide any useful information
(how much is .26?)

My 2 cents



More information about the pve-devel mailing list