When a user creates multiple VMs in the FusionCube system, the VMs are centrally running on one or a few Computing Node Agent (CNA) nodes
Manually migrate the VMs to desired CNA nodes after VM creation.
Set CPU reservation for VMs during VM creation.
1. CNA node selection policy:
When creating a VM, the system selects a CNA node for the VM randomly or based on the load balancing policy. By default, the system selects CNA nodes based on the load balancing policy.
The principle for implementing the load balancing policy is to select an available CNA node with minimal CPU reservation. The CPU reservation is determined by the CPU QoS settings configured during VM creation. CPU reservation ensures the computing capability of a VM. After the CPU resources are reserved, the VMs can be started on a server even if the server is heavy-loaded, because the VM can use the reserved resources on the server. If CPU resources are reserved for a VM, other VMs cannot use these CPU resources.
CPU reservation rate = Reserved CPU capacity/(Reserved CPU capacity + Available CPU capacity) x 100%
Reserved CPU capacity: specifies the total number of CPUs reserved for the running VMs on a physical server.
Available CPU capacity: specifies the total number of CPUs that can be allocated to VMs running on the physical server.
2. CPU QoS settings during VM creation
When creating a VM, a user can determine whether to reserve CPU resources for the VM. When no CPU resource is reserved for the VM, VMs created on the CNA node will not affect the CPU reservation rate of the node. Therefore, if a user creates multiple VMs with no CPU resource reserved, the CPU reservation rates of the CNA node and the cluster are not affected.
CPU resources must be reserved for all management VMs. If the system has VDI VMs, the reservation rates of all CNA nodes are different.
Based on the preceding principles, we use the following system configuration as an example to illustrate the problem:
The system has three nodes, CNA01, CNA02, and CNA03, and the CPU reservation rates of the nodes are as follows:
When multiple VMs with no CPU reservation are created, the CPU resources available to the CNA nodes do not change. Therefore, when a user creates VMs again, the system preferentially selects CNA01 to run the VMs until memory resources on CNA01 are insufficient. The CNA node selection sequence is CNA01, CNA02, and CNA 03. As a result, the created VMs cannot be evenly distributed on the CNA nodes in the system.