One more question about the calculations done: I know the dynamic CRS only migrates resources managed by the HA Manager. But how does it calculate the host resource usage? Does it only take the ha managed resources into account or the "general" host CPU/Memory usage which also contains non-ha VMs or other processes like Ceph?
I might have missed it, but can you explain the difference between static and dynamic load-balancing regarding the new rebalancing feature? I cant find it in the mailing-list or current docs?
I'll answer both questions in one, because they're quite related: The scheduling mode (basic, static-load, dynamic-load) specifies which measure is used to compare nodes and HA resources against each other:
- For the basic mode, it's simply how many running guests are on the nodes.
- For the static-load mode, it's how much CPU and memory the running guests have allocated statically (i.e., the quotas set in the guest configs with cores, sockets, memory, etc.).
- For the dynamic-load mode, it additionally accounts for the actual current CPU and memory usage of each running guest and the node itself.
This scheduling mode is used for the load balancer, as well as other HA-related scheduling points, such as initial placement rebalancing (while starting HA resources), HA resource recovery, maintenance mode, etc.
The automatic rebalancing system can only be used in conjunction with the static-load and dynamic-load mode. So with the static-load mode, the system will actively rebalance according to the quotas set in the config (which might also change while guests are running if CPU/memory hotplugging is enabled). While with the dynamic-load mode, the system actively rebalances according to the current actual usage.
The rebalancing migrations are chosen by picking from the pool of migratable HA resources with their possible targets and predicting which will lower the imbalance the most in the forseeable future. In dynamic-load mode, the node usages currently also include the CPU/memory usages for Ceph, ZFS, etc., to accomodate these usage requirements as well.