[pve-devel] [PATCH qemu-server 02/10] add memory parser

DERUMIER, Alexandre Alexandre.DERUMIER at groupe-cyllene.com
Mon Jan 2 12:23:43 CET 2023


Le vendredi 16 décembre 2022 à 14:38 +0100, Fiona Ebner a écrit :
> From a modularity standpoint, it would be nice to move the format
> description, parsing+printing to PVE/QemuServer/Memory.pm, similar to
> how it is done in PVE/QemuServer/PCI.pm
> 
> Since $confdesc->{memory}->{default} is now gone, load_defaults()
> will
> not return a default for 'memory' anymore. And $conf->{memory} needs
> to
> be parsed everywhere. These two things will break getting static
> usage
> in HA manager, which uses load_defaults() and relies on $conf-
> >{memory}
> to be a single value right now. We can switch there to use
> get_current_memory() too of course, but it'd require a versioned
> Breaks+Depends.
> 
> Alternatively, we could add a function in qemu-server for calculating
> the static stats and call that from HA. Requires a versioned
> Breaks+Depends too, but then we'd be safe in the future and also
> catch
> such changes more easily. OTOH, it'd make the coupling go in the
> other
> direction: if HA manager wants to change what it uses for static
> consideration, then qemu-server would need to adapt. So not sure.

I was think about this,
When dynamic scheduler will be implemented, you'll need to use values
streamed from pvestatd.
So why can't we do the same for static values ?  (maxmem && maxcpus are
already send by pvestatd).

This should avoid the need to parse vm config,
and maybe avoid to use load_config ?
(from your initial commit,
https://git.proxmox.com/?p=pve-ha-manager.git;a=commit;h=561e7f4bfb235fcdca5b0bbb8422ce742a5da75f,
it seem to be slow)




More information about the pve-devel mailing list