CN113778630B - Virtual machine migration method based on genetic algorithm - Google Patents

Virtual machine migration method based on genetic algorithm Download PDF

Info

Publication number
CN113778630B
CN113778630B CN202111124366.6A CN202111124366A CN113778630B CN 113778630 B CN113778630 B CN 113778630B CN 202111124366 A CN202111124366 A CN 202111124366A CN 113778630 B CN113778630 B CN 113778630B
Authority
CN
China
Prior art keywords
solution
cost
virtual machine
migration
child
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111124366.6A
Other languages
Chinese (zh)
Other versions
CN113778630A (en
Inventor
刘霞林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian University of Posts and Telecommunications
Original Assignee
Xian University of Posts and Telecommunications
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xian University of Posts and Telecommunications filed Critical Xian University of Posts and Telecommunications
Priority to CN202111124366.6A priority Critical patent/CN113778630B/en
Publication of CN113778630A publication Critical patent/CN113778630A/en
Application granted granted Critical
Publication of CN113778630B publication Critical patent/CN113778630B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/12Computing arrangements based on biological models using genetic models
    • G06N3/126Evolutionary algorithms, e.g. genetic algorithms or genetic programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biophysics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Physiology (AREA)
  • Genetics & Genomics (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Computer And Data Communications (AREA)
  • Stored Programmes (AREA)

Abstract

Virtualization has become a support technology for cloud computing that enables a large number of third party applications to run in the form of loading virtual machines. To reduce the running cost, the virtual machine may be migrated to run on other servers. Virtual machine migration introduces additional data transmission overhead, and in addition, different virtual machines originally having a dependency relationship, therefore, reducing network cost becomes an important target considered in virtual machine migration. In the existing research, for migration cost, only migration data amount and transmission bandwidth are considered, dependency relationship among VMs and topology logic of a data center are not considered, so that two VMs with the dependency relationship may be migrated to a host computer far away from each other during VM migration, thereby generating larger communication cost. The invention provides a VM migration cost model by considering migration cost and communication cost during VM migration, in particular to a virtual machine migration method based on a genetic algorithm, which solves the VM migration problem by using the genetic algorithm. By using a wheel disc selection operator, a double-point crossover operator and a bit trigger mutation operator and determining parameters such as crossover rate, mutation rate and the like through repeated experiments, the method can greatly reduce the cost during VM migration.

Description

Virtual machine migration method based on genetic algorithm
Technical Field
The invention relates to the field of internet cloud computing, in particular to a virtual machine migration method based on a genetic algorithm.
Background
Virtualization has become a support technology for cloud computing that enables a large number of third party applications to run in the form of loading virtual machines. To reduce the running cost, the virtual machine may be migrated to run on other servers. Virtual machine migration introduces additional data transmission overhead, and in addition, network traffic of different virtual machines (e.g., a multi-layer application is composed of multiple virtual machines) that originally have a dependency relationship, so reducing network cost is an important goal considered in virtual machine migration.
Virtual machine migration is an NP-hard problem. So far, researchers have made a great deal of research on cost models of VM migration from both the perspective of migration cost and communication cost. Verma et al [1] found that migration costs were load independent and only related to VM characteristics. Migration costs are estimated as a decrease in throughput due to migration. Liu et al [2] studied the performance overhead and energy overhead of VM migration and experimentally verified that migration energy consumption was proportional to the size of network traffic caused by migration. Mann et al [3] propose a migration framework for VMs that takes into account the underlying network topology logic of the data center and the network traffic demands between VMs. Meng et al [4] propose a two-layer approximation algorithm to solve the flow aware VM mapping problem. Jayasinghe et al propose a VM migration algorithm that satisfies availability constraints and communication constraints. Srivastava et al [5] formalize the data center as a model that takes into account dependencies between VMs and underlying network topology, and propose a greedy algorithm that minimizes communication costs. Chen et al [6] propose an algorithm that considers network links and node loads to improve traffic load and resource utilization at migration. In the current research, the migration cost and the communication cost are separately researched, when the migration cost is researched, only the migration data amount and the transmission bandwidth are considered, the dependence relationship between VMs and the topology logic of a data center are not considered, and when the VM is migrated, two VMs with the dependence relationship may be migrated to a host computer with a far distance, so that the larger communication cost is caused.
The invention provides a VM migration cost model comprising migration cost and communication cost, and solves the VM migration problem by utilizing a genetic algorithm.
Reference is made to:
[1]A.Verma,P.Ahuja,A.Neogi,PMapper:Power and migration cost aware application placement in virtualized systems,in:Proc.of the 9th ACM/IFIP/USENIX International Conference on Middleware,Middleware’08,2008,pp.243–264.
[2]H.Liu,C.Xu,H.Jin,J.Gong,X.Liao,Performance and energy modeling for live migration of virtual machines,in:Proc.of the 20th International Symposium on High Performance Distributed Computing,HPDC’11,2011,pp.171–182.
[3]V.Mann,A.Kumar,P.Dutta,S.Kalyanaraman,VMFlow:Leveraging VM mobility to reduce network power costs in data centers,in:Proc.of the 10th International IFIP TC 6Conference on Networking—Volume Part I,Networking’11,2011,pp.198–211.
[4]D.Jayasinghe,C.Pu,T.Eilam,M.Steinder,I.Whalley,E.C.Snible,Improving performance and availability of services hosted on IaaS clouds with structural constraint-aware virtual machine placement,in:Proc.the 8th IEEE International Conference on Services Computing,SCC’11,2011,pp.72–79.
[5]D.Jayasinghe,C.Pu,T.Eilam,M.Steinder,I.Whalley,E.C.Snible,Improving performance and availability of services hosted on IaaS clouds with structural constraint-aware virtual machine placement,in:Proc.the 8th IEEE.International Conference on Services Computing,SCC’11,2011,pp.72–79.
[6]J.Chen,W.Liu,J.Song,Network performance-aware virtual machine migration in data centers,in:Proc.of the Third International Conference on Cloud Computing,GRIDs,Cloud Computing 2012,2012,pp.65–71.
disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a virtual machine migration method based on a genetic algorithm, which models the cost generated by virtual machine migration more comprehensively; and solving the migration problem of the virtual machine by using a genetic algorithm to ensure the diversity and coverage of the knowledge. The invention solves the technical problems by the following technical proposal: a virtual machine migration method based on a genetic algorithm comprises the following steps:
(1) Initializing host capacity, virtual machine load requirements, inter-host distance and inter-virtual machine dependence;
(2) Initializing a population. Each solution in the population is a randomly generated solution that satisfies the capacity constraint; calculating the cost of each solution and the total cost of the population, wherein the cost comprises migration cost and communication cost, and selecting the optimal solution of the population; the migration cost of a solution can be expressed as: cost_mig= Σ i∈Vk∈S Size i ×D lk ×X ik Wherein Size is i Representing the size of virtual machine i, D lk Representing the distance, X, that a virtual machine migrates from host l to host k ik Representing that the virtual machine i is migrated to the physical machine k; the communication cost of the solution can be expressed as:wherein Cost (V i ,S k ,V j ,S l )=Distance(S k ,S l )×W(V i ,V j ),Distance(S k ,S l ) Representing a host S k And S is equal to l Distance between each other, W (V i ,V j ) Representing virtual machine V i And V is equal to j Transmission flow between them;
(3) And (3) carrying out iteration, and ending the iteration if the iteration number reaches the specified maximum iteration number or the optimal solution cannot be improved in a plurality of generations. Comprises the following substeps:
(3.1) selecting two solutions from the population as parent solutions using a roulette selection operation;
(3.2) executing a double-point crossover operator on the parent solution with a certain crossover probability to generate two child solutions;
(3.3) verifying the validity of the interleaving operation, comprising the sub-steps of:
(3.3.1) if the child solution meets the capacity constraint condition, if so, returning the child solution; otherwise, executing the step (3.3.2); (3.3.2) repeatedly performing the steps (3.2) - (3.3) until the child solution is a valid solution;
(3.4) performing a position trigger mutation operator on the child solution with a certain mutation probability;
(3.5) verifying the effectiveness of the mutation operation, comprising the sub-steps of:
(3.5.1) if the child solution meets the capacity constraint condition, if so, returning the child solution; otherwise, executing the step (3.5.2); (3.5.2) repeatedly performing the steps (3.4) - (3.5) until the child solution is a valid solution;
(3.6) repeatedly performing (3.1) - (3.5) until the number of new generation populations generated reaches the specified requirement;
(4) Calculating the cost of each solution in the new population and the total cost of the population, and finding out the solution with the lowest cost as the optimal solution of the iteration;
(5) If the optimal solution of the iteration is better than the global optimal solution, updating the global optimal solution;
(6) Repeating (3) - (5) until the end condition is met;
(7) Taking the global optimal solution obtained in the step (5) as a final virtual machine migration scheme;
(8) Virtual machine migration is implemented. Migrating the virtual machine to a target host according to the optimal virtual machine migration scheme obtained in the step (7);
in step (2), the solutions in the population do not map all virtual machines to hosts, but instead reassign target hosts to those virtual machines that need to be migrated, thus shortening the length of each chromosome (solution);
in step (3.1), at [0,1]A uniformly distributed pseudo-random number r is generated in the interval,calculating the cumulative probability q of each solution i The first is selected to make q i >r, repeating the step (3.1) twice, and selecting two child individuals;
in step (3.2), two cross points are randomly set in two paired individual code strings by using a double-point cross operator, and partial chromosomes of the two individuals between the set two cross points are exchanged;
in step (3.4), mutation is performed by using a bit-triggered mutation operator, a gene to be mutated is randomly selected from the chromosome, a host number is randomly generated, and the gene is mutated into a new host number.
Drawings
FIG. 1 is a flow chart of a migration algorithm for a virtual machine
Detailed Description
(1) Initializing host capacity, virtual machine load requirements, inter-host distance and inter-virtual machine dependence;
(2) Initializing a population, wherein each solution in the population is a solution which meets the capacity constraint condition and is randomly generated, calculating the cost (including migration cost and communication cost) of each solution and the total cost of the population, and selecting the optimal solution of the population; the migration cost of a solution can be expressed as: cost_mig= Σ i∈Vk∈S Size i ×D lk ×X ik Wherein Size is i Representing the size of virtual machine i, D lk Representing the distance, X, that a virtual machine migrates from host l to host k ik Representing that the virtual machine i is migrated to the physical machine k; the communication cost of the solution can be expressed as:wherein Cost (V i ,S k ,V j ,S l )=Distance(S k ,S l )×W(V i ,V j ),Distance(S k ,S l ) Representing a host S k And S is equal to l Distance between each other, W (V i ,V j ) Representing virtual machine V i And V is equal to j Transmission flow between them;
(3) And (3) carrying out iteration, and ending the iteration if the iteration number reaches the specified maximum iteration number or the optimal solution cannot be improved in a plurality of generations. Comprises the following substeps:
(3.1) selecting two solutions from the population as parent solutions using a roulette selection operation;
(3.2) executing a double-point crossover operator on the parent solution with a certain crossover probability to generate two child solutions;
(3.3) verifying the validity of the interleaving operation, comprising the sub-steps of:
(3.3.1) if the child solution meets the capacity constraint condition, if so, returning the child solution; otherwise, executing the step (3.3.2);
(3.3.2) repeatedly performing the steps (3.2) - (3.3) until the child solution is a valid solution;
(3.4) performing a position trigger mutation operator on the child solution with a certain mutation probability;
(3.5) verifying the effectiveness of the mutation operation, comprising the sub-steps of:
(3.5.1) if the child solution meets the capacity constraint condition, if so, returning the child solution; otherwise, executing the step (3.5.2);
(3.5.2) repeatedly performing the steps (3.4) - (3.5) until the child solution is a valid solution;
(3.6) repeatedly performing (3.1) - (3.5) until the number of new generation populations generated reaches the specified requirement;
(4) Calculating the cost of each solution in the new population and the total cost of the population, and finding out the solution with the lowest cost as the optimal solution of the iteration;
(5) If the optimal solution of the iteration is better than the global optimal solution, updating the global optimal solution;
(6) Repeating (3) - (5) until the end condition is met;
(7) Taking the global optimal solution obtained in the step (5) as a final virtual machine migration scheme;
(8) Virtual machine migration is implemented. And (3) migrating the virtual machine to the target host according to the optimal virtual machine migration scheme obtained in the step (7).

Claims (5)

1. The virtual machine migration method based on the genetic algorithm is characterized by comprising the following steps of:
(1) Initializing host capacity, virtual machine load requirements, inter-host distance and inter-virtual machine dependence;
(2) Initializing a population, wherein each solution in the population is a randomly generated solution meeting the capacity constraint condition; calculating the cost of each solution and the total cost of the population, wherein the cost comprises migration cost and communication cost, and selecting the optimal solution of the population; the migration cost of a solution can be expressed as: cost_mig= Σ i∈Vk∈S Size i ×D lk ×X ik Wherein Size is i Representing the size of virtual machine i, D lk Representing the distance, X, that a virtual machine migrates from host l to host k ik Representing that the virtual machine i is migrated to the physical machine k; the communication cost of the solution can be expressed as:wherein Cost (V i ,S k ,V j ,S l )=Distance(S k ,S l )×W(V i ,V j ),Distance(S k ,S l ) Representing a host S k And S is equal to l Distance between each other, W (V i ,V j ) Representing virtual machine V i And V is equal to j Transmission flow between them;
(3) And (3) iterating, wherein if the iteration times reach the specified maximum iteration times or the optimal solution cannot be improved in a plurality of generations, the iteration is ended, and the method comprises the following substeps:
(3.1) selecting two solutions from the population as parent solutions using a roulette selection operator;
(3.2) executing a double-point crossover operator on the parent solution with a certain crossover probability to generate two child solutions;
(3.3) verifying the validity of the interleaving operation, comprising the sub-steps of:
(3.3.1) if the child solution meets the capacity constraint condition, if so, returning the child solution; otherwise, executing the step (3.3.2);
(3.3.2) repeatedly performing the steps (3.2) - (3.3) until the child solution is a valid solution;
(3.4) performing a position trigger mutation operator on the child solution with a certain mutation probability;
(3.5) verifying the effectiveness of the mutation operation, comprising the sub-steps of:
(3.5.1) if the child solution meets the capacity constraint condition, if so, returning the child solution; otherwise, executing the step (3.5.2);
(3.5.2) repeatedly performing the steps (3.4) - (3.5) until the child solution is a valid solution;
(3.6) repeatedly performing (3.1) - (3.5) until the number of new generation populations generated reaches the specified requirement;
(4) Calculating the cost of each solution in the new population and the total cost of the population, and finding out the solution with the lowest cost as the optimal solution of the iteration;
(5) If the optimal solution of the iteration is better than the global optimal solution, updating the global optimal solution;
(6) Repeating (3) - (5) until the end condition is met;
(7) Taking the global optimal solution obtained in the step (5) as a final virtual machine migration scheme;
(8) And (3) implementing virtual machine migration, and migrating the virtual machine to the target host according to the optimal virtual machine migration scheme obtained in the step (7).
2. The method of claim 1, wherein in step (2), the solutions in the population do not map all virtual machines to hosts, but reassign target hosts to those virtual machines that need to be migrated, thus shortening the length of each chromosome (solution).
3. The method of claim 1, wherein in step (3.1), at [0,1]Generating a uniformly distributed pseudo-random number r in the interval, and calculating the cumulative probability q of each solution i The first is selected to make q i >r, repeating the step (3.1) twice, and selecting two child individuals altogether.
4. The virtual machine migration method based on genetic algorithm according to claim 1, wherein in step (3.2), two crossover points are randomly set in two individual code strings paired with each other using a double crossover operator, and partial chromosomes of the two individuals between the set two crossover points are swapped.
5. The method according to claim 1, wherein in step (3.4), mutation is performed by using a bit-triggered mutation operator, a gene to be mutated is randomly selected from the chromosome, a host number is randomly generated, and the gene is mutated into a new host number.
CN202111124366.6A 2021-09-24 2021-09-24 Virtual machine migration method based on genetic algorithm Active CN113778630B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111124366.6A CN113778630B (en) 2021-09-24 2021-09-24 Virtual machine migration method based on genetic algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111124366.6A CN113778630B (en) 2021-09-24 2021-09-24 Virtual machine migration method based on genetic algorithm

Publications (2)

Publication Number Publication Date
CN113778630A CN113778630A (en) 2021-12-10
CN113778630B true CN113778630B (en) 2023-07-18

Family

ID=78853270

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111124366.6A Active CN113778630B (en) 2021-09-24 2021-09-24 Virtual machine migration method based on genetic algorithm

Country Status (1)

Country Link
CN (1) CN113778630B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106201658A (en) * 2016-07-09 2016-12-07 郭笃刚 A kind of migration virtual machine destination host multiple-objection optimization system of selection

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8478878B2 (en) * 2010-03-11 2013-07-02 International Business Machines Corporation Placement of virtual machines based on server cost and network cost
CN102404412B (en) * 2011-12-28 2014-01-08 北京邮电大学 Energy saving method and system for cloud compute data center
CN102984137A (en) * 2012-11-14 2013-03-20 江苏南开之星软件技术有限公司 Multi-target server scheduling method based on multi-target genetic algorithm
US9823842B2 (en) * 2014-05-12 2017-11-21 The Research Foundation For The State University Of New York Gang migration of virtual machines using cluster-wide deduplication

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106201658A (en) * 2016-07-09 2016-12-07 郭笃刚 A kind of migration virtual machine destination host multiple-objection optimization system of selection

Also Published As

Publication number Publication date
CN113778630A (en) 2021-12-10

Similar Documents

Publication Publication Date Title
Tao et al. BGM-BLA: a new algorithm for dynamic migration of virtual machines in cloud computing
Almezeini et al. Task scheduling in cloud computing using lion optimization algorithm
CN108322333B (en) Virtual network function placement method based on genetic algorithm
CN110058924A (en) A kind of container dispatching method of multiple-objection optimization
Lagwal et al. Load balancing in cloud computing using genetic algorithm
CN109447264B (en) Virtual machine placement genetic optimization method based on VHAM-R model in cloud computing environment
Fu et al. Energy‐Aware VM Initial Placement Strategy Based on BPSO in Cloud Computing
Mylavarapu et al. An optimized capacity planning approach for virtual infrastructure exhibiting stochastic workload
Reddy et al. Multi Objective Task Scheduling Using Modified Ant Colony Optimization in Cloud Computing.
Singh et al. Artificial Intelligence Based Virtual Machine Allocation and Migration Policy using Improved MBFD
Emara et al. Genetic-Based Multi-objective Task Scheduling Algorithm in Cloud Computing Environment.
CN113778630B (en) Virtual machine migration method based on genetic algorithm
Amini Motlagh et al. A new reliability‐based task scheduling algorithm in cloud computing
Do Comparison of allocation schemes for virtual machines in energy-aware server farms
Liu et al. [Retracted] Emergency Scheduling Optimization Simulation of Cloud Computing Platform Network Public Resources
Patel et al. Energy efficient genetic algorithm for container consolidation in cloud system
Sharma et al. On demand virtual machine allocation and migration at cloud data center using hybrid of cat swarm optimization and genetic algorithm
Fan et al. Research on improved 2D-BPSO-based VM-container hybrid hierarchical cloud resource scheduling mechanism
Zhang et al. A unified algorithm for virtual desktops placement in distributed cloud computing
Yan et al. A stochastic virtual machine placement algorithm for energy-efficient cyber-physical cloud systems
Tlili et al. Best Fit Decreasing Algorithm for Virtual Machine Placement Modeled as a Bin Packing Problem
He et al. Energy‐Efficient Virtual Network Embedding Algorithm Based on Hopfield Neural Network
Pham et al. A general and practical consolidation framework in CloudNFV
Durairaj et al. Improvised genetic approach for an effective resource allocation in cloud infrastructure
CN109343933B (en) Virtual machine initial placement strategy method based on improved genetic algorithm

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant