Virtual machine scheduling method and device, equipment, storage medium and product
By comprehensively considering the needs and available and allocable resources across multiple resource dimensions during virtual machine migration, the target physical nodes for migration are selected, solving the resource bottleneck problem in existing technologies and achieving efficient resource allocation and adaptation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING UDSAFE TECH CO LTD
- Filing Date
- 2026-01-27
- Publication Date
- 2026-05-08
AI Technical Summary
In existing technologies, virtual machine migration relies on a single resource metric, which makes it difficult to adapt resource allocation requirements in complex scenarios due to resource bottlenecks.
By determining the resource requirements of the virtual machines to be migrated across multiple resource dimensions, multidimensional allocatable and available resource information in the cluster is obtained. Combined with preset resource priorities, a list of candidate nodes that meet the resource requirements is selected, and a comprehensive decision is made to migrate the physical nodes.
It effectively avoids new resource bottlenecks after virtual machine migration, efficiently adapts to resource allocation needs in complex scenarios, and ensures that the target migration node matches the actual resource usage of the virtual machine.
Smart Images

Figure CN121996355A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of resource scheduling technology, and in particular to virtual machine scheduling methods, apparatus, devices, storage media and products. Background Technology
[0002] With the development of computer technology and virtualization technology, the application of hyperconverged platforms and distributed architectures is becoming increasingly widespread. As the core carrier of virtualization technology, the deployment and scheduling of virtual machines have become a key aspect of resource scheduling. How to formulate reasonable virtual machine scheduling strategies to achieve efficient utilization of physical resources in hyperconverged platforms and distributed architectures has become a focus of current research and practice.
[0003] In existing technologies, when determining the target physical node for virtual machine migration, most methods rely solely on a single resource metric (such as CPU utilization) and employ fixed scheduling strategies to select the target migration node. For example, using CPU resource availability as a reference metric, the physical node with the most abundant CPU resources in the cluster is selected as the target migration node for the virtual machine.
[0004] However, the above solutions rely on a single resource to determine the target migration node, which often leads to new resource bottlenecks after virtual machine migration and makes it difficult to adapt to the resource allocation needs in complex scenarios. Summary of the Invention
[0005] This invention provides a virtual machine scheduling method, apparatus, device, storage medium, and product to quickly and efficiently select the target migration physical node for virtual machines.
[0006] According to one aspect of the present invention, a virtual machine scheduling method is provided, comprising:
[0007] Determine the resource requirements of the virtual machines to be migrated across multiple resource dimensions;
[0008] Obtain multidimensional allocatable resource information for each physical node in the cluster, and determine a first candidate node list based on preset resource priorities and the multidimensional allocatable resource information for each physical node; wherein, the cluster is associated with the virtual machine to be migrated, and the multidimensional allocatable resource information includes the remaining allocatable amount of the physical node in the resource dimension corresponding to the resource demand;
[0009] Obtain multi-dimensional available resource information of each physical node in the cluster, and determine a second candidate node list based on the preset resource priority and the multi-dimensional available resource information of each physical node; wherein, the multi-dimensional available resource information includes the remaining available amount of the physical node in the resource dimension corresponding to the resource demand;
[0010] Based on the first candidate node list and the second candidate node list, the target migration physical node corresponding to the virtual machine to be migrated is determined.
[0011] According to another aspect of the present invention, a virtual machine scheduling apparatus is provided, comprising:
[0012] The resource requirement determination module is used to determine the resource requirements of the virtual machine to be migrated across multiple resource dimensions.
[0013] The first candidate node list determination module is used to obtain multi-dimensional allocable resource information of each physical node in the cluster, and determine the first candidate node list according to the preset resource priority and the multi-dimensional allocable resource information of each physical node; wherein, the cluster is associated with the virtual machine to be migrated, and the multi-dimensional allocable resource information includes the remaining allocable amount of the physical node in the resource dimension corresponding to the resource demand;
[0014] The second candidate node list determination module is used to obtain multi-dimensional available resource information of each physical node in the cluster, and determine the second candidate node list according to the preset resource priority and the multi-dimensional available resource information of each physical node; wherein, the multi-dimensional available resource information includes the remaining available amount of the physical node in the resource dimension corresponding to the resource demand;
[0015] The target migration physical node determination module is used to determine the target migration physical node corresponding to the virtual machine to be migrated based on the first candidate node list and the second candidate node list.
[0016] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0017] At least one processor; and
[0018] A memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the virtual machine scheduling method according to any embodiment of the present invention.
[0020] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the virtual machine scheduling method according to any embodiment of the present invention.
[0021] According to another aspect of the present invention, a computer program product is provided, the computer program product comprising a computer program that, when executed by a processor, implements the virtual machine scheduling method described in any embodiment of the present invention.
[0022] The technical solution of this invention involves determining the resource requirements of the virtual machine to be migrated across multiple resource dimensions, obtaining multi-dimensional allocatable resource information for each physical node in the cluster, and determining a first candidate node list based on a preset resource priority and the multi-dimensional allocatable resource information of each physical node. The cluster is associated with the virtual machine to be migrated, and the multi-dimensional allocatable resource information includes the remaining allocatable amount of each physical node in the resource dimension corresponding to the resource requirements. The invention also obtains multi-dimensional available resource information for each physical node in the cluster, and determines a second candidate node list based on a preset resource priority and the multi-dimensional available resource information of each physical node. The multi-dimensional available resource information includes the remaining available amount of each physical node in the resource dimension corresponding to the resource requirements. Finally, the target migration physical node corresponding to the virtual machine to be migrated is determined based on the first and second candidate node lists. The above solution uses the resource requirements of the virtual machines to be migrated as a reference, so that when selecting target migration physical nodes, it not only depends on the resource status of the physical nodes, but also fully combines the business usage scenario and the actual resource requirements of the virtual machines to be migrated. Furthermore, it makes comprehensive decisions based on the resource requirements of the virtual machines to be migrated from multiple resource dimensions, as well as the allocable and available resource information of the physical nodes. This ensures that the selected target migration physical nodes are more in line with the actual resource usage of the virtual machines to be migrated, avoiding the emergence of new resource bottlenecks after the virtual machines are migrated, and thus efficiently adapting to the resource allocation needs in complex scenarios.
[0023] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 This is a flowchart of a virtual machine scheduling method provided in Embodiment 1 of the present invention;
[0026] Figure 2 This is a flowchart of a virtual machine scheduling method provided according to Embodiment 2 of the present invention;
[0027] Figure 3 This is a flowchart of a virtual machine scheduling method provided according to Embodiment 3 of the present invention;
[0028] Figure 4 This is a schematic diagram of the structure of a virtual machine scheduling device according to Embodiment 3 of the present invention;
[0029] Figure 5 This is a schematic diagram of the structure of an electronic device that implements the virtual machine scheduling method of this invention. Detailed Implementation
[0030] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0031] It should be noted that the terms "first," "second," and "target," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0032] Example 1
[0033] Figure 1 This is a flowchart illustrating a virtual machine scheduling method provided in Embodiment 1 of the present invention. This embodiment is applicable to resource scheduling situations. The method can be executed by a virtual machine scheduling device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes:
[0034] S101. Determine the resource requirements of the virtual machine to be migrated across multiple resource dimensions.
[0035] In this embodiment, the resource dimension may include computing resources, memory resources, network resources, and storage resources, etc. The resource requirement can be the resource requirement of the virtual machine to be migrated in each resource dimension. For example, the resource requirement of the virtual machine to be migrated in computing resources can be the number of CPU cores and CPU frequency required by the virtual machine to be migrated, etc., and the resource requirement in memory resources can be the memory capacity and memory bandwidth required by the virtual machine to be migrated, etc. The resource dimension and resource requirement can be determined according to the actual application scenario, and this embodiment does not impose any restrictions.
[0036] S102. Obtain the multi-dimensional allocable resource information of each physical node in the cluster. Based on the preset resource priority and the multi-dimensional allocable resource information of each physical node, determine the first candidate node list. The cluster is associated with the virtual machine to be migrated. The multi-dimensional allocable resource information includes the remaining allocable amount of the physical node in the resource dimension corresponding to the resource demand.
[0037] In this embodiment, the cluster may include several physical nodes (e.g., physical servers), which are interconnected via a high-speed network. The virtual machine to be migrated can run on one of the physical nodes in the cluster. Multidimensional allocatable resource information can be understood as the remaining allocatable amount (i.e., the amount of remaining resources that can be allocated) of a physical node across multiple resource dimensions that match the resource requirements of the virtual machine to be migrated. For example, if the resource dimensions corresponding to the resource requirements are computing resources and memory resources, then the multidimensional allocatable resource information may include the remaining amount of computing resources that can be allocated to the physical node and the remaining amount of memory resources that can be allocated to the physical node.
[0038] Preset resource priorities can be used to determine the priority of each resource dimension among multiple resource dimensions, or to determine the highest priority among multiple resource dimensions. For example, priorities can be set for each resource dimension separately, or a single resource dimension can be selected to set the highest priority. The specific setting method can be determined according to the requirements of computing speed and accuracy in the actual application scenario, and this invention does not impose any restrictions. Preset resource priorities can be changed. For example, preset resource priorities can be set initially when creating a virtual machine, and can also be changed subsequently according to the running status of the virtual machine.
[0039] The first candidate node list can be understood as a list of multiple candidate physical nodes, whose multidimensional allocatable resource information meets the resource requirements of the virtual machine to be migrated.
[0040] Optionally, a preset resource priority can be determined based on the resource utilization of the virtual machine to be migrated across multiple resource dimensions.
[0041] For example, the resource utilization rate of the virtual machine to be migrated can be statistically analyzed across various resource dimensions over a period of time. Based on the ranking of resource utilization rates from highest to lowest, the priority order of each resource dimension can be determined. The advantage of this approach is that it ensures the preset resource priorities better reflect the actual resource usage of the virtual machine to be migrated during real-world applications, thereby assisting relevant management systems or administrators in more efficiently determining the target physical node for migration.
[0042] S103. Obtain the multi-dimensional available resource information of each physical node in the cluster. Based on the preset resource priority and the multi-dimensional available resource information of each physical node, determine the second candidate node list. The multi-dimensional available resource information includes the remaining available amount of the physical node in the resource dimension corresponding to the resource demand.
[0043] In this embodiment, multi-dimensional available resource information can be understood as the remaining available resources (i.e., the amount of usable remaining resources) of a physical node across multiple resource dimensions that match the resource requirements of the virtual machine to be migrated. For example, if the resource dimensions corresponding to the resource requirements are computing resources and memory resources, then the multi-dimensional available resource information can include the remaining amount of computing resources and memory resources that the physical node can use. The second candidate node list can be understood as a list including multiple candidate physical nodes, whose multi-dimensional available resource information all meets the resource requirements of the virtual machine to be migrated. By performing dual screening based on the allocatable and available resource information of the physical nodes through the above steps, it can be ensured that the selected candidate physical nodes can meet both resource quota constraints and hardware resource constraints.
[0044] S104. Based on the first candidate node list and the second candidate node list, determine the target migration physical node corresponding to the virtual machine to be migrated.
[0045] In this embodiment, the physical nodes in the first candidate node list and the second candidate node list can be scored, and the physical node with the highest score can be selected as the target migration physical node corresponding to the virtual machine to be migrated.
[0046] For example, if the preset resource priority sets the highest priority among multiple resource dimensions, such as computing resource priority, each physical node in the first candidate node list can be scored according to the remaining allocable computing resources. For example, the more remaining allocable resources, the higher the score. Correspondingly, each physical node in the second candidate node list can be scored according to the remaining available computing resources. The physical node with the highest sum of the two scores is selected as the target migration physical node. If the preset resource priority sets the priority of each resource dimension among multiple resource dimensions, then the weight of each resource dimension can be determined according to the preset resource priority. For each physical node in the first candidate node list, the remaining allocable resources of each resource dimension can be weighted and summed according to the weight, and the score of each physical node can be determined according to the weighted sum calculation result. Correspondingly, for each physical node in the second candidate node list, the remaining available resources of each resource dimension can be weighted and summed according to the weight, and the score of each physical node can be determined according to the weighted sum calculation result. The physical node with the highest sum of the two scores is selected as the target migration physical node. The two scoring strategies mentioned above each have their advantages. The first method has lower computational complexity and can quickly determine the migration node, making it more suitable for scenarios with higher requirements for virtual machine migration speed. The second method has higher computational accuracy and can ensure that the migrated physical node and virtual machine have a higher degree of compatibility. The scoring strategy can be selected according to the application scenario, or a combination of the two scoring strategies can be used. This invention does not limit the specific scoring strategy.
[0047] In practical applications, various trigger conditions can be set to trigger the virtual machine scheduling device to execute the virtual machine scheduling method described above. For example, trigger conditions can include: immediate activation, timed scheduling, and conditional scheduling. Immediate activation can be understood as triggering the virtual machine scheduling device to execute the virtual machine scheduling method when the virtual machine is created, thereby distributing the newly created virtual machine to the corresponding physical node. In this case, the initial resource settings of the virtual machine in each resource dimension (i.e., the amount of resources allocated to the virtual machine when it is created) can be used as the resource requirement. Timed scheduling can be understood as setting a time period, and triggering the virtual machine scheduling device to execute the virtual machine scheduling method every time period, thereby migrating the virtual machine to the corresponding physical node. This trigger condition is first triggered when the virtual machine is created. Conditional scheduling can be understood as triggering the virtual machine scheduling device to execute the virtual machine scheduling method when the set conditions are met, thereby migrating the virtual machine to the corresponding physical node. For example, the usage percentage of resources such as CPU, memory, and network on the physical node can be set. When the actual usage rate of the physical node where the virtual machine is located reaches the set usage percentage, the virtual machine migration is triggered. Correspondingly, this trigger condition is also first triggered when the virtual machine is created.
[0048] This invention provides a virtual machine scheduling method. By determining the resource requirements of the virtual machine to be migrated across multiple resource dimensions, obtaining multi-dimensional allocatable resource information for each physical node in the cluster, and determining a first candidate node list based on a preset resource priority and the multi-dimensional allocatable resource information of each physical node; wherein the cluster is associated with the virtual machine to be migrated, and the multi-dimensional allocatable resource information includes the remaining allocatable amount of each physical node in the resource dimension corresponding to the resource requirements, and obtaining multi-dimensional available resource information for each physical node in the cluster, and determining a second candidate node list based on a preset resource priority and the multi-dimensional available resource information of each physical node; wherein the multi-dimensional available resource information includes the remaining available amount of each physical node in the resource dimension corresponding to the resource requirements; and determining the target migration physical node corresponding to the virtual machine to be migrated based on the first and second candidate node lists. The above solution uses the resource requirements of the virtual machines to be migrated as a reference, so that when selecting target migration physical nodes, it not only depends on the resource status of the physical nodes, but also fully combines the business usage scenario and the actual resource requirements of the virtual machines to be migrated. Furthermore, it makes comprehensive decisions based on the resource requirements of the virtual machines to be migrated from multiple resource dimensions, as well as the allocable and available resource information of the physical nodes. This ensures that the selected target migration physical nodes are more in line with the actual resource usage of the virtual machines to be migrated, avoiding the emergence of new resource bottlenecks after the virtual machines are migrated, and thus efficiently adapting to the resource allocation needs in complex scenarios.
[0049] In some embodiments, determining the resource requirements of the virtual machine to be migrated across multiple resource dimensions includes: determining resource requirement coefficients for each resource dimension based on the historical operating status of the virtual machine; wherein the resource dimension includes at least one of computing resources, memory resources, network resources, and storage resources; and determining the resource requirements of the virtual machine to be migrated across each resource dimension based on the initial resource settings of the virtual machine and the corresponding resource requirement coefficients. The advantage of this approach is that it allows the resource requirements of each resource dimension to be determined based on the actual operating conditions of the virtual machine to be migrated, ensuring that the business scenario and actual resource usage are fully considered when determining the target migration physical node. This avoids the resource allocation redundancy problem caused by relying solely on the initial resource settings of the virtual machine to be migrated in traditional methods.
[0050] In this embodiment, the resource demand coefficient can be used to characterize the actual resource demand of the virtual machine to be migrated in various resource dimensions. The resource demand coefficient in each resource dimension can be determined based on the running status of the virtual machine to be migrated over a period of time. For example, the reciprocal of the highest CPU utilization of the virtual machine to be migrated over a period of time is used as the resource demand coefficient for computing resources; the reciprocal of the highest memory utilization of the virtual machine to be migrated over a period of time is used as the resource demand coefficient for memory resources; the highest network inflow and outflow of the virtual machine to be migrated over a period of time is used as the resource demand coefficient for network resources, wherein the network inflow and outflow can be quantified using the number of data bytes; and the highest storage input / output of the virtual machine to be migrated over a period of time is used as the resource demand coefficient for storage resources, wherein the storage input / output can be quantified using the number of input / output operations per second (IOPS).
[0051] In this embodiment, the initial resource setting can be understood as the amount of resources allocated to the virtual machine when it is created. The resource requirements of the virtual machine to be migrated in each resource dimension can be determined based on the ratio of the initial resource setting to the resource requirement coefficient in each resource dimension. For example, if a virtual machine has an initial resource setting of 16 CPU cores for computing resources and 32GB for memory resources, after running for a period of time, the calculated resource requirement coefficients for both computing and memory resources are 4. Then, the virtual machine's resource requirement for computing resources becomes 4 CPU cores, and its resource requirement for memory resources becomes 8GB.
[0052] Example 2
[0053] Figure 2 This is a flowchart of a virtual machine scheduling method provided in Embodiment 2 of the present invention. This embodiment is a further refinement based on the above embodiments. Figure 2 As shown, the method includes:
[0054] S201. Determine the resource requirements of the virtual machine to be migrated across multiple resource dimensions.
[0055] In this embodiment, the resource dimension includes at least one of computing resources, memory resources, network resources, and storage resources.
[0056] S202. Obtain multi-dimensional allocatable resource information of each physical node in the cluster, and determine a first candidate node list based on the preset resource priority and the multi-dimensional allocatable resource information of each physical node. The multi-dimensional allocatable resource information includes at least one of allocatable computing resource information, allocatable memory resource information, allocatable network resource information, and allocatable storage resource information.
[0057] The cluster is associated with the virtual machine to be migrated, and the multidimensional allocable resource information includes the remaining allocable amount of physical nodes in the resource dimension corresponding to the resource demand.
[0058] For example, multi-dimensional allocatable resource information for each physical node in the cluster can be obtained through the following A1 to A4:
[0059] A1. For each physical node, determine the allocatable computing resource information of the current physical node based on the total computing resources in the current physical node, the preset super-resolution ratio of computing resources, and the total initial resource settings of all virtual machines in the current physical node.
[0060] For example, the allocatable computing resource information of the current physical node can be determined by the difference between the product of the total computing resources in the current physical node and the preset computing resource super-resolution ratio, and the total initial resource setting value of all virtual machines in the current physical node. The preset computing resource super-resolution ratio can be pre-set, generally greater than 1, and its specific value is not limited. Taking the allocatable computing resource information as the allocatable CPU core count as an example, the allocatable CPU core count of the current physical node can be determined by the difference between the product of the total CPU core count in the current physical node and the preset computing resource super-resolution ratio, and the total initial resource setting value of all virtual machines in the current physical node. The total initial resource setting value of all virtual machines can be the total number of CPU cores allocated to all virtual machines in the current physical node during creation.
[0061] A2. For each physical node, determine the allocatable memory resource information of the current physical node based on the total memory resources in the current physical node, the preset memory resource super-resolution ratio, and the total initial resource setting value of all virtual machines in the current physical node.
[0062] For example, the allocatable memory resource information of the current physical node can be determined by the difference between the product of the total memory resources in the current physical node and the preset memory resource over-allocation ratio, and the total initial set value of memory resources for all virtual machines in the current physical node. The preset memory resource over-allocation ratio can be pre-set, generally greater than 1, and its specific value is not limited. Taking allocatable memory capacity as an example, the allocatable memory capacity of the current physical node can be determined by the difference between the product of the total memory capacity in the current physical node and the preset memory resource over-allocation ratio, and the total initial set value of memory capacity for all virtual machines in the current physical node. The total initial set value of memory capacity for all virtual machines can be the total memory capacity allocated to all virtual machines in the current physical node during creation.
[0063] A3. For each physical node, determine the allocatable network resource information of the current physical node based on the total amount of network resources in the current physical node and the average amount of network resources used by the current physical node in the first preset historical period.
[0064] For example, the allocatable network resource information of a current physical node can be determined based on the difference between the total network resources in the current physical node and the average network resource usage of the current physical node within a first preset historical period. Taking allocatable network bandwidth as an example, the allocatable network bandwidth of the current physical node can be determined based on the difference between the total network bandwidth in the current physical node and the average network bandwidth usage of the current physical node within the first preset historical period.
[0065] A4. For each physical node, determine the allocatable storage resource information of the current physical node based on the total amount of storage resources in the current physical node and the average amount of storage resources used by the current physical node in the second preset historical period.
[0066] For example, the allocatable storage resource information of a current physical node can be determined based on the difference between the total storage resources in the current physical node and the average storage resource usage of the current physical node within a second preset historical period. Taking allocatable IOPS as an example, the allocatable IOPS of the current physical node can be determined based on the difference between the total IOPS in the current physical node and the average IOPS usage of the current physical node within a second preset historical period.
[0067] In this embodiment, the first and second preset historical periods can be preset to the same time period or to different time periods. Through the above steps, the allocatable resources of each physical node in the cluster in terms of computing, memory, network, and storage resources can be accurately obtained, providing a reference for subsequently determining the first candidate node list.
[0068] S203. Obtain multi-dimensional available resource information of each physical node in the cluster, and determine a second candidate node list based on the preset resource priority and the multi-dimensional available resource information of each physical node. The multi-dimensional available resource information includes at least one of available computing resource information, available memory resource information, available network resource information, and available storage resource information.
[0069] The multidimensional available resource information includes the remaining available quantity of physical nodes in the resource dimension corresponding to the resource demand.
[0070] For example, multi-dimensional available resource information for each physical node in the cluster can be obtained through the following steps B1 to B4:
[0071] B1. For each physical node, determine the available computing resources information of the current physical node based on the total amount of computing resources in the current physical node and the average utilization rate of computing resources of the current physical node in the third preset historical period.
[0072] For example, the difference between the integer 1 and the average utilization rate of computing resources of the current physical node within the third preset historical period can be used as the first coefficient. The available computing resource information of the current physical node is determined by multiplying the total computing resources in the current physical node by the first coefficient. Taking the available computing resource information as the number of available CPU cores as an example, the difference between the integer 1 and the average CPU utilization rate of the current physical node within the third preset historical period can be used as the first coefficient. The number of available CPU cores of the current physical node is determined by multiplying the total number of CPU cores in the current physical node by the first coefficient.
[0073] B2. For each physical node, determine the available memory resource information of the current physical node based on the total memory resources in the current physical node and the average memory resource utilization rate of the current physical node in the fourth preset historical period.
[0074] For example, the difference between the integer 1 and the average memory resource utilization rate of the current physical node within the fourth preset historical period can be used as the second coefficient. The available memory resource information of the current physical node is determined by multiplying the total memory resource in the current physical node by the second coefficient. Taking available memory resource information as available memory capacity as an example, the difference between the integer 1 and the average memory capacity utilization rate of the current physical node within the fourth preset historical period can be used as the second coefficient. The available memory capacity of the current physical node is determined by multiplying the total memory capacity in the current physical node by the second coefficient.
[0075] B3. For each physical node, determine the available network resource information of the current physical node based on the total amount of network resources in the current physical node and the highest network resource usage of the current physical node in the fifth preset historical period.
[0076] For example, the available network resource information of a current physical node can be determined based on the difference between the total network resource volume of the current physical node and the highest network resource usage of the current physical node within the fifth preset historical period. Taking available network bandwidth as an example, the available network bandwidth of the current physical node can be determined based on the difference between the total network bandwidth of the current physical node and the highest network bandwidth usage of the current physical node within the fifth preset historical period.
[0077] B4. For each physical node, determine the available storage resource information of the current physical node based on the total amount of storage resources in the current physical node and the highest usage of storage resources in the current physical node during the sixth preset historical period.
[0078] For example, the available storage resource information of the current physical node can be determined based on the difference between the total storage resources in the current physical node and the highest storage resource usage of the current physical node in the sixth preset historical period. Taking available IOPS as an example, the available IOPS of the current physical node can be determined based on the difference between the total IOPS in the current physical node and the highest IOPS usage of the current physical node in the sixth preset historical period.
[0079] In this embodiment, the third, fourth, fifth, and sixth preset historical periods can be preset to the same time period or to different time periods. Through the above steps, the available resources of each physical node in the cluster in terms of computing, memory, network, and storage resources can be accurately obtained, providing a reference for subsequently determining the second candidate node list.
[0080] S204. Based on the first candidate node list and the second candidate node list, determine the target migration physical node corresponding to the virtual machine to be migrated.
[0081] This invention refines the methods for obtaining multi-dimensional allocatable resource information and multi-dimensional available resource information, providing a specific processing method for filtering physical nodes based on the amount of allocatable and available resources in multiple resource dimensions. It has strong practical applicability, enabling the invention to consider both the constraints of cluster scheduling strategies and the actual hardware carrying capacity of physical nodes when filtering migration nodes, effectively solving the problems of resource redundancy and node overload in resource scheduling.
[0082] Example 3
[0083] Figure 3 This is a flowchart of a virtual machine scheduling method provided in Embodiment 3 of the present invention. This embodiment further refines the above embodiments. Figure 3 As shown, the method includes:
[0084] S301. Determine the resource requirements of the virtual machine to be migrated across multiple resource dimensions.
[0085] In this embodiment, the resource dimension includes computing resources, memory resources, network resources, and storage resources.
[0086] S302. Obtain the multi-dimensional allocable resource information of each physical node in the cluster. Based on the preset resource priority and the multi-dimensional allocable resource information of each physical node, determine the first candidate node list. The cluster is associated with the virtual machine to be migrated. The multi-dimensional allocable resource information includes the remaining allocable amount of the physical node in the resource dimension corresponding to the resource demand.
[0087] Optionally, the first candidate node list is determined based on preset resource priorities and multidimensional allocatable resource information of each physical node, including the following C1 to C4:
[0088] C1. Determine the target resource dimension with the highest priority among multiple resource dimensions based on the preset resource priority.
[0089] For example, a preset resource priority can be used to determine the highest priority among multiple resource dimensions. For instance, if the preset resource priority is computing resources first, then the target resource dimension is computing resources.
[0090] C2. The allocable resource information corresponding to the target resource dimension in the multidimensional allocable resource information of each physical node is taken as the target dimension allocable resource information.
[0091] For example, multidimensional allocatable resource information includes allocatable computing resource information, allocatable memory resource information, allocatable network resource information, and allocatable storage resource information. The allocatable resource information corresponding to the target resource dimension is the allocatable computing resource information; that is, the allocatable resource information of the target dimension is the allocatable computing resource information.
[0092] C3. Sort each physical node according to the target dimension allocable resource information to determine the first ranking information of each physical node.
[0093] For example, physical nodes can be sorted in descending order according to the allocatable computing resources (e.g., the number of allocatable CPU cores) in each physical node to determine the first ranking information of each physical node.
[0094] C4. Based on the multidimensional allocable resource information of each physical node, select physical nodes that meet the resource requirements in each resource dimension, and determine the first candidate node list based on the selection results; wherein, each physical node in the first candidate node list is arranged according to the first ranking information.
[0095] For example, for each physical node, the allocable resource information in each resource dimension can be compared to see if it meets the resource requirements of the virtual machine to be migrated in the corresponding dimension. Physical nodes that meet the resource requirements in each resource dimension are selected, and these physical nodes are sorted in ascending order according to their first ranking information to obtain the first candidate node list.
[0096] S303. Obtain the multi-dimensional available resource information of each physical node in the cluster. Based on the preset resource priority and the multi-dimensional available resource information of each physical node, determine the second candidate node list. The multi-dimensional available resource information includes the remaining available quantity of the physical node in the resource dimension corresponding to the resource demand.
[0097] Optionally, the second candidate node list is determined based on the preset resource priority and the multi-dimensional available resource information of each physical node, including the following D1 to D4:
[0098] D1. Determine the target resource dimension with the highest priority among multiple resource dimensions based on the preset resource priority.
[0099] For example, in determining the first and second candidate node lists, to ensure that the ranking of the two candidate node lists is based on the same resource dimension, resources in the same resource dimension are generally set as the highest priority by pre-setting resource priorities. In this embodiment, the target resource dimension is still computing resources. In practical applications, this pre-set resource priority is generally bound to the virtual machine.
[0100] D2. The available resource information corresponding to the target resource dimension in the multidimensional available resource information of each physical node is taken as the target dimension available resource information.
[0101] For example, multidimensional available resource information includes available computing resource information, available memory resource information, available network resource information, and available storage resource information. The available resource information corresponding to the target resource dimension is the available computing resource information; that is, the available resource information of the target dimension is the available computing resource information.
[0102] D3. Sort each physical node according to the available resource information of the target dimension to determine the second ranking information of each physical node.
[0103] For example, physical nodes can be sorted in descending order according to the available computing resources (e.g., the number of available CPU cores) in each physical node to determine the second ranking information for each physical node.
[0104] D4. Based on the multidimensional available resource information of each physical node, select physical nodes that meet the resource requirements in each resource dimension, and determine the second candidate node list based on the selection results; wherein, each physical node in the second candidate node list is arranged according to the second ranking information.
[0105] For example, for each physical node, the available resource information in each resource dimension can be compared to see if it meets the resource requirements of the virtual machine to be migrated in the corresponding dimension. Physical nodes that meet the resource requirements in each resource dimension are selected, and these physical nodes are sorted in ascending order according to their respective second ranking information to obtain the second candidate node list.
[0106] S304. Based on the first candidate node list and the second candidate node list, determine the target migration physical node corresponding to the virtual machine to be migrated. The physical nodes in the first candidate node list and the second candidate node list both carry ranking information. The ranking information is determined based on the preset resource priority and the multi-dimensional allocable resource information or multi-dimensional available resource information of the physical node.
[0107] For example, the physical nodes in the first candidate node list and the second candidate node list both carry ranking information, which can be determined according to C1 to C4 and D1 to D4 as described above.
[0108] Optionally, determining the target migration physical node corresponding to the virtual machine to be migrated based on the first candidate node list and the second candidate node list includes: for each physical node in the first candidate node list, finding a target physical node with the same node label in the second candidate node list based on the node label of the current physical node; summing the first ranking of the current physical node in the first candidate node list with the second ranking of the target physical node in the second candidate node list to obtain the comprehensive ranking of the current physical node; and selecting the physical node with the highest comprehensive ranking as the target migration physical node corresponding to the virtual machine to be migrated.
[0109] For example, each physical node in the cluster carries a unique node label, which can be determined based on the physical node's Internet Protocol (IP) address or node name, without any specific limitation. For each physical node in the first candidate node list, the node label of the current physical node can be used as a query field to find a target physical node with the same node label in the second candidate node list. The first ranking of the current physical node in the first candidate node list is summed with the second ranking of the target physical node in the second candidate node list to obtain the comprehensive ranking of the current physical node. The comprehensive ranking of each physical node in the first candidate node list is determined using the above method, and the physical node with the highest comprehensive ranking is selected as the target migration physical node corresponding to the virtual machine to be migrated.
[0110] For example, taking resource dimensions including computing resources and memory resources as an example, a virtual machine to be migrated requires 4 CPU cores in computing resources and 8GB in memory resources. Following the steps above, the first candidate node list (as shown in Table 1) and the second candidate node list (as shown in Table 2) can be obtained respectively:
[0111] Table 1 List of First Candidate Nodes
[0112]
[0113] Table 2 List of Second Candidate Nodes
[0114]
[0115] In the two tables above, allocable computing resources and available computing resources are quantified using the number of CPU cores, while allocable memory resources and available memory resources are quantified using memory capacity.
[0116] The overall ranking of each physical node is shown in Table 3:
[0117] Table 3 Overall Ranking of Physical Nodes
[0118]
[0119] By following the steps above, the physical node with the node label node-3 can be selected as having the highest overall ranking. Therefore, this physical node is selected as the target physical node for the virtual machine to be migrated.
[0120] Optionally, if no target physical node with the same node label is found in the second candidate node list based on the node label of the current physical node, the current physical node is eliminated, and the process continues with the next physical node in the first candidate node list. If no target physical node with the same node label is found in the second candidate node list based on the node label of the current physical node, it indicates that the available resource information of the current physical node does not meet the resource requirements of the virtual machine to be migrated, and therefore the current physical node can be eliminated.
[0121] Optionally, if multiple physical nodes have the same overall ranking, they can be sorted in descending order based on their allocable or available resources in the target resource dimension to determine the final overall ranking of each physical node. This process avoids multiple physical nodes having the same overall ranking and prioritizes nodes with more remaining resources according to the target resource dimension, improving the balance of resource scheduling.
[0122] In some embodiments, determining a first candidate node list based on a preset resource priority and multidimensional allocatable resource information of each physical node includes: determining a target resource dimension with the highest priority among multiple resource dimensions based on the preset resource priority; using the allocatable resource information corresponding to the target resource dimension in the multidimensional allocatable resource information of each physical node as the target dimension allocatable resource information; sorting each physical node according to the target dimension allocatable resource information to determine a first ranking information for each physical node; sorting each physical node in ascending order according to the first ranking information, and determining a first candidate node list based on the sorted physical nodes; determining a second candidate node list based on the preset resource priority and multidimensional available resource information of each physical node includes: determining a target resource dimension with the highest priority among multiple resource dimensions based on the preset resource priority; using the available resource information corresponding to the target resource dimension in the multidimensional available resource information of each physical node as the target dimension available resource information; and so on. The physical nodes are sorted according to the available resource information of the target dimension to determine the second ranking information of each physical node; the physical nodes are sorted in ascending order according to the second ranking information, and a second candidate node list is determined according to the sorted physical nodes; wherein, determining the target migration physical node corresponding to the virtual machine to be migrated according to the first candidate node list and the second candidate node list includes: for each physical node in the first candidate node list, finding a target physical node with the same node label in the second candidate node list according to the node label of the current physical node; summing the first ranking of the current physical node in the first candidate node list with the second ranking of the target physical node in the second candidate node list to obtain the comprehensive ranking of the current physical node; and selecting the physical node with the highest comprehensive ranking and whose multi-dimensional allocable resource information and multi-dimensional available resource information meet the resource requirements in each resource dimension as the target migration physical node corresponding to the virtual machine to be migrated. The advantage of this setup is that it places the step of determining whether the allocatable and available resource information of a physical node meets the resource requirements of the virtual machine to be migrated after the step of determining the overall ranking. When determining the target migration physical node, it is only necessary to filter according to the overall ranking order to find the first physical node whose multi-dimensional allocatable and available resource information meets the resource requirements in each resource dimension. This physical node can then be used as the target migration physical node, simplifying the calculation process. Any modifications, equivalent substitutions, and improvements made based on the above steps should be included within the scope of protection of this invention.
[0123] Example 4
[0124] Figure 4 This is a schematic diagram of a virtual machine scheduling device provided in Embodiment 4 of the present invention. Figure 4As shown, the device includes: a resource requirement determination module 401, a first candidate node list determination module 402, a second candidate node list determination module 403, and a target migration physical node determination module 404.
[0125] The resource requirement determination module is used to determine the resource requirements of the virtual machine to be migrated across multiple resource dimensions.
[0126] The first candidate node list determination module is used to obtain multi-dimensional allocable resource information of each physical node in the cluster, and determine the first candidate node list according to the preset resource priority and the multi-dimensional allocable resource information of each physical node; wherein, the cluster is associated with the virtual machine to be migrated, and the multi-dimensional allocable resource information includes the remaining allocable amount of the physical node in the resource dimension corresponding to the resource demand;
[0127] The second candidate node list determination module is used to obtain multi-dimensional available resource information of each physical node in the cluster, and determine the second candidate node list according to the preset resource priority and the multi-dimensional available resource information of each physical node; wherein, the multi-dimensional available resource information includes the remaining available amount of the physical node in the resource dimension corresponding to the resource demand;
[0128] The target migration physical node determination module is used to determine the target migration physical node corresponding to the virtual machine to be migrated based on the first candidate node list and the second candidate node list.
[0129] This invention provides a virtual machine scheduling device. It determines the resource requirements of the virtual machine to be migrated across multiple resource dimensions, obtains multi-dimensional allocatable resource information for each physical node in the cluster, and determines a first candidate node list based on a preset resource priority and the multi-dimensional allocatable resource information of each physical node. The cluster is associated with the virtual machine to be migrated, and the multi-dimensional allocatable resource information includes the remaining allocatable amount of each physical node in the resource dimension corresponding to its resource requirements. It also obtains multi-dimensional available resource information for each physical node in the cluster and determines a second candidate node list based on a preset resource priority and the multi-dimensional available resource information of each physical node. The multi-dimensional available resource information includes the remaining available amount of each physical node in the resource dimension corresponding to its resource requirements. Finally, based on the first and second candidate node lists, the target migration physical node corresponding to the virtual machine to be migrated is determined. The above solution uses the resource requirements of the virtual machines to be migrated as a reference, so that when selecting target migration physical nodes, it not only depends on the resource status of the physical nodes, but also fully combines the business usage scenario and the actual resource requirements of the virtual machines to be migrated. Furthermore, it makes comprehensive decisions based on the resource requirements of the virtual machines to be migrated from multiple resource dimensions, as well as the allocable and available resource information of the physical nodes. This ensures that the selected target migration physical nodes are more in line with the actual resource usage of the virtual machines to be migrated, avoiding the emergence of new resource bottlenecks after the virtual machines are migrated, and thus efficiently adapting to the resource allocation needs in complex scenarios.
[0130] Optional, the resource requirement determination module includes:
[0131] The resource requirement coefficient determination unit is used to determine the resource requirement coefficient of the virtual machine to be migrated in each resource dimension based on the historical running status of the virtual machine to be migrated; wherein, the resource dimension includes at least one of computing resources, memory resources, network resources, and storage resources;
[0132] The resource requirement determination unit is used to determine the resource requirement of the virtual machine to be migrated in each resource dimension based on the initial resource settings of the virtual machine in each resource dimension and the corresponding resource requirement coefficient in each resource dimension.
[0133] Optionally, the multidimensional allocatable resource information includes at least one of allocatable computing resource information, allocatable memory resource information, allocatable network resource information, and allocatable storage resource information; the first candidate node list determination module includes at least one allocatable resource information determination unit and a first candidate node list determination unit:
[0134] The first allocable resource information determination unit is used to determine the allocable computing resource information of each physical node based on the total computing resources in the current physical node, the preset computing resource super-resolution ratio, and the total initial resource setting value of all virtual machines in the current physical node.
[0135] The second allocable resource information determination unit is used to determine the allocable memory resource information of each physical node based on the total memory resources in the current physical node, the preset memory resource super-division ratio, and the total initial resource setting value of all virtual machines in the current physical node.
[0136] The third allocable resource information determination unit is used to determine the allocable network resource information of each physical node based on the total amount of network resources in the current physical node and the average amount of network resource usage of the current physical node in the first preset historical period.
[0137] The fourth allocable resource information determination unit is used to determine the allocable storage resource information of each physical node based on the total amount of storage resources in the current physical node and the average amount of storage resources used by the current physical node in the second preset historical period.
[0138] The first candidate node list determination unit is used to determine the first candidate node list based on the preset resource priority and the multi-dimensional allocable resource information of each physical node; wherein, the cluster is associated with the virtual machine to be migrated, and the multi-dimensional allocable resource information includes the remaining allocable amount of the physical node in the resource dimension corresponding to the resource demand.
[0139] Optionally, the multi-dimensional available resource information includes at least one of available computing resource information, available memory resource information, available network resource information, and available storage resource information; the second candidate node list determination module includes at least one available resource information determination unit and a second candidate node list determination unit:
[0140] The first available resource information determination unit is used to determine the available computing resource information of each physical node based on the total amount of computing resources in the current physical node and the average utilization rate of computing resources of the current physical node in the third preset historical period.
[0141] The second available resource information determination unit is used to determine the available memory resource information of each physical node based on the total amount of memory resources in the current physical node and the average memory resource utilization rate of the current physical node in the fourth preset historical period.
[0142] The third available resource information determination unit is used to determine the available network resource information of each physical node based on the total amount of network resources in the current physical node and the highest network resource usage of the current physical node in the fifth preset historical period.
[0143] The fourth available resource information determination unit is used to determine the available storage resource information of each physical node based on the total amount of storage resources in the current physical node and the highest amount of storage resources used by the current physical node in the sixth preset historical period.
[0144] The second candidate node list determination unit is used to determine a second candidate node list based on the preset resource priority and the multidimensional available resource information of each physical node; wherein, the multidimensional available resource information includes the remaining available quantity of the physical node in the resource dimension corresponding to the resource demand.
[0145] Optionally, the module for determining the first candidate node list includes:
[0146] The allocatable resource information determination unit is used to obtain multi-dimensional allocatable resource information of each physical node in the cluster;
[0147] The first target resource dimension determination unit is used to determine the target resource dimension with the highest priority among multiple resource dimensions according to the preset resource priority.
[0148] The target dimension allocatable information determination unit is used to take the allocatable resource information corresponding to the target resource dimension from the multi-dimensional allocatable resource information of each physical node as the target dimension allocatable resource information.
[0149] The first ranking information determination unit is used to sort each physical node according to the target dimension allocable resource information to determine the first ranking information of each physical node.
[0150] The first filtering unit is used to filter out physical nodes that meet the resource requirements in each resource dimension based on the multidimensional allocable resource information of each physical node, and determine a first candidate node list based on the filtering results; wherein, each physical node in the first candidate node list is arranged according to the first ranking information.
[0151] Optionally, the second candidate node list determination module includes:
[0152] A resource availability information determination unit is used to obtain multi-dimensional resource availability information of each physical node in the cluster.
[0153] The second target resource dimension determination unit is used to determine the target resource dimension with the highest priority among multiple resource dimensions according to the preset resource priority.
[0154] The target dimension available information determination unit is used to take the available resource information corresponding to the target resource dimension from the multi-dimensional available resource information of each physical node as the target dimension available resource information.
[0155] The second ranking information determination unit is used to sort each physical node according to the available resource information of the target dimension, so as to determine the second ranking information of each physical node.
[0156] The second filtering unit is used to filter out physical nodes that meet the resource requirements in each resource dimension based on the multidimensional available resource information of each physical node, so as to form and determine a second candidate node list based on the filtering results; wherein, each physical node in the second candidate node list is arranged according to the second ranking information.
[0157] Optionally, the physical nodes in both the first candidate node list and the second candidate node list carry ranking information; the ranking information is determined based on the preset resource priority and the multi-dimensional allocable resource information or multi-dimensional available resource information of the physical node; the target migration physical node determination module includes:
[0158] The comprehensive ranking determination unit is used to find a target physical node with the same node label in the second candidate node list for each physical node in the first candidate node list based on the node label of the current physical node; and to sum the first ranking of the current physical node in the first candidate node list with the second ranking of the target physical node in the second candidate node list to obtain the comprehensive ranking of the current physical node.
[0159] The target migration physical node determination unit is used to select the physical node with the highest overall ranking as the target migration physical node corresponding to the virtual machine to be migrated.
[0160] The virtual machine scheduling device provided in this embodiment of the invention can execute the virtual machine scheduling method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0161] Example 5
[0162] Figure 5 A schematic diagram of an electronic device 500 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0163] like Figure 5 As shown, the electronic device 500 includes at least one processor 501 and a memory, such as a read-only memory (ROM) 502 and a random access memory (RAM) 503, communicatively connected to the at least one processor 501. The memory stores computer programs executable by the at least one processor. The processor 501 can perform various appropriate actions and processes based on the computer program stored in the ROM 502 or loaded into the RAM 503 from storage unit 508. The RAM 503 can also store various programs and data required for the operation of the electronic device 500. The processor 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0164] Multiple components in electronic device 500 are connected to I / O interface 505, including: input unit 506, such as keyboard, mouse, etc.; output unit 507, such as various types of monitors, speakers, etc.; storage unit 508, such as disk, optical disk, etc.; and communication unit 509, such as network card, modem, wireless transceiver, etc. Communication unit 509 allows electronic device 500 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0165] Processor 501 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 501 performs the various methods and processes described above, such as virtual machine scheduling methods.
[0166] In some embodiments, the virtual machine scheduling method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by processor 501, one or more steps of the virtual machine scheduling method described above may be performed. Alternatively, in other embodiments, processor 501 may be configured to execute the virtual machine scheduling method by any other suitable means (e.g., by means of firmware).
[0167] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0168] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0169] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0170] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0171] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0172] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0173] This disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the virtual machine scheduling method provided in the above embodiments.
[0174] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0175] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A virtual machine scheduling method, characterized in that, include: Determine the resource requirements of the virtual machines to be migrated across multiple resource dimensions; Obtain multidimensional allocatable resource information for each physical node in the cluster, and determine a first candidate node list based on preset resource priorities and the multidimensional allocatable resource information for each physical node; wherein, the cluster is associated with the virtual machine to be migrated, and the multidimensional allocatable resource information includes the remaining allocatable amount of the physical node in the resource dimension corresponding to the resource demand; Obtain multi-dimensional available resource information of each physical node in the cluster, and determine a second candidate node list based on the preset resource priority and the multi-dimensional available resource information of each physical node; wherein, the multi-dimensional available resource information includes the remaining available amount of the physical node in the resource dimension corresponding to the resource demand; Based on the first candidate node list and the second candidate node list, the target migration physical node corresponding to the virtual machine to be migrated is determined.
2. The virtual machine scheduling method according to claim 1, characterized in that, Determine the resource requirements of the virtual machines to be migrated across multiple resource dimensions, including: Based on the historical running status of the virtual machine to be migrated, the resource requirement coefficients of the virtual machine to be migrated in various resource dimensions are determined; wherein, the resource dimensions include at least one of computing resources, memory resources, network resources, and storage resources; Based on the initial resource settings of the virtual machine to be migrated in each resource dimension and the corresponding resource requirement coefficients in each resource dimension, the resource requirements of the virtual machine to be migrated in each resource dimension are determined.
3. The virtual machine scheduling method according to claim 1, characterized in that, The multidimensional allocatable resource information includes at least one of allocatable computing resource information, allocatable memory resource information, allocatable network resource information, and allocatable storage resource information; The multidimensional available resource information includes at least one of available computing resource information, available memory resource information, available network resource information, and available storage resource information; The acquisition of multi-dimensional allocatable resource information for each physical node in the cluster includes at least one of the following: For each physical node, the allocatable computing resource information of the current physical node is determined based on the total computing resources in the current physical node, the preset super-resolution ratio of computing resources, and the total initial resource setting value of all virtual machines in the current physical node. For each physical node, the allocatable memory resource information of the current physical node is determined based on the total memory resources in the current physical node, the preset memory resource super-distribution ratio, and the total initial resource setting value of all virtual machines in the current physical node. For each physical node, the allocatable network resource information of the current physical node is determined based on the total amount of network resources in the current physical node and the average amount of network resources used by the current physical node in the first preset historical period. For each physical node, the allocatable storage resource information of the current physical node is determined based on the total amount of storage resources in the current physical node and the average amount of storage resources used by the current physical node in the second preset historical period. The step of obtaining the multi-dimensional available resource information of each physical node in the cluster includes at least one of the following: For each physical node, the available computing resources of the current physical node are determined based on the total amount of computing resources in the current physical node and the average utilization rate of computing resources of the current physical node in the third preset historical period. For each physical node, the available memory resource information of the current physical node is determined based on the total memory resources in the current physical node and the average memory resource utilization rate of the current physical node in the fourth preset historical period. For each physical node, the available network resource information of the current physical node is determined based on the total amount of network resources in the current physical node and the highest network resource usage of the current physical node in the fifth preset historical period. For each physical node, the available storage resource information of the current physical node is determined based on the total amount of storage resources in the current physical node and the highest usage of storage resources in the current physical node during the sixth preset historical period.
4. The virtual machine scheduling method according to claim 1, characterized in that, The step of determining the first candidate node list based on preset resource priorities and multidimensional allocable resource information of each physical node includes: Based on the preset resource priority, determine the target resource dimension with the highest priority among multiple resource dimensions; The allocable resource information corresponding to the target resource dimension in the multidimensional allocable resource information of each physical node is taken as the target dimension allocable resource information. The physical nodes are sorted according to the target dimension allocable resource information to determine the first ranking information of each physical node; Based on the multidimensional allocatable resource information of each physical node, physical nodes that meet the resource requirements in each resource dimension are selected, and a first candidate node list is determined based on the selection results; wherein, each physical node in the first candidate node list is arranged according to the first ranking information.
5. The virtual machine scheduling method according to claim 1, characterized in that, The step of determining the second candidate node list based on the preset resource priority and the multi-dimensional available resource information of each physical node includes: Based on the preset resource priority, determine the target resource dimension with the highest priority among multiple resource dimensions; The available resource information corresponding to the target resource dimension in the multidimensional available resource information of each physical node is taken as the target dimension available resource information. The physical nodes are sorted according to the available resource information of the target dimension to determine the second ranking information of each physical node; Based on the multidimensional available resource information of each physical node, physical nodes that meet the resource requirements in each resource dimension are selected, and a second candidate node list is determined based on the selection results; wherein, each physical node in the second candidate node list is arranged according to the second ranking information.
6. The virtual machine scheduling method according to claim 1, characterized in that, The physical nodes in both the first candidate node list and the second candidate node list carry ranking information; the ranking information is determined based on the preset resource priority and the multidimensional allocable resource information or the multidimensional available resource information of the physical node. The step of determining the target migration physical node corresponding to the virtual machine to be migrated based on the first candidate node list and the second candidate node list includes: For each physical node in the first candidate node list, find a target physical node with the same node label in the second candidate node list based on the node label of the current physical node; sum the first ranking of the current physical node in the first candidate node list with the second ranking of the target physical node in the second candidate node list to obtain the comprehensive ranking of the current physical node. The physical node with the highest overall ranking will be selected as the target physical node for the virtual machine to be migrated.
7. A virtual machine scheduling device, characterized in that, include: The resource requirement determination module is used to determine the resource requirements of the virtual machine to be migrated across multiple resource dimensions. The first candidate node list determination module is used to obtain multi-dimensional allocable resource information of each physical node in the cluster, and determine the first candidate node list according to the preset resource priority and the multi-dimensional allocable resource information of each physical node; wherein, the cluster is associated with the virtual machine to be migrated, and the multi-dimensional allocable resource information includes the remaining allocable amount of the physical node in the resource dimension corresponding to the resource demand; The second candidate node list determination module is used to obtain multi-dimensional available resource information of each physical node in the cluster, and determine the second candidate node list according to the preset resource priority and the multi-dimensional available resource information of each physical node; wherein, the multi-dimensional available resource information includes the remaining available amount of the physical node in the resource dimension corresponding to the resource demand; The target migration physical node determination module is used to determine the target migration physical node corresponding to the virtual machine to be migrated based on the first candidate node list and the second candidate node list.
8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the virtual machine scheduling method according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the virtual machine scheduling method of any one of claims 1-6.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the virtual machine scheduling method according to any one of claims 1-6.