A virtual machine migration method based on prediction and global optimality pruning
Patent Information
- Application Number
- CN202311023676.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-14
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2043-08-14
AI Technical Summary
Existing technologies have failed to effectively reduce data center energy consumption during virtual machine migration, especially failing to adequately consider network energy consumption generated by inter-virtual machine communication.
A virtual machine migration method based on prediction and global optimality pruning is adopted. By periodically detecting the load, an energy consumption estimation function is constructed, and the IDA* algorithm is used to optimize the virtual machine deployment. Taking into account the energy consumption of physical machines and networks, the deployment method with the lowest energy consumption is selected.
While meeting service quality requirements, we reduce the total energy consumption of the data center, decrease the number of iterations, and shorten the virtual machine placement response time.
Smart Images

Figure CN117009037B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cloud computing technology, and in particular to a virtual machine migration method based on prediction and global optimality pruning. Background Technology
[0002] In recent years, cloud computing has become one of the most popular technologies. As the fundamental infrastructure for cloud computing, the construction and use of data centers have become an increasingly important issue for governments and major IT companies. A data center (DC) typically has a large number of physical machines (PMs). Virtualization is a key technology in cloud data centers. Virtualization encapsulates application tasks and data in the form of virtual machines (VMs), and allocates VMs to specific physical nodes for execution through VM allocation strategies. To save energy consumption in cloud data centers and improve quality of service (QoS) and resource utilization, cloud service providers also employ VM migration (VMM) strategies to select and deploy VMs on various physical servers.
[0003] Virtual machine migration is a common technique used by cloud service providers to construct energy-efficient cloud environments. In the Cloudsim project, virtual machine migration consists of three steps: physical host status detection, virtual machine selection, and virtual machine placement. Physical host status detection involves using algorithms or strategies to select physical nodes with abnormal loads (overloaded or underloaded) based on the load status of all hosts on the cloud platform, forming a candidate list of physical hosts for migration. Virtual machine selection involves choosing suitable virtual machines to be migrated from the abnormally loaded physical hosts, forming a candidate list of virtual machines for migration. Virtual machine placement involves relocating the candidate virtual machines selected in the virtual machine selection phase to other physical nodes with normal loads according to a specific algorithm.
[0004] Currently, there is a significant amount of research on virtual machine placement. Energy consumption is a crucial factor affecting the application and development of cloud data centers, and most research focuses on energy optimization. Some studies also focus on virtual machine migration frequency and time, as well as SLA violation rates. When considering energy optimization, few publications address network-related energy consumption. However, virtual machines often communicate with each other, and placing two communicating virtual machines on different physical machines can generate substantial network energy consumption. Summary of the Invention
[0005] To address the issues of physical machine energy consumption generated by physical machines providing services to virtual machines in data centers, as well as the significant network energy consumption generated by inter-virtual machine communication, this invention proposes a virtual machine migration method based on prediction and global optimality pruning, which can reduce data center energy consumption while meeting service quality requirements.
[0006] This invention provides a virtual machine migration method based on prediction and global optimality pruning, comprising:
[0007] Step 1: Periodically check the overload or underload status of all physical machines in the data center and generate a set of physical machines (PM) with normal load.
[0008] Step 2: Select the virtual machines to be migrated from overloaded or underloaded physical machines to generate a set of virtual machines to be migrated (VMs);
[0009] Step 3: Construct an energy consumption estimation function, and based on the energy consumption estimation function, use the IDA* algorithm to construct a physical machine subgraph for each physical machine with normal load as the starting point; and construct a virtual machine subgraph for each virtual machine to be migrated as the starting point; wherein, any combination between a physical machine subgraph and a virtual machine subgraph corresponds to a deployment method;
[0010] Step 4: Calculate the energy consumption of all deployment methods and select the deployment method with the lowest energy consumption for virtual machine deployment.
[0011] Furthermore, step 3 specifically includes:
[0012] Step A1: Set the physical machine set PM = {PM1, PM2, ..., PM2} N Select a physical machine (PM) from the set of physical machines. j The physical machine PM j Add it as the first vertex to the physical machine subgraph to be created, j = 1, 2, ..., N;
[0013] Step A2: Select a virtual machine from the set of virtual machines to be migrated and deploy it on the currently selected physical machine, and delete the deployed virtual machine from the set of virtual machines to be migrated;
[0014] Step A3: Repeat step A2 until the capacity of the currently selected physical machine is exhausted;
[0015] Step A4: If there are still undeployed virtual machines in the set of virtual machines to be migrated, calculate the energy consumption value of each of the remaining physical machines in the physical machine set according to the constructed energy consumption estimation function;
[0016] Step A5: Select the physics machine with the lowest energy consumption as a vertex and add it to the subgraph of the physics machine to be created;
[0017] Step A6: Repeat steps A2 to A5 until the set of virtual machines to be migrated is empty. The physical machine subgraph at this point is the physical machine PM. j The corresponding physical machine diagram.
[0018] Furthermore, step 3 specifically includes:
[0019] Step B1: Define the set of virtual machines to be migrated: VM = {VM1, VM2, ..., VM...} M Select a virtual machine (VM) from the set of VMs to be migrated. k The virtual machine VM k Add it as the first vertex to the subgraph of the virtual machine to be created, k = 1, 2, ..., M;
[0020] Step B2: Select a physical machine from the set of physical machines and install the virtual machine VM. k Deployed on this physical machine;
[0021] Step B3: Select a virtual machine from the set of virtual machines to be migrated that has the highest communication traffic with the virtual machines already deployed on the physical machine, continue to deploy it on the physical machine, and add the virtual machine with the highest communication traffic as a vertex to the subgraph of virtual machines to be created;
[0022] Step B4: Repeat step B3 until the physical machine's capacity is exhausted. The resulting virtual machine subgraph is the virtual machine VM. k The corresponding virtual machine subgraph.
[0023] Furthermore, the energy consumption estimation function is:
[0024] f(PM i ) = g(PM i )+h(PM i (1)
[0025] Wherein, f(PM) i ) indicates selecting PM i Energy consumption during deployment, g(PM) i () indicates the selection of the physical machine PM i The total energy consumption generated by previously deployed virtual machines; h(PM) i () indicates the selection of the physical machine PM i Then, the total energy consumption generated after deploying all the remaining virtual machines.
[0026] Furthermore, g(PM) is calculated according to formula (2). i ):
[0027] g(PM i ) = SubGECbefore +PMEC i +NETEC i (2)
[0028] Among them, SubGEC before This indicates adding PM i Previously, the physical machine power consumption and network power consumption of the physical machines in the physical machine subgraph due to the placement of virtual machines were measured by PMEC. i Indicates adding PM i The physical power consumption of placing virtual machines, NETEC i This indicates that PM has been added to the physical machine sub-diagram. i The resulting network energy consumption.
[0029] Furthermore, h(PM) is calculated according to formula (3). i ):
[0030] h(PM i ) = PV·PMEC average +PE·NETEC average (3)
[0031] Where PV and PE represent the addition of PM, respectively. i Afterwards, the number of vertices and edges that need to be added to the physical subgraph and generated will be determined by PMEC. average It is the average physical power consumption, NETEC average It is the average value of network energy consumption.
[0032] Furthermore, PMEC is calculated according to formulas (4) and (5). i :
[0033]
[0034] in,
[0035] in, Indicates PM i Because of running VM k The energy consumption generated Indicates VM k CPU load, Indicates PM i Processing capacity This represents the increase in energy consumption when the CPU is fully loaded. Indicates VM k Was it placed in PM? i If yes, the value is 1; otherwise, it is 0.
[0036] Calculate NETEC according to formulas (7) and (8). i:
[0037]
[0038] in,
[0039] Wherein, SubGPM is the physical machine subgraph, NETEC ij Indicates PM i and PM j Network energy consumption during data transmission σ represents the energy consumption of transmitting a data packet. ij This indicates that the collection of VMs is deployed in PM i and PM j The total number of data packets that the virtual machine on the platform needs to transmit, if PM i and PM j If there is no data transmission, then NETEC ij It is 0.
[0040] Furthermore, σ is calculated according to formulas (9) to (11). ij and
[0041]
[0042]
[0043]
[0044] Among them, TR ab Indicates VM a and VM b The total number of data packets that need to be transmitted between them. This indicates that the data packet was assigned to PM. i and PM j Between the first On this path, BEC pkt This represents the energy consumption generated by forwarding element B when forwarding a data packet.
[0045] Furthermore, PV and PE are calculated according to formulas (13) and (14):
[0046]
[0047]
[0048] Where x represents adding PM i Previously, the physical machine subgraph contained the number of vertices, where M represents the total number of virtual machines in the set of VMs to be migrated. allocated This indicates the number of virtual machines currently deployed. Indicates adding PM i The number of virtual machines that can be allocated, V average This represents the average capacity of all vertices in the physical machine subgraph.
[0049] Furthermore, NETEC is calculated according to formula (15). average :
[0050]
[0051] Where x represents adding PM i Previously, the number of vertices already present in the physical subgraph.
[0052] The beneficial effects of this invention are:
[0053] (1) In terms of energy consumption, we comprehensively consider the two types of energy consumption: physical machine energy consumption generated by the physical machines of the data center providing services to virtual machines and the large amount of network energy consumption generated by communication between virtual machines. By optimizing the overall energy consumption composed of the two types of energy consumption, the optimization scheme is closer to the actual situation, and while meeting the service quality, the energy consumption of the data center is further reduced.
[0054] (2) The pruning idea based on the IDA* algorithm can greatly reduce the number of iterations and shorten the response time of virtual machine placement. Attached Figure Description
[0055] Figure 1 This is a schematic diagram of the virtual machine migration structure provided in an embodiment of the present invention;
[0056] Figure 2 A flowchart illustrating a virtual machine migration method based on prediction and global optimality pruning, provided as an embodiment of the present invention. Detailed Implementation
[0057] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of the embodiments of this invention will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0058] Example 1
[0059] Combination Figure 1 and Figure 2 As shown, this embodiment of the invention provides a virtual machine migration method based on prediction and global optimality pruning, including the following steps:
[0060] S101: Periodically detects the overload or underload status of all physical machines in the data center and generates a set of physical machines (PM) with normal load.
[0061] Specifically, a robust local reduction physical machine detection method can be used to periodically detect overload or underload conditions of the physical machine.
[0062] S102: Select virtual machines to be migrated from overloaded or underloaded physical machines and generate a set of virtual machines to be migrated (VMs);
[0063] Specifically, the minimum migration time selection method can be used to select the virtual machines that need to be migrated.
[0064] Before executing step S103, the total capacity required by the virtual machines can be calculated in advance based on the set of virtual machines to be migrated, and the total capacity of the physical machines can be calculated based on the set of physical machines with normal load. It is then determined whether the total capacity of the physical machines can meet the total capacity required by the virtual machines. If it can, the subsequent steps are executed; otherwise, the migration process ends.
[0065] S103: Construct an energy consumption estimation function, and based on the energy consumption estimation function, use the IDA* algorithm to construct a physical machine subgraph (also known as SubGPM) for each physical machine with normal load as the starting point; and construct a virtual machine subgraph (also known as SubGVM) for each virtual machine to be migrated as the starting point; wherein, any combination between a physical machine subgraph and a virtual machine subgraph corresponds to a deployment method;
[0066] Specifically, a data center (DC) can be abstracted as a graph G = (PM, E, wN, wE); where PM is a set of N physical machines; wN represents their current capacity, including CPU, memory, disk, and I / O bandwidth; E represents the pre-calculated set of paths between any two physical machines; and wE represents the weight of an edge, i.e., the number of times the information on this edge is forwarded by a router. Based on this, when the existing resources of the data center meet the total demand of the VM set, there will be numerous combinations of physical machine nodes that satisfy the VM set. However, traversing all combinations to calculate the overall energy efficiency is extremely inefficient. Therefore, this embodiment proposes generating a corresponding candidate subgraph SubGPM starting from all physical machine nodes. The IDA* algorithm is commonly used in optimal path selection; in this embodiment, the IDA* algorithm is abstracted as the selection of the optimal SubGPM.
[0067] S104: Calculate the energy consumption of all deployment methods and select the deployment method with the lowest energy consumption for virtual machine deployment.
[0068] The virtual machine migration method based on prediction and global optimality pruning provided in this invention can reduce data center energy consumption while meeting service quality requirements.
[0069] Example 2
[0070] Based on the above embodiments, this invention provides a method for finding the optimal deployment method using the IDA* algorithm, specifically including the following steps:
[0071] S201: Construct the energy consumption estimation function, as shown in formula (1):
[0072] f(PM i ) = g(PM i )+h(PM i (1)
[0073] Wherein, f(PM) i ) indicates selecting PM i Energy consumption during deployment, g(PM) i () indicates the selection of the physical machine PM i The total energy consumption generated by previously deployed virtual machines; h(PM) i () indicates the selection of the physical machine PM i Then, the total energy consumption generated by deploying all the remaining virtual machines;
[0074] S202: Based on the energy consumption estimation function, the IDA* algorithm is used to construct a physical machine subgraph corresponding to each physical machine, starting with each physical machine under normal load.
[0075] Step A1: Set the physical machine set PM = {PM1, PM2, ..., PM2} N Select a physical machine (PM) from the set of physical machines. j The physical machine PM j Add it as the first vertex to the physical machine subgraph to be created, j = 1, 2, ..., N;
[0076] Step A2: Select a virtual machine from the set of virtual machines to be migrated and deploy it on the currently selected physical machine, and delete the deployed virtual machine from the set of virtual machines to be migrated;
[0077] Step A3: Repeat step A2 until the capacity of the currently selected physical machine is exhausted;
[0078] Specifically, each physical machine is configured to display its own capacity, and each virtual machine carries its own required capacity (e.g., including CPU, memory, disk, and I / O bandwidth). As one possible implementation, during the iteration process of step S202, the selection rule for virtual machines is: prioritize the virtual machine with the largest communication traffic to the virtual machines already deployed on the current physical machine.
[0079] For example, suppose we first select a VM from the set VM. k Placed on physical machine v, if physical machine v still has remaining capacity, then select another virtual machine (VM) to work with. k The virtual machine with the highest communication traffic between the first two virtual machines is placed on physical machine v. If physical machine v still has remaining capacity, a virtual machine with the highest communication traffic between it and the first two virtual machines is selected and placed on v, and so on. This process continues until the capacity of physical machine v is exhausted or all M virtual machines have been allocated.
[0080] It should be noted that the communication traffic between virtual machines can be pre-acquired and stored in the form of a traffic matrix. For example, consider the following application scenario: within a given time period, a data center receives a set of application requests A. This set of requests A is encapsulated into M virtual machines using virtualization technology. Each request typically requires one or more virtual machines to communicate with each other. Therefore, a communication traffic matrix between virtual machines can be created based on the traffic information of user requests.
[0081] Step A4: If there are still undeployed virtual machines in the set of virtual machines to be migrated, calculate the energy consumption value of each of the remaining physical machines in the physical machine set according to the constructed energy consumption estimation function;
[0082] Step A5: Select the physics machine with the lowest energy consumption as a vertex and add it to the subgraph of the physics machine to be created;
[0083] Step A6: Repeat steps A2 to A5 until the set of virtual machines to be migrated is empty. The physical machine subgraph at this point is the physical machine PM. j The corresponding physical machine diagram.
[0084] Thus, in step S202, a total of N virtual machine subgraphs were created. It should be noted that, to further reduce energy consumption, decrease the number of iterations, and shorten the response time for virtual machine placement, an energy consumption threshold can be preset. Thus, when the physical machine PM... j If the total energy consumption of the corresponding physical subgraph exceeds the energy consumption threshold, a rollback operation will be performed, and the creation of the physical subgraph will be abandoned.
[0085] Furthermore, the energy consumption threshold can be determined as follows: run a cloud task with the correct resource requests using the classic boxed placement method, set the virtual machine migration cycle to 5 minutes, run for a total of 24 hours, repeat the run 5 times within a week, record the energy consumption generated each day, and take the average value as the energy consumption threshold.
[0086] S203: Starting with each virtual machine to be migrated, construct a virtual machine subgraph corresponding to each virtual machine;
[0087] Step B1: Define the set of virtual machines to be migrated: VM = {VM1, VM2, ..., VM...} M Select a virtual machine (VM) from the set of VMs to be migrated. k The virtual machine VM k Add it as the first vertex to the subgraph of the virtual machine to be created, k = 1, 2, ..., M;
[0088] Step B2: Select a physical machine from the physical machine set PM, and install the virtual machine VM. k Deployed on this physical machine;
[0089] Step B3: Select a virtual machine from the set of virtual machines to be migrated that has the highest communication traffic with the virtual machines already deployed on the physical machine, continue to deploy it on the physical machine, and add the virtual machine with the highest communication traffic as a vertex to the subgraph of virtual machines to be created;
[0090] Step B4: Repeat step B3 until the physical machine's capacity is exhausted. The resulting virtual machine subgraph is the virtual machine VM. k The corresponding virtual machine subgraph.
[0091] Thus, in step S203, a total of M virtual machine subgraphs were created.
[0092] As can be seen from the above, a total of M SubGVMs and N SubGPMs were created in this embodiment, which resulted in M×N placement scenarios. The scenario with the lowest energy consumption was selected for virtual machine placement.
[0093] The embodiments of the present invention select the one with the smallest f(PM) i Vertices with the lowest energy consumption are added to the SubGPM. When constructing the SubGPM, only the physical machine subgraph with the lowest overall energy consumption is selected as the final placement subgraph; other physical machine subgraphs are not considered for placement. Based on the IDA* algorithm's optimization pruning concept, given an energy consumption threshold, if the overall energy consumption of the SubGPM exceeds this threshold during construction, a rollback operation is performed, and the creation of that subgraph is abandoned. This significantly reduces the number of iterations and shortens the response time for virtual machine placement.
[0094] Example 3
[0095] Based on the above embodiments, in this embodiment, in terms of energy consumption, both types of energy consumption are considered: physical machine energy consumption generated by the physical machines in the data center providing services to virtual machines and the large amount of network energy consumption generated by communication between virtual machines.
[0096] As one possible implementation method, g(PM) is calculated according to formula (2). i ):
[0097] g(PM i ) = SubGEC before +PMEC i +NETEC i (2)
[0098] Among them, SubGEC before This indicates adding PM i Previously, the physical machine power consumption and network power consumption of the physical machines in the physical machine subgraph due to the placement of virtual machines were measured by PMEC. i Indicates adding PM i The physical power consumption of placing virtual machines, NETEC i This indicates that PM has been added to the physical machine sub-diagram. i The resulting network energy consumption.
[0099] Calculate h(PM) according to formula (3) i ):
[0100] h(PM i ) = PV·PMEC average +PE·NETEC average (3)
[0101] Where PV and PE represent the addition of PM, respectively. i Afterwards, the number of vertices and edges that need to be added to the physical subgraph and generated will be determined by PMEC. average It is the average physical power consumption, NETEC average It is the average value of network energy consumption.
[0102] Furthermore, since the physical machine's power consumption mainly comes from the CPU, only the CPU's power consumption is considered in the physical machine power consumption calculation in this embodiment. Specifically, PMEC is calculated according to formulas (4) and (5). i :
[0103]
[0104] in,
[0105] in, Indicates PMi Because of running VM k The energy consumption generated Indicates VM k CPU load, Indicates PM i Processing capacity This represents the increase in energy consumption when the CPU is fully loaded. Indicates VM k Was it placed in PM? i If yes, the value is 1; otherwise, it is 0.
[0106] It should be noted that, under normal circumstances, the energy consumption of an idle physical machine accounts for 70% of its maximum energy consumption. Therefore, this embodiment of the invention considers the energy consumption of the physical machine in sleep mode and active mode separately. For example, if PM i When the device is in sleep mode, waking up the PM needs to be considered when calculating the energy consumption of the first virtual machine placed on it. i and PM i The energy consumption during sleep mode is calculated as follows:
[0107]
[0108] in, Indicates PM i The energy consumption required to switch from sleep mode to active mode Indicates PM i Energy consumption during sleep mode Indicates PM i Whether the device is in sleep mode; if yes, the value is 1; otherwise, it is 0. That is, when... When it is 0, it means PM i In active mode, when placing virtual machines, you only need to consider the energy consumption generated by running the virtual machines placed on it (i.e., That's all.
[0109] Network energy consumption mainly comes from routers and switches. Specifically, NETEC is calculated according to formulas (7) and (8). i :
[0110]
[0111] in,
[0112] Wherein, SubGPM is the physical machine subgraph, NETEC ij Indicates PM i and PM j Network energy consumption during data transmission σ represents the energy consumption of transmitting a data packet. ij This indicates that the collection of VMs is deployed in PM i and PM j The total number of data packets that the virtual machines on the platform need to transmit (which can be obtained from the communication matrix between virtual machines, as shown in formula (9)), if PM i and PM j If there is no data transmission, then NETEC ij It is 0.
[0113]
[0114] Among them, TR ab Indicates VM a and VM b The total number of data packets that need to be transmitted between them.
[0115] Furthermore, it can be calculated according to formulas (10) and (11).
[0116]
[0117]
[0118] in, This indicates that the data packet was assigned to PM. i and PM j Between the first On this path, BEC pkt This represents the energy consumption of forwarding element B when forwarding a data packet. Data centers are typically equipped with parallel links and additional bandwidth for fault tolerance and high traffic loads, and in most cases operate far below their capacity. Therefore, we assume that there is a path between each pair of physical machines that meets their needs.
[0119] The energy consumption calculation for forwarding element B when forwarding data packets is similar to that of a physical machine, also taking into account its sleep and active modes. In active mode, it only consumes the constant energy generated by forwarding data packets; in sleep mode, it consumes the energy needed to wake up element B and the additional energy generated during element B's standby period. The calculation method is as follows:
[0120] BEC pkt =(BEC) w +BEC d )·B s +EC byte ·L (12)
[0121] Among them, BEC w BEC represents the energy consumption generated by waking up forwarding element B. dThis represents the energy consumption of forwarding element B during standby. When the forwarding element is in sleep mode, B... s The value is 1 if it is positive and 0 otherwise. EC byte This represents the energy consumption per byte of data, where L represents the byte length.
[0122] Furthermore, assuming there is a path between each pair of physical machines, if the physical machine subgraph adds PM... i If there were x vertices previously, add vertex PM. i This will generate x new edges. At this point, the number of vertices in the physics subgraph is x+1. If more vertices are added, x+1, x+2,... new edges will be generated. If PM is added... i Then, PV more vertices need to be added, so the calculation of PV and PE is as follows:
[0123]
[0124]
[0125] Where M represents the total number of virtual machines in the set of virtual machines to be migrated, and VM allocated This indicates the number of virtual machines currently deployed. Indicates adding PM i The number of virtual machines that can be allocated, V average This represents the average capacity of all vertices in the physical machine subgraph.
[0126] Furthermore, NETEC is calculated by determining the ratio of total network energy consumption to the number of edges in SubGPM so far. average However, when selecting a second vertex, i.e., when there is only one vertex in the SubGPM, it is impossible to calculate the average network energy consumption in the physical machine subgraph. In this case, this embodiment can calculate the average network energy consumption between the first vertex and all other vertices. Based on the above considerations, NETEC average The specific calculation formula is as follows:
[0127]
[0128] Where x represents adding PM i Previously, the number of vertices already present in the physical subgraph.
[0129] Based on the various energy consumption calculation methods described above, formulas (16) and (17) are used to calculate the physical energy consumption of various deployment methods. and network energy consumption The sum of the two is the energy consumption value EC for this deployment method. SubGPM As shown in formula (18). The specific calculation formula is as follows:
[0130] Physical energy consumption calculation:
[0131]
[0132] Where PMEC represents the total energy consumption of the physical machines, and PUE represents the energy efficiency of the selected data center (expressed as the ratio of the total power consumed by IT equipment to the total power consumed by the DC). i Indicates the physical machine PM i The energy consumption generated by running virtual machines placed on it, Select i Indicates whether any virtual machines in the VM set are placed in PM. i If it exists, the value is 1; otherwise, it is 0.
[0133] Network energy consumption calculation:
[0134]
[0135]
[0136] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A virtual machine migration method based on prediction and global optimality pruning, characterized in that, include: Step 1: Periodically check the overload or underload status of all physical machines in the data center and generate a set of physical machines (PM) with normal load. Step 2: Select the virtual machines to be migrated from overloaded or underloaded physical machines to generate a set of virtual machines to be migrated (VMs); Step 3: Construct an energy consumption estimation function, and based on this function, use the IDA* algorithm to build a physical machine subgraph for each physical machine under normal load; and a virtual machine subgraph for each virtual machine to be migrated. Each combination of a physical machine subgraph and a virtual machine subgraph corresponds to a deployment method. Specifically, this includes: Step A1: Set the physical machine set PM = {PM1, PM2, ..., PM} N Select a physical machine PM from the set of physical machines. j The physical machine PM j Add it as the first vertex to the physical machine subgraph to be created, j=1,2, …,N; Step A2: Select a virtual machine from the set of virtual machines to be migrated and deploy it on the currently selected physical machine, and delete the deployed virtual machine from the set of virtual machines to be migrated; Step A3: Repeat step A2 until the capacity of the currently selected physical machine is exhausted; Step A4: If there are still undeployed virtual machines in the set of virtual machines to be migrated, calculate the energy consumption value of each of the remaining physical machines in the physical machine set according to the constructed energy consumption estimation function; Step A5: Select the physics machine with the lowest energy consumption as a vertex and add it to the subgraph of the physics machine to be created; Step A6: Repeat steps A2 to A5 until the set of virtual machines to be migrated is empty. The physical machine subgraph at this point is the physical machine PM. j Corresponding physical machine diagram; The energy consumption estimation function is: (1) in, Indicates selection Energy consumption during deployment Indicates the selection of physical machine The total energy consumption generated by previously deployed virtual machines; Indicates the selection of physical machine Then, the total energy consumption generated by deploying all the remaining virtual machines; Step 4: Calculate the energy consumption of all deployment methods and select the deployment method with the lowest energy consumption for virtual machine deployment.
2. The virtual machine migration method based on prediction and global optimality pruning according to claim 1, characterized in that, Step 3 also includes: Step B1: Define the set of virtual machines to be migrated: VM = {VM1, VM2, ..., VM...} M Select a virtual machine (VM) from the set of VMs to be migrated. k The virtual machine VM k Add it as the first vertex to the subgraph of the virtual machine to be created, k=1,2, …,M; Step B2: Select a physical machine from the set of physical machines and install the virtual machine VM. k Deployed on this physical machine; Step B3: Select a virtual machine from the set of virtual machines to be migrated that has the highest communication traffic with the virtual machines already deployed on the physical machine, continue to deploy it on the physical machine, and add the virtual machine with the highest communication traffic as a vertex to the subgraph of virtual machines to be created; Step B4: Repeat step B3 until the physical machine's capacity is exhausted. The resulting virtual machine subgraph is the virtual machine VM. k The corresponding virtual machine subgraph.
3. The virtual machine migration method based on prediction and global optimality pruning according to claim 1, characterized in that, Calculate according to formula (2) : (2) in, Indicates adding Previously, the physical machines in the physical machine subgraph consumed physical and network power due to the virtual machines they housed. Indicates adding The physical power consumption generated by placing virtual machines. Indicates the addition of physical machine subgraphs The resulting network energy consumption.
4. The virtual machine migration method based on prediction and global optimality pruning according to claim 1, characterized in that, Calculate according to formula (3) : (3) in, and These respectively indicate adding Then, the number of vertices and edges that need to be added to the physical subgraph and generated are as follows. It is the average value of physical energy consumption. It is the average value of network energy consumption.
5. A virtual machine migration method based on prediction and global optimality pruning according to claim 3 or 4, characterized in that, Calculate according to formulas (4) and (5) : (4) in, (5) in, express Due to operation The energy consumption generated express CPU load, express Processing capacity This represents the increase in energy consumption when the CPU is fully loaded. express Whether it was placed If yes, the value is 1; otherwise, it is 0. Calculate according to formulas (7) and (8) : (7) in, (8) Wherein, SubGPM is the physical machine subgraph. express and Network energy consumption during data transmission This represents the energy consumption of transmitting a data packet. Indicates that the collection of VMs is deployed in and The total number of data packets that the virtual machine on the platform needs to transmit, if and If there is no data transmission, then It is 0.
6. The virtual machine migration method based on prediction and global optimality pruning according to claim 5, characterized in that, Calculate according to formulas (9) to (11) and : (9) (10) (11) in, express and The total number of data packets that need to be transmitted between them. This indicates that the data packet was allocated in and Between On the path, This represents the energy consumption generated by forwarding element B when forwarding a data packet.
7. The virtual machine migration method based on prediction and global optimality pruning according to claim 4, characterized in that, Calculate according to formulas (13) and (14) and : (13) (14) in, Indicates adding Previously, the number of vertices already existing in the physical machine subgraph. This represents the total number of virtual machines in the set of virtual machines to be migrated. This indicates the number of virtual machines currently deployed. Indicates adding The number of virtual machines that can be allocated later. This represents the average capacity of all vertices in the physical machine subgraph.
8. The virtual machine migration method based on prediction and global optimality pruning according to claim 5, characterized in that, Calculate according to formula (15) : (15) in, Indicates adding Previously, the number of vertices already present in the physical subgraph.
