[pve-devel] cluster resource scheduler question

Fiona Ebner f.ebner at proxmox.com
Wed Nov 23 10:09:10 CET 2022


Am 22.11.22 um 17:43 schrieb DERUMIER, Alexandre:
> Hi,
> 
> I was looking at the proxmox 7.3 video
> https://www.proxmox.com/en/training/video-tutorials/item/what-s-new-in-proxmox-ve-7-3
> 
> showing the new cluster resource scheduling with static-ressource.
> 
> I'm not sure to understand, but the video seem to say that vm is
> migrated to the least "loaded" node.

yes, the video is misleading there. The static node CPU and memory
values and the configured CPU and memory for guests will be used to
approximate the real usage.

> 
> 
> But looking at static-info of the node,  cpu && memory are the physical
> core number && full memory size
> 
> (in pvestatd,
> 
>     broadcast_static_node_info($maxcpu, $meminfo->{memtotal});
>      my sub broadcast_static_node_info {
>       ...
>         my $info = {
>             cpus => $cpus,
>             memory => $memory,
>      }
> 
> 
> I'm not sure about the logic, but if we only look at number of total
> cpus && memory without current usage, the biggest node will always be
> choose ?  or does I miss something ?

We add the static usage of all active guests (i.e. configured CPU and
memory) to the node's usage. Then, for choosing a node for a guest, we
check how the highest/average CPU/memory usage (in percent) in the
cluster would look like after starting the guest on each node and score
according to those alternatives. In effect, the alternative leading to
the least load (in percent) across the cluster, according to the model
with static guest and node information will be chosen.





More information about the pve-devel mailing list