CN113778630B - A Virtual Machine Migration Method Based on Genetic Algorithm - Google Patents

A 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
migration
cost
virtual machine
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)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biophysics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Physics & Mathematics (AREA)
  • Molecular Biology (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Physiology (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Biomedical Technology (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Genetics & Genomics (AREA)
  • Stored Programmes (AREA)
  • Computer And Data Communications (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

一种基于遗传算法的虚拟机迁移方法A Virtual Machine Migration Method Based on Genetic Algorithm

技术领域technical field

本发明涉及互联网云计算领域,具体涉及一种基于遗传算法的虚拟机迁移方法。The invention relates to the field of Internet cloud computing, in particular to a genetic algorithm-based virtual machine migration method.

背景技术Background technique

虚拟化已经成为云计算的支撑技术,它能使大量的第三方应用以装入虚拟机的形式来运行。为了降低运行成本,虚拟机可以迁移到其它服务器上运行。虚拟机迁移会带来额外的数据传输开销,再加上原本具有依赖关系的不同虚拟机(例如,一个多层应用由多个虚拟机组成)的网络通信流量,因此,降低网络成本成为虚拟机迁移时考虑的重要目标。Virtualization has become the supporting technology of cloud computing, which enables a large number of third-party applications to run in the form of virtual machines. In order to reduce operating costs, virtual machines can be migrated to other servers to run. Virtual machine migration will bring additional data transmission overhead, plus the network communication traffic of different virtual machines that originally have dependencies (for example, a multi-tier application composed of multiple virtual machines), so reducing network costs becomes virtual machine Important goals to consider when migrating.

虚拟机迁移是NP难问题。目前为止,研究者从迁移成本和通信成本两个角度对VM迁移的成本模型做出了大量研究。Verma等人[1]发现迁移成本与负载无关,只与VM特性有关。迁移成本被估计为因为迁移引起的吞吐量的下降。Liu等人[2]研究了VM迁移的性能开销和能源开销,并通过实验验证了迁移能耗与迁移引起的网络流量的大小成比例。Mann等人[3]提出了一个VM的迁移框架,该框架考虑了数据中心底层的网络拓扑逻辑和VM间的网络通信流量需求。Meng等人[4]提出了一个二层近似算法以解决流量感知的VM映射问题。Jayasinghe等人提出了满足可用性约束和通信约束的VM迁移算法。Shrivastava等人[5]将数据中心形式化为一个考虑了VM间依赖关系和底层网络拓扑结构的模型,并提出一个贪婪算法最小化通信成本。Chen等人[6]提出一个考虑了网络链接和节点负载的算法来改善迁移时的流量负载和资源利用率。目前的研究中,对迁移成本和通信成本是分开研究的,在研究迁移成本时,仅考虑了迁移数据量和传输带宽,没有考虑VM间的依赖关系以及数据中心的拓扑逻辑,导致VM迁移时可能将具有依赖关系的两个VM迁移到相距较远的主机上,从而导致较大的通信成本。Virtual machine migration is an NP-hard problem. So far, researchers have done a lot of research on the cost model of VM migration from the perspectives of migration cost and communication cost. Verma et al. [1] found that the migration cost is independent of load and only related to VM characteristics. Migration cost is estimated as the drop in throughput due to migration. Liu et al. [2] studied the performance overhead and energy overhead of VM migration, and verified that the migration energy consumption is proportional to the size of the network traffic caused by the migration through experiments. Mann et al. [3] proposed a VM migration framework, which considered the underlying network topology logic of the data center and the network communication traffic requirements between VMs. Meng et al. [4] proposed a two-layer approximation algorithm to solve the traffic-aware VM mapping problem. Jayasinghe et al. proposed a VM migration algorithm that satisfies availability constraints and communication constraints. Shrivastava et al. [5] formalized the data center as a model considering the dependencies between VMs and the underlying network topology, and proposed a greedy algorithm to minimize communication costs. Chen et al. [6] proposed an algorithm that considered network links and node loads to improve traffic load and resource utilization during migration. In the current research, the migration cost and communication cost are studied separately. When studying the migration cost, only the migration data volume and transmission bandwidth are considered, and the dependencies between VMs and the topology logic of the data center are not considered. It is possible to migrate two VMs with dependencies to distant hosts, resulting in large communication costs.

本发明提出包括迁移成本和通信成本的VM迁移成本模型,利用遗传算法对VM迁移问题进行求解。The invention proposes a VM migration cost model including migration cost and communication cost, and uses a genetic algorithm to solve the VM migration problem.

参考文献:references:

[1]A.Verma,P.Ahuja,A.Neogi,PMapper:Power and migration cost awareapplication placement in virtualized systems,in:Proc.of the 9th ACM/IFIP/USENIX International Conference on Middleware,Middleware’08,2008,pp.243–264.[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 forlive migration of virtual machines,in:Proc.of the 20th InternationalSymposium on High Performance Distributed Computing,HPDC’11,2011,pp.171–182.[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 VMmobility to reduce network power costs in data centers,in:Proc.of the 10thInternational IFIP TC 6Conference on Networking—Volume Part I,Networking’11,2011,pp.198–211.[3] V.Mann, A.Kumar, P.Dutta, S.Kalyanaraman, VMFlow: Leveraging VMmobility 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 withstructural constraint-aware virtual machine placement,in:Proc.the 8th IEEEInternational Conference on Services Computing,SCC’11,2011,pp.72–79.[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 withstructural constraint-aware virtual machine placement,in:Proc.the 8thIEEE.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 8thIEEE .International Conference on Services Computing, SCC'11, 2011, pp.72–79.

[6]J.Chen,W.Liu,J.Song,Network performance-aware virtual machinemigration in data centers,in:Proc.of the Third International Conference onCloud Computing,GRIDs,Cloud Computing 2012,2012,pp.65–71.[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 .

发明内容Contents of the invention

本发明为了克服现有技术的不足,提出一种基于遗传算法的虚拟机迁移方法,该方法更全面地建模了虚拟机迁移产生的成本;利用遗传算法求解虚拟机迁移问题保证了解的多样性和覆盖性。本发明通过以下技术方案来解决其技术问题:一种基于遗传算法的虚拟机迁移方法,包含以下步骤:In order to overcome the deficiencies of the prior art, the present invention proposes a method for virtual machine migration based on genetic algorithm, which more comprehensively models the cost of virtual machine migration; uses genetic algorithm to solve the problem of virtual machine migration to ensure the diversity of understanding and coverage. The present invention solves its technical problem through the following technical solutions: a virtual machine migration method based on genetic algorithm, comprising the following steps:

(1)初始化主机容量、虚拟机负载需求、主机间距离及虚拟机间依赖;(1) Initialize host capacity, virtual machine load requirements, distance between hosts and dependencies between virtual machines;

(2)初始化种群。种群中的每个解是满足容量约束条件、随机生成的解;计算每个解的成本及种群的总成本,成本包括迁移成本和通信成本,选出该种群的最优解;解的迁移成本可表示为:Cost_Mig=∑i∈Vk∈SSizei×Dlk×Xik,其中,Sizei表示虚拟机i的大小,Dlk表示虚拟机从主机l迁移到主机k的距离,Xik表示虚拟机i迁移到物理机k上;解的通信成本可表示为:其中,Cost(Vi,Sk,Vj,Sl)=Distance(Sk,Sl)×W(Vi,Vj),Distance(Sk,Sl)表示主机Sk与Sl之间的距离,W(Vi,Vj)表示虚拟机Vi与Vj之间的传输流量;(2) Initialize the population. Each solution in the population is a randomly generated solution that satisfies capacity constraints; calculate the cost of each solution and the total cost of the population, the cost includes migration cost and communication cost, and select the optimal solution of the population; the migration cost of the solution It can be expressed as: Cost_Mig=∑ i∈Vk∈S Size i ×D lk ×X ik , where Size i represents the size of virtual machine i, D lk represents the distance of virtual machine migration from host l to host k, and X ik means that virtual machine i is migrated to physical machine k; the communication cost of the solution can be expressed as: Among them, Cost(V i ,S k ,V j ,S l )=Distance(S k ,S l )×W(V i ,V j ), and Distance(S k ,S l ) represents the host S k and S l The distance between, W(V i , V j ) represents the transmission traffic between virtual machines V i and V j ;

(3)进行迭代,如果迭代次数达到指定的最大迭代次数或者最优解在若干代内都得不到改善,则结束迭代。包含以下子步骤:(3) Perform iterations, and if the number of iterations reaches the specified maximum number of iterations or the optimal solution cannot be improved within several generations, the iteration ends. Contains the following substeps:

(3.1)利用轮盘赌选择操作从种群中选出两个解作为父母解;(3.1) Use the roulette selection operation to select two solutions from the population as the parent solutions;

(3.2)以一定的交叉概率对父母解执行双点交叉算子,生成两个孩子解;(3.2) Execute the two-point crossover operator on the parent solution with a certain crossover probability to generate two child solutions;

(3.3)验证交叉操作的有效性,包含以下子步骤:(3.3) Verify the validity of the cross operation, including the following sub-steps:

(3.3.1)孩子解是否满足容量约束条件,如果是,返回孩子解;否则,执行步骤(3.3.2);(3.3.2)重复执行步骤(3.2)-(3.3),直到孩子解是有效解;(3.3.1) Whether the child solution satisfies the capacity constraints, if yes, return the child solution; otherwise, execute step (3.3.2); (3.3.2) repeat steps (3.2)-(3.3) until the child solution is effective solution;

(3.4)以一定的突变概率对孩子解执行位触发突变算子;(3.4) Execute the bit-triggered mutation operator on the child solution with a certain mutation probability;

(3.5)验证突变操作的有效性,包含以下子步骤:(3.5) Verify the validity of the mutation operation, including the following sub-steps:

(3.5.1)孩子解是否满足容量约束条件,如果是,返回孩子解;否则,执行步骤(3.5.2);(3.5.2)重复执行步骤(3.4)-(3.5),直到孩子解是有效解;(3.5.1) Whether the child solution satisfies the capacity constraints, if yes, return the child solution; otherwise, perform step (3.5.2); (3.5.2) repeat steps (3.4)-(3.5) until the child solution is effective solution;

(3.6)重复执行(3.1)-(3.5),直到产生的新一代种群数目达到指定的要求;(3.6) Repeat (3.1)-(3.5) until the number of new generation populations reaches the specified requirements;

(4)计算新种群中每个解的成本及种群的总成本,找出成本最低的解作为本次迭代的最优解;(4) Calculate the cost of each solution in the new population and the total cost of the population, and find the solution with the lowest cost as the optimal solution for this iteration;

(5)如果本次迭代的最优解好于全局最优解,更新全局最优解;(5) If the optimal solution of this iteration is better than the global optimal solution, update the global optimal solution;

(6)重复执行(3)-(5),直到结束条件成立;(6) Repeat (3)-(5) until the end condition is met;

(7)将步骤(5)得到的全局最优解作为最终的虚拟机迁移方案;(7) The global optimal solution obtained in step (5) is used as the final virtual machine migration scheme;

(8)实施虚拟机迁移。按照步骤(7)得到的最优的虚拟机迁移方案,将虚拟机迁移到目标主机;(8) Implement virtual machine migration. Migrate the virtual machine to the target host according to the optimal virtual machine migration scheme obtained in step (7);

在步骤(2)中,种群中的解不是将所有虚拟机映射到主机,而是对那些需要迁移的虚拟机重新分配目标主机,因此缩短了每个染色体(解)的长度;In step (2), the solution in the population does not map all virtual machines to hosts, but reallocates the target hosts for those virtual machines that need to be migrated, thus shortening the length of each chromosome (solution);

在步骤(3.1)中,在[0,1]区间内产生一个均匀分布的伪随机数r,计算每个解的累积概率qi,选择第一个使qi>r的个体i,重复步骤步骤(3.1)两次,共选出两个孩子个体;In step (3.1), generate a uniformly distributed pseudo-random number r in the interval [0, 1], calculate the cumulative probability q i of each solution, select the first individual i whose q i >r, and repeat the steps Step (3.1) is performed twice, and a total of two child individuals are selected;

在步骤(3.2)中,使用双点交叉算子,在相互配对的两个个体编码串中随机设置两个交叉点,交换两个个体在所设定的两个交叉点之间的部分染色体;In step (3.2), use the two-point crossover operator to randomly set two crossover points in the two paired individual code strings, and exchange the partial chromosomes of the two individuals between the two set crossover points;

在步骤(3.4)中,利用位触发变异算子进行变异,在染色体中随机选择一个需要变异的基因,随机生成一个主机号,将该基因变异为新的主机号。In step (3.4), the bit-triggered mutation operator is used to mutate, a gene to be mutated is randomly selected in the chromosome, a host number is randomly generated, and the gene is mutated into a new host number.

附图说明Description of drawings

图1虚拟机迁移算法流程图Figure 1 Virtual machine migration algorithm flow chart

具体实施方式Detailed ways

(1)初始化主机容量、虚拟机负载需求、主机间距离及虚拟机间依赖;(1) Initialize host capacity, virtual machine load requirements, distance between hosts and dependencies between virtual machines;

(2)初始化种群,种群中的每个解是满足容量约束条件、随机生成的解,计算每个解的成本(包括迁移成本和通信成本)及种群的总成本,选出该种群的最优解;解的迁移成本可表示为:Cost_Mig=∑i∈Vk∈SSizei×Dlk×Xik,其中,Sizei表示虚拟机i的大小,Dlk表示虚拟机从主机l迁移到主机k的距离,Xik表示虚拟机i迁移到物理机k上;解的通信成本可表示为:其中,Cost(Vi,Sk,Vj,Sl)=Distance(Sk,Sl)×W(Vi,Vj),Distance(Sk,Sl)表示主机Sk与Sl之间的距离,W(Vi,Vj)表示虚拟机Vi与Vj之间的传输流量;(2) Initialize the population. Each solution in the population is a solution that satisfies the capacity constraints and is randomly generated. Calculate the cost of each solution (including migration cost and communication cost) and the total cost of the population, and select the optimal solution of the population. Solution; the migration cost of the solution can be expressed as: Cost_Mig=∑ i∈Vk∈S Size i ×D lk ×X ik , where Size i represents the size of virtual machine i, and D lk represents the migration of virtual machine from host l to The distance of host k, Xi ik represents the migration of virtual machine i to physical machine k; the communication cost of the solution can be expressed as: Among them, Cost(V i ,S k ,V j ,S l )=Distance(S k ,S l )×W(V i ,V j ), and Distance(S k ,S l ) represents the host S k and S l The distance between, W(V i , V j ) represents the transmission traffic between virtual machines V i and V j ;

(3)进行迭代,如果迭代次数达到指定的最大迭代次数或者最优解在若干代内都得不到改善,则结束迭代。包含以下子步骤:(3) Perform iterations, and if the number of iterations reaches the specified maximum number of iterations or the optimal solution cannot be improved within several generations, the iteration ends. Contains the following substeps:

(3.1)利用轮盘赌选择操作从种群中选出两个解作为父母解;(3.1) Use the roulette selection operation to select two solutions from the population as the parent solutions;

(3.2)以一定的交叉概率对父母解执行双点交叉算子,生成两个孩子解;(3.2) Execute the two-point crossover operator on the parent solution with a certain crossover probability to generate two child solutions;

(3.3)验证交叉操作的有效性,包含以下子步骤:(3.3) Verify the validity of the cross operation, including the following sub-steps:

(3.3.1)孩子解是否满足容量约束条件,如果是,返回孩子解;否则,执行步骤(3.3.2);(3.3.1) Whether the child solution satisfies the capacity constraints, if yes, return the child solution; otherwise, execute step (3.3.2);

(3.3.2)重复执行步骤(3.2)-(3.3),直到孩子解是有效解;(3.3.2) Repeat steps (3.2)-(3.3) until the child solution is a valid solution;

(3.4)以一定的突变概率对孩子解执行位触发突变算子;(3.4) Execute the bit-triggered mutation operator on the child solution with a certain mutation probability;

(3.5)验证突变操作的有效性,包含以下子步骤:(3.5) Verify the validity of the mutation operation, including the following sub-steps:

(3.5.1)孩子解是否满足容量约束条件,如果是,返回孩子解;否则,执行步骤(3.5.2);(3.5.1) Whether the child solution satisfies the capacity constraint condition, if yes, return the child solution; otherwise, execute step (3.5.2);

(3.5.2)重复执行步骤(3.4)-(3.5),直到孩子解是有效解;(3.5.2) Repeat steps (3.4)-(3.5) until the child solution is a valid solution;

(3.6)重复执行(3.1)-(3.5),直到产生的新一代种群数目达到指定的要求;(3.6) Repeat (3.1)-(3.5) until the number of new generation populations reaches the specified requirements;

(4)计算新种群中每个解的成本及种群的总成本,找出成本最低的解作为本次迭代的最优解;(4) Calculate the cost of each solution in the new population and the total cost of the population, and find the solution with the lowest cost as the optimal solution for this iteration;

(5)如果本次迭代的最优解好于全局最优解,更新全局最优解;(5) If the optimal solution of this iteration is better than the global optimal solution, update the global optimal solution;

(6)重复执行(3)-(5),直到结束条件成立;(6) Repeat (3)-(5) until the end condition is met;

(7)将步骤(5)得到的全局最优解作为最终的虚拟机迁移方案;(7) The global optimal solution obtained in step (5) is used as the final virtual machine migration scheme;

(8)实施虚拟机迁移。按照步骤(7)得到的最优的虚拟机迁移方案,将虚拟机迁移到目标主机。(8) Implement virtual machine migration. Migrate the virtual machine to the target host according to the optimal virtual machine migration scheme obtained in 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 A 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 A 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 A 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 A 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 computing 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
Hung et al. Migration-based load balance of virtual machine servers in cloud computing by load prediction using genetic-based methods
Liu et al. Deadline‐constrained coevolutionary genetic algorithm for scientific workflow scheduling in cloud computing
Tao et al. BGM-BLA: a new algorithm for dynamic migration of virtual machines in cloud computing
Yadav et al. MeReg: managing energy‐SLA tradeoff for green mobile cloud computing
CN110058924A (en) A kind of container dispatching method of multiple-objection optimization
Lagwal et al. Load balancing in cloud computing using genetic algorithm
Fu et al. Energy‐Aware VM Initial Placement Strategy Based on BPSO in Cloud Computing
CN110362388A (en) A kind of resource regulating method and device
CN111176784B (en) A virtual machine integration method based on extreme learning machine and ant colony system
Srinadh et al. Implementation of dynamic resource allocation using adaptive fuzzy multi-objective genetic algorithm for IoT based cloud system
CN110362379A (en) Based on the dispatching method of virtual machine for improving ant group algorithm
Bharathi et al. Energy efficient strategy for task allocation and VM placement in cloud environment
CN113132471B (en) Cloud service budget optimization scheduling method, device, equipment and storage medium
CN109683921B (en) Full-process system deployment method based on power system automation operation and maintenance platform
Reddy et al. MACO-MOTS: modified ant colony optimization for multi objective task scheduling in Cloud environment
Kumar Energy efficient resource allocation for cloud computing
Singh et al. Artificial Intelligence Based Virtual Machine Allocation and Migration Policy using Improved MBFD
CN113778630B (en) A Virtual Machine Migration Method Based on Genetic Algorithm
Sharma et al. Virtual machine migration for green cloud computing
CN105843689A (en) Virtual machine deployment method and system
Jayasena et al. Multi-objective energy efficient resource allocation using virus colony search (VCS) algorithm
CN118170492B (en) Enterprise resource management platform based on cloud computing
Kanwal et al. Head node selection algorithm in cloud computing data center
Laalaoui et al. A planning approach for reassigning virtual machines in IaaS clouds
Yan et al. A stochastic virtual machine placement algorithm for energy-efficient cyber-physical cloud systems

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