[pve-devel] batch migrate : add a optionnal flag to check available memory on target node ?
Wolfgang Bumiller
w.bumiller at proxmox.com
Tue Jan 16 13:59:39 CET 2018
On Mon, Jan 15, 2018 at 08:30:33AM +0100, Alexandre DERUMIER wrote:
> >>But I thought you want to implement those checks directly in the GUI?
>
> Well, yes, but I would like to launch the migrateall, after before each migrate task, do the check if target host have enough memory.
>
> I don't think you can estimate easily the target host memory usage before launching migration of all vms.
Since this involves functionality used in HA as well, I wonder if we
could find a way to share code there. HA currently doesn't look at
memory that way, but it could be extended to be able to do that.
However, I wouldn't go with memory usage but total available vs
how much was assigned to the VMs already on the target vs the RAM
assigned to the current VM.
Otherwise you may end up migrating a VM to a host which starts out with
lots of free RAM while at the same time some other VM which was already
on the target host but hasn't done anything in a long while suddenly
wakes and pulls gigabytes of data out of swap into active RAM. Or just
now starts using up RAM for the first time.
It also seems simpler as we can literally just sum up the memory
settings of VMs.
That way you could also figure out the distribution beforehand. Iow.
instead of saying "migrate as many VMs as possible from host A to host
B and error out when it's "full"" you can say "distribute VMs of host A
to the other hosts" (optionally masking out hosts).
The mechanics are similar to what HA does when a host dies, the only
difference is that VMs get live-migrated, so a common code base for the
distribution mechanics would be nice.
I think Thomas might know how feasible such an approach would be?
More information about the pve-devel
mailing list