CN111324422A - Multi-target virtual machine deployment method, device, equipment and storage medium - Google Patents

Multi-target virtual machine deployment method, device, equipment and storage medium Download PDF

Info

Publication number
CN111324422A
CN111324422A CN202010114159.1A CN202010114159A CN111324422A CN 111324422 A CN111324422 A CN 111324422A CN 202010114159 A CN202010114159 A CN 202010114159A CN 111324422 A CN111324422 A CN 111324422A
Authority
CN
China
Prior art keywords
genetic
chromosome
virtual machine
population
individual
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.)
Granted
Application number
CN202010114159.1A
Other languages
Chinese (zh)
Other versions
CN111324422B (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.)
Wuhan Polytechnic University
Original Assignee
Wuhan Polytechnic University
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 Wuhan Polytechnic University filed Critical Wuhan Polytechnic University
Priority to CN202010114159.1A priority Critical patent/CN111324422B/en
Publication of CN111324422A publication Critical patent/CN111324422A/en
Application granted granted Critical
Publication of CN111324422B publication Critical patent/CN111324422B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • 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
    • 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/45583Memory management, e.g. access or allocation
    • 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

Abstract

The invention relates to the technical field of cloud computing, in particular to a multi-target virtual machine deployment method, device, equipment and storage medium. The method comprises the following steps: acquiring a virtual machine set and a physical host set to be deployed, taking the number of virtual machines corresponding to the virtual machine set as the coding length of each chromosome individual, and establishing a genetic population comprising a plurality of chromosome individuals; carrying out fitness calculation on each chromosome individual in the genetic population; detecting a current genetic generation of the genetic population; when the current genetic generation is equal to the preset genetic generation, the chromosome individual with the maximum current fitness value is used as a target chromosome individual, and the target chromosome individual is decoded to obtain the optimal solution of the deployment of the virtual machine; and deploying the virtual machines in the virtual machine set into the physical hosts of the physical host set according to the optimal solution for deploying the virtual machines. By the method, under the constraint conditions of resource utilization rate and energy consumption, multi-target virtual machine deployment is optimized in a balanced mode, and efficiency and effect of virtual machine deployment are improved.

Description

Multi-target virtual machine deployment method, device, equipment and storage medium
Technical Field
The invention relates to the technical field of cloud computing, in particular to a multi-target virtual machine deployment method, device, equipment and storage medium.
Background
The demand for cloud services is rapidly increasing in size. To meet the increasing demands of users, more and more servers are deployed into data centers. Safe operation of the data center requires more cooling settings to maintain the data center ambient temperature within safe temperatures, which results in more energy consumption and carbon dioxide emissions. The utilization cost of physical resources (including a Central Processing Unit (CPU), a memory and a storage) in the data center is about 15% of the operation cost of the whole data center, but the energy consumption cost is about 45% of the total operation cost. Therefore, the above-mentioned resource utilization and energy consumption factors are key factors for finding the energy-efficient resource allocation of the data center, and are very important for reducing the operation cost of the data center and establishing an absolute data center. Another important factor affecting data centers is low utilization of physical hosts. Research has shown that an idle physical host can still consume more than half the power consumption of a fully loaded host. To improve resource utilization of a host, multiple virtual machines may be deployed on a host using virtualization techniques. The problem of request allocation of a user executing the application to the virtual machine is a joint optimization problem at the moment, modeling can be carried out according to the idea of a boxing problem, namely the boxing problem of boxes with variable dimensions, at the moment, the virtual machine can be regarded as an article, and the physical host can be regarded as a box. The problem of deployment of virtual machines on a host is an NP-hard problem (NP problem, non-deterministic polynomial problem) due to the heterogeneity of virtual machines requesting on resources of different dimensions and the heterogeneity of resources provided by the host itself.
Under the condition of a heterogeneous cloud data center, the problems of resource utilization rate and energy consumption must be considered synchronously when efficient deployment of virtual machines is realized, and synchronous energy consumption reduction cannot be ensured while resource waste is reduced. Therefore, the resource utilization and energy consumption problems in the virtual machine deployment problem must be considered in a balanced manner.
Disclosure of Invention
The invention mainly aims to provide a multi-target virtual machine deployment method, a multi-target virtual machine deployment device, multi-target virtual machine deployment equipment and a multi-target virtual machine deployment storage medium, and aims to solve the technical problem of balanced optimization.
To achieve the above object, the present invention provides a multi-target virtual machine deployment method, including:
acquiring a virtual machine set and a physical host set to be deployed, taking the number of virtual machines corresponding to the virtual machine set as the coding length of chromosome individuals, and establishing a genetic population comprising a plurality of chromosome individuals;
performing fitness calculation on each chromosome individual in the genetic population;
detecting a current genetic generation of the genetic population;
when the current genetic generation is equal to a preset genetic generation, taking the chromosome individual with the maximum current fitness value as a target chromosome individual, and decoding the target chromosome individual to obtain an optimal solution of virtual machine deployment;
deploying the virtual machines in the virtual machine set to the physical hosts of the physical host set according to the optimal solution for deploying the virtual machines.
Preferably, the step of acquiring a virtual machine set to be deployed and a physical host set, taking the number of virtual machines corresponding to the virtual machine set as the coding length of a chromosome individual, and establishing a genetic population including a plurality of chromosome individuals specifically includes:
acquiring the number of physical hosts corresponding to the physical host set and the number of virtual machines corresponding to the virtual machine set;
decoding, as chromosome individuals, deployment solutions of virtual machines in the set of virtual machines to physical hosts of the set of physical hosts;
setting the number of chromosomes according to a preset population scale by taking the number of the virtual machines as the coding length of the chromosome individual;
respectively taking two groups contained in each chromosome individual as a virtual machine group and a physical host group;
setting a gene value range in the virtual machine group according to the number of the virtual machines, and setting a gene value range in the physical host group according to the number of the physical hosts;
and establishing a genetic population according to the chromosome individual number, the coding length and the gene value range.
Preferably, the step of establishing a genetic population according to the chromosome individual number, the coding length and the gene value range specifically comprises:
establishing an unassigned genetic population according to the chromosome individual number and the coding length;
dividing the unassigned genetic population into a first population, a second population and a third population according to preset genetic population dividing conditions;
assigning values to the first population according to a power consumption minimum condition based on the gene value range, assigning values to the second population according to a resource utilization maximum condition based on the gene value range, and randomly assigning values to the third population based on the gene value range;
and constructing the genetic population according to each genetic population after assignment.
Preferably, said step of detecting the current genetic generation of said genetic population is followed by the further step of:
when the current genetic generation is smaller than a preset genetic generation, generating a genetic population of the next generation according to a preset genetic algorithm;
and adding one to the current genetic generation and returning to the step of calculating the fitness of each chromosome individual in the genetic population.
Preferably, the step of generating a genetic population of a next generation according to a preset genetic algorithm when the current genetic generation is smaller than a preset genetic generation specifically includes:
reserving the chromosome individual with the maximum fitness value to the genetic population of the next generation;
calculating the relative fitness of the remaining chromosome individuals in the current genetic population, and performing genetic selection on the remaining chromosome individuals according to the relative fitness calculation result and a roulette strategy;
the individual chromosomes obtained by genetic selection are retained to the genetic population of the next generation to generate the genetic population of the next generation.
Preferably, the step of reserving the individual chromosome obtained by genetic selection to the genetic population of the next generation to generate the genetic population of the next generation further comprises:
obtaining chromosome individuals left after genetic selection according to a preset proportion, and performing genetic crossing on the obtained chromosome individuals; wherein, the chromosome individual before genetic crossing is a parent chromosome, and the chromosome individual after genetic crossing is a child chromosome;
performing fitness calculation on the offspring chromosome to obtain a fitness value;
when the fitness value of the offspring chromosome is greater than the fitness value of the parent chromosome, retaining the offspring chromosome to the genetic population of the next generation to generate the genetic population of the next generation;
and when the fitness value of the offspring chromosome is less than or equal to the fitness value of the parent chromosome, reserving the parent chromosome to the genetic population of the next generation to generate the genetic population of the next generation.
Preferably, the step of reserving the individual chromosome obtained by genetic selection to the genetic population of the next generation to generate the genetic population of the next generation further comprises:
obtaining chromosome individuals left after genetic selection according to a preset proportion, and carrying out genetic variation on the obtained chromosome individuals; wherein, the chromosome individual before genetic variation is a parent chromosome, and the chromosome individual after genetic variation is a child chromosome;
performing fitness calculation on the offspring chromosome to obtain a fitness value;
when the fitness value of the offspring chromosome is greater than the fitness value of the parent chromosome, retaining the offspring chromosome to the genetic population of the next generation to generate the genetic population of the next generation;
and when the fitness value of the offspring chromosome is less than or equal to the fitness value of the parent chromosome, reserving the parent chromosome to the genetic population of the next generation to generate the genetic population of the next generation.
In addition, to achieve the above object, the present invention further provides a multi-target virtual machine deployment apparatus, including: a model establishing module, a fitness calculating module, an optimal solution obtaining module and a deployment module, wherein,
the model establishing module is used for acquiring a virtual machine set and a physical host set to be deployed, taking the number of virtual machines corresponding to the virtual machine set as the coding length of each chromosome individual, and establishing a genetic population containing a plurality of chromosome individuals;
the fitness calculation module is used for calculating the fitness of each chromosome individual in the genetic population; also for detecting a current genetic generation of the genetic population;
the optimal solution acquisition module is used for taking the chromosome individual with the maximum current fitness value as a target chromosome individual and decoding the target chromosome individual to acquire the optimal solution of the deployment of the virtual machine when the current genetic generation is equal to a preset genetic generation;
the deployment module is used for deploying the virtual machines in the virtual machine set to the physical hosts of the physical host set according to the optimal solution for deploying the virtual machines.
In addition, to achieve the above object, the present invention also provides an electronic device, including: a memory, a processor, and a multi-target virtual machine deployment program stored on the memory and executable on the processor, the multi-target virtual machine deployment program configured to implement the steps of the multi-target virtual machine deployment method as described above.
In addition, to achieve the above object, the present invention further provides a storage medium, on which a multi-target virtual machine deployment program is stored, and the multi-target virtual machine deployment program, when executed by a processor, implements the steps of the multi-target virtual machine deployment method as described above.
The method comprises the steps of establishing a genetic population comprising a plurality of chromosome individuals by acquiring a virtual machine set to be deployed and a physical host set and taking the number of virtual machines corresponding to the virtual machine set as the coding length of the chromosome individuals; performing fitness calculation on each chromosome individual in the genetic population; detecting a current genetic generation of the genetic population; when the current genetic generation is equal to a preset genetic generation, taking the chromosome individual with the maximum current fitness value as a target chromosome individual, and decoding the target chromosome individual to obtain an optimal solution of virtual machine deployment; deploying the virtual machines in the virtual machine set to the physical hosts of the physical host set according to the optimal solution for deploying the virtual machines. Under the condition that the resource utilization rate and the energy consumption of the physical host are both constrained, the two are synchronously and uniformly optimized to form multi-target balance optimization of virtual machine deployment, and the efficiency and the effect of the virtual machine deployment are improved.
Drawings
Fig. 1 is a schematic structural diagram of an electronic device in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a first embodiment of a multi-target virtual machine deployment method according to the present invention;
FIG. 3 is a schematic diagram of chromosome coding of a first embodiment of the multi-target virtual machine deployment method of the present invention;
FIG. 4 is a flowchart illustrating a second embodiment of the multi-target virtual machine deployment method of the present invention;
FIG. 5 is a schematic diagram of a single-chromosome crossover operation of a second embodiment of the multi-target virtual machine deployment method of the present invention;
FIG. 6 is a schematic diagram of a two-chromosome crossover operation of a second embodiment of the multi-target virtual machine deployment method of the present invention;
FIG. 7 is a schematic diagram of genetic variations of a second embodiment of the multi-target virtual machine deployment method of the present invention;
fig. 8 is a block diagram of a first embodiment of the multi-target virtual machine deployment apparatus according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an electronic device in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the electronic device may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The Memory 1005 may be a Random Access Memory (RAM) Memory, or may be a Non-Volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration shown in fig. 1 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a storage medium 1005, which may include an operating system, a network communication module, a user interface module, and a multi-target virtual machine deployment program, may be included therein.
In the electronic apparatus shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the electronic device of the present invention may be provided in the electronic device, and the electronic device calls the multi-target virtual machine deployment program stored in the memory 1005 through the processor 1001 and executes the multi-target virtual machine deployment method provided by the embodiment of the present invention.
An embodiment of the present invention provides a multi-target virtual machine deployment method, and referring to fig. 2, fig. 2 is a flowchart illustrating a first embodiment of the multi-target virtual machine deployment method according to the present invention.
In this embodiment, the multi-target virtual machine deployment method includes the following steps:
step S10: the method comprises the steps of obtaining a virtual machine set and a physical host set to be deployed, taking the number of virtual machines corresponding to the virtual machine set as the coding length of chromosome individuals, and establishing a genetic population comprising a plurality of chromosome individuals.
It should be noted that the primary source of energy consumption in a data center, other than the cooling system, is the CPU. The power saving technique of a single CPU is most commonly used as Dynamic Voltage and Frequency Scaling (DVFS). The technology mainly considers two states of the CPU: an idle state and a loaded state. In an idle state (i.e., without any execution load), the internal components of the CPU may be switched to a shutdown mode, thereby reducing the clock frequency of the CPU, which may operate at a minimum operating frequency, thereby saving power consumption. Under the load condition, the power consumption of the CPU depends on the load amount executed on the CPU and the utilization rate of the CPU. Thus, DVFS technology based CPU power savings may enable the CPU to operate in two clock frequency modes (i.e., maximum frequency f)maxAnd minimum frequency fmin) And (4) switching down operation. In the virtual machine deployment problem of this embodiment, it is assumed that all physical hosts are configured with DVFS modules, and let P be configured with DVFS modulesjRepresents a physical host hjThe specific formula of the power consumption is as follows:
Pj=(Pj,max-Pj,idle)×u+Pj,idle
wherein, Pj,maxRepresents a physical host hjThe maximum power consumption of (1), i.e. the power consumption when the physical host is fully loaded, Pj,idleRepresents a physical host hjI.e. the power consumption in the idle state of the physical host, which is typically 70% of the full power consumption, u denotes the physical host hjCPU utilization of. If the CPU utilization is 0 and the physical host can be shut down, the power consumption is 0. The CPU resources of the physical host are comprehensively considered (MIPS (Million instruction execution speed) in terms of millions of instructions per second and single-word length fixed-point instruction average execution speedns Per Second) measurement), memory resource RAM and STOR, host hjResource utilization uj,dIs defined as:
Figure BDA0002390228610000071
Figure BDA0002390228610000072
wherein d represents a resource type, which may include MIPS resources of the CPU, memory resources RAM, and storage resources STOR. r isi,dRepresenting a virtual machine viAmount of requests for resource type d, cj,dIndicates the host hjTotal capability over resource type d, xi,jRepresenting deployment factors, which are binary parameters.
Assuming n existing virtual machines to be deployed in the cloud computing environment, the n existing virtual machines are represented as a virtual machine set V ═ { V ═ V1,v2,...,vnThere may be m physical hosts, which is expressed as a physical host set H ═ H1,h2,...,hm}. The deployment goal of virtual machines is to minimize physical host energy consumption and maximize resource utilization, so the minimum condition of power consumption is expressed as the following formula:
Figure BDA0002390228610000073
the resource utilization maximum condition is expressed as the following equation:
Figure BDA0002390228610000074
it follows that the two goals are conflicting, power consumption needs to be minimized, and resource utilization needs to be maximized. Considering the Euclidean distance between two target functions, and uniformly expressing the Euclidean distance as a minimized target function, the corresponding formula is as follows:
Figure BDA0002390228610000081
the corresponding constraint conditions are as follows in sequence: the constraint condition of the number of processing units indicates that the number of processing units requested by the virtual machine cannot exceed the total number of processing units of the host, and the corresponding formula is as follows:
ri,PE×xi,j≤cj,PE,j=1,2,...,m
the MIPS quantity constraint condition shows that the MIPS quantity requested by the virtual machine cannot exceed the MIPS capacity of the host, and the corresponding formula is as follows:
Figure BDA0002390228610000082
the memory amount constraint condition indicates that the memory amount requested by the virtual machine cannot exceed the memory capacity of the host, and the corresponding formula is as follows:
Figure BDA0002390228610000083
the storage constraint condition indicates that the storage requested by the virtual machine cannot exceed the storage capacity of the host, and the corresponding formula is as follows:
Figure BDA0002390228610000084
wherein r isi,PERepresenting a virtual machine viNumber of processing units requested, cj,PEIndicates the host hjNumber of processing units provided, ri,MIPSRepresenting a virtual machine viNumber of MIPS requested, cj,MIPSIndicates the host hjNumber of MIPS provided, ri,RAMRepresenting a virtual machine viAmount of memory requested, cj,RAMIndicates the host hjAmount of memory provided, ri,STORRepresenting a virtual machine viNumber of stores requested, cj,STORIndicates the host hjThe amount of storage provided.
Step S10 specifically includes: acquiring the number of physical hosts corresponding to the physical host set and the number of virtual machines corresponding to the virtual machine set; decoding, as chromosome individuals, deployment solutions of virtual machines in the set of virtual machines to physical hosts of the set of physical hosts. And setting the number of the chromosomes according to a preset population scale by taking the number of the virtual machines as the coding length of the chromosome individuals. And respectively taking two groups contained in each chromosome individual as a virtual machine group and a physical host group. And setting a gene value range in the virtual machine group according to the number of the virtual machines, and setting a gene value range in the physical host group according to the number of the physical hosts.
It should be noted that two groups represent chromosomes in the virtual machine deployment problem: a virtual cluster group VMlist and a physical host group Hostlist. The VMlist group is used for representing the serial number of the virtual machine to be deployed, the genes on the group are represented by integer real values between 1 and n, n is the number of the virtual machine, and the coding length of the chromosome individual is also n; the Hostlist group is used for representing the host serial number of the corresponding virtual machine, and the value range of the genes on the group is an integer real number value between 1 and m. Coding is carried out according to the subordination relation of the virtual machine, the gene position of the coding represents the serial number of the virtual machine, and the gene value represents a host machine for deploying the virtual machine. The length of the chromosome in the code is fixed, namely the length is the same as the number of the virtual machines to be deployed, so that the chromosome individual evolution can be carried out by adopting a standard genetic operator.
Referring to fig. 3, fig. 3 is a schematic diagram of the chromosome coding of the first embodiment of the multi-target virtual machine deployment method of the present invention, wherein one chromosome represents a virtual machine deployment scenario. The chromosome coding shows that 8 virtual machines to be deployed are deployed on 5 physical hosts, wherein v is a virtual machine1、v5Is deployed at a host h4Upper, virtual machine v2、v4Is deployed at a host h1Upper, virtual machine v3、v7Is deployed at a host h2Upper, virtual machine v6Is deployed at a host h3Upper, virtual machine v8Is deployed at a host h5The above.
And establishing a genetic population according to the chromosome individual number, the coding length and the gene value range, wherein the method specifically comprises the following steps: establishing an unassigned genetic population according to the chromosome individual number and the coding length; dividing the unassigned genetic population into a first population, a second population and a third population according to preset genetic population dividing conditions; assigning values to the first population according to a power consumption minimum condition based on the gene value range, assigning values to the second population according to a resource utilization maximum condition based on the gene value range, and randomly assigning values to the third population based on the gene value range; and constructing the genetic population according to each genetic population after assignment.
It should be noted that the diversity of the initial genetic population greatly affects the performance of the genetic algorithm, and the conventional genetic algorithm mostly generates the initial genetic population in a random manner. In order to improve the initial quality of chromosomes and the evolution convergence speed of chromosome individuals, a formula corresponding to the minimum condition of power consumption is used as a single objective function, namely, the power consumption is minimized as a target, and a virtual machine deployment scheme with one fifth of genetic population scale is generated and used as a part of an initial genetic population; and then, taking a formula corresponding to the maximum condition of resource utilization as a single objective function, namely taking the maximum condition of resource utilization as an objective, and generating a virtual machine deployment scheme with one fifth of the genetic population scale as a part of the initial genetic population. The remaining three fifths of the genetic population was generated in a randomized fashion. The sub-optimal deployment schemes of the two single targets can effectively improve the speed of chromosome evolution and guide chromosome individuals to evolve in an optimal solution.
It is easily understood that the genetic population is divided by one fifth, one fifth and three fifths in the present embodiment, and the ratio can be adjusted according to the actual requirement of the deployment scheme in the specific implementation, which is not limited by the present embodiment.
It should be noted that the step of generating the power consumption minimized virtual machine deployment scenario is performed by an improved descending order best-fit heuristic method based on power consumption. The specific method comprises the following steps: arranging all the virtual machines in a descending order according to the CPU utilization requests of the virtual machines; and sequentially deploying each virtual machine to the host with the highest energy efficiency (the minimum objective function value). Therefore, the host with higher energy efficiency can be preferentially selected, and the heterogeneity of the host resources is fully utilized.
It should be noted that the step of generating the virtual machine deployment scenario with maximized resource utilization rate is performed by a descending optimal adaptation heuristic method based on resource utilization rate. The specific method comprises the following steps: arranging all the virtual machines in a descending order according to the CPU utilization requests of the virtual machines; and sequentially deploying each virtual machine to the host with the highest resource utilization rate (the maximum objective function value). Therefore, the host with higher occupation utilization rate can be preferentially selected, and the idle host is closed, so that the power consumption is saved.
Step S20: and (3) carrying out fitness calculation on each chromosome individual in the genetic population.
It should be noted that, according to the objective function corresponding to the deployment of the virtual machine, the smaller the objective function value is, the larger the individual fitness of the chromosome is. Therefore, a fitness function for evaluating a virtual machine deployment solution represented by the position of the individual chromosome can be set, and the corresponding formula is as follows:
Figure BDA0002390228610000101
if the obtained deployment solution cannot satisfy a certain constraint condition (at least one constraint adjustment), its fitness may be set to 0. Thus, when evaluating the quality of the virtual machine deployment solution represented by a chromosome individual, the final fitness function may be defined as:
Figure BDA0002390228610000102
it is easy to understand that, the larger the fitness value corresponding to a chromosome individual is, the more excellent the virtual machine deployment scheme represented by the chromosome individual is.
Step S30: detecting a current genetic generation of the genetic population.
Step S40: and when the current genetic generation is equal to a preset genetic generation, taking the chromosome individual with the maximum current fitness value as a target chromosome individual, and decoding the target chromosome individual to obtain the optimal solution of the deployment of the virtual machine.
It is easy to understand that the predetermined genetic generation is the largest genetic generation number GEN of the genetic populationmaxStep S40 is for performing a genetic termination judgment. And if the current genetic generation reaches the maximum genetic generation, outputting the chromosome with the highest fitness as a final target chromosome individual, and decoding the final target chromosome individual into the maximum genetic generation number, namely the final virtual machine deployment scheme.
Step S50: deploying the virtual machines in the virtual machine set to the physical hosts of the physical host set according to the optimal solution for deploying the virtual machines.
It is easy to understand that after the optimal solution for virtual machine deployment is obtained, virtual machine deployment can be performed according to the optimal solution, so that reasonable application of physical host resources and energy consumption is realized.
According to the embodiment of the invention, under the condition that the resource utilization rate and the energy consumption of the physical host are both constrained, the physical host and the physical host are synchronously and uniformly optimized to form multi-target balance optimization of virtual machine deployment, so that the efficiency and the effect of the virtual machine deployment are improved.
Referring to fig. 3, fig. 3 is a flowchart illustrating a multi-target virtual machine deployment method according to a second embodiment of the present invention. Based on the first embodiment, the multi-target virtual machine deployment method of the present embodiment further includes, after the step S40:
step S401: and when the current genetic generation is smaller than a preset genetic generation, generating a genetic population of the next generation according to a preset genetic algorithm.
It should be noted that the genetic algorithm includes: genetic selection, genetic crossover, and genetic variation.
Step S401 specifically includes: reserving the chromosome individual with the maximum fitness value to the genetic population of the next generation; calculating the relative fitness of the remaining chromosome individuals in the current genetic population, and performing genetic selection on the remaining chromosome individuals according to the relative fitness calculation result and a roulette strategy; the individual chromosomes obtained by genetic selection are retained to the genetic population of the next generation to generate the genetic population of the next generation.
It should be noted that genetic selection provides a driving force of a genetic algorithm, and if the driving force is too large, offspring are easy to mature early, and the search process is over fast finished; if the driving force is too small, the genetic process cannot converge quickly. The common method is to perform breadth search at the early stage and then perform depth search at the later stage. The goal of genetic selection is to direct a genetic search into a solution space that optimizes an objective function and satisfies constraints. The present embodiment employs a roulette strategy to determine the selection probability of each individual chromosome based on the corresponding proportion of fitness values for the individual chromosome.
It should be noted that the genetic selection process is as follows: the fitness function calculates the fitness of the individual chromosomes of the genetic population, the individual chromosome with the maximum fitness is directly reserved to the genetic population of the next generation, the relative fitness of other individual chromosomes is calculated and is used as the selection probability of the individual chromosome, and the calculation mode of the relative fitness is as follows:
Figure BDA0002390228610000121
wherein the molecule fitness (k) represents the fitness of chromosome k and N represents the genetic population size.
It should be noted that individual chromosomes are selected according to the roulette strategy. Specifically, the disks are divided into N-1 (chromosomes with the highest fitness have been directly retained to the next generation) according to the size of the p (k) value. Obviously, the larger the value of P (k), the larger the sector area it occupies in the disk, and the more likely the pointer will select the individual chromosome when the disk is rotated.
The above genetic selection method uses proportional selection and an optimal preservation strategy in synchronization. The optimal preservation strategy can ensure that the chromosome individuals with high fitness are directly preserved in the next generation, and avoid the chromosome individuals with the highest fitness from participating in genetic crossing and mutation and suffering loss. The proportional selection strategy can ensure that other chromosome individuals have the opportunity to be selected so as to ensure the diversity of genetic populations.
After the step of reserving the individual chromosomes obtained by genetic selection to the genetic population of the next generation to generate the genetic population of the next generation, the method further comprises the following steps: obtaining chromosome individuals left after genetic selection according to a preset proportion, and performing genetic crossing on the obtained chromosome individuals; wherein, the chromosome individual before genetic crossing is a parent chromosome, and the chromosome individual after genetic crossing is an offspring chromosome. And carrying out fitness calculation on the offspring chromosome to obtain a fitness value.
It is easy to understand that the fitness calculation is performed according to the fitness function in the first embodiment, and details thereof are omitted.
And when the fitness value of the offspring chromosome is larger than that of the parent chromosome, reserving the offspring chromosome to the genetic population of the next generation to generate the genetic population of the next generation. And when the fitness value of the offspring chromosome is less than or equal to the fitness value of the parent chromosome, reserving the parent chromosome to the genetic population of the next generation to generate the genetic population of the next generation.
It should be noted that genetic crossover can improve the search performance of the algorithm. This example introduces two genetic crossover operations, single-stain crossover and double-chromosome crossover.
Further, the genetic crossover process of a single chromosome is as follows: for the selected parent chromosome P1 needing crossing, two crossing positions i and j are randomly selected on the chromosome, and the values of the genes indicated by i and j are interchanged to generate a child chromosome C1. Referring to fig. 5, fig. 5 is a schematic diagram of a single-chromosome crossing operation of a second embodiment of the multi-target virtual machine deployment method according to the present invention. In the present embodiment, the selected intersection i is 3 and j is 6.
Further, the genetic crossover process of the double chromosomes is as follows: for two selected parent chromosomes P1 and P2 needing to be crossed, two cross points i and j are randomly selected on the two chromosomes, and the values of the chromosome genes from i to j in the two parent chromosomes are interchanged to generate two child chromosomes C1 and C2. Referring to fig. 6, fig. 6 is a schematic diagram of a two-chromosome crossing operation of a second embodiment of the multi-target virtual machine deployment method of the present invention, where the selected crossing point i is 3 and j is 6.
It is easy to understand that, in order to perform genetic crossover operations, it is necessary to determine whether the two parent chromosomes to be selected are subjected to crossover operations, and the decision is determined by crossover probability. In principle, the greater the crossover probability, the better the chromosomal individual diversity. However, a larger crossover probability also results in the loss of a portion of the better gene; and too small cross probability is not beneficial to generating new chromosome individuals, and the optimizing speed is reduced. Generally, for genetic processes, the evolution process can be divided into an initial state, a sub-mature state, a positive mature state and a mature state. The cross probability should be adaptively adjusted according to different states of the genetic population, and should not be fixed. When the genetic population has more low fitness inferior chromosome individuals, the cross probability should be increased in the initial state; if the span between individual fitness of the genetic population chromosome is too large, the cross probability is increased in the sub-mature and positive mature states; if the genetic population is mostly perfect chromosome individuals with better fitness, the crossing probability should be reduced in the mature state. Based on this consideration, the following adaptive cross probability adjustment formula is designed:
Figure BDA0002390228610000131
wherein, alpha represents a crossover factor, alpha value interval is (0, 1), and represents a random value between (0, 1), probcrossover(k) Representing the crossover probability of chromosome k.
Figure BDA0002390228610000132
Where, fitness (k) represents fitness of chromosome k, and fitness (k, r) represents fitness of chromosome near the r-th fitness of chromosome k.
The decision process whether to perform chromosome crossing operation is as follows: two parent chromosomes are selected using a genetic selection strategy based on a roulette strategy. Generating a random value between (0, 1) for each parent chromosome, and if the random value is smaller than the crossover probability of the parent chromosome, the chromosome can execute genetic crossover operation; otherwise, it is not executed.
After the step of reserving the individual chromosomes obtained by genetic selection to the genetic population of the next generation to generate the genetic population of the next generation, the method further comprises the following steps: obtaining chromosome individuals left after genetic selection according to a preset proportion, and carrying out genetic variation on the obtained chromosome individuals; wherein, the chromosome individual before genetic variation is a parent chromosome, and the chromosome individual after genetic variation is a child chromosome; and carrying out fitness calculation on the offspring chromosome to obtain a fitness value.
It is easy to understand that the fitness calculation is performed according to the fitness function in the first embodiment, and details thereof are omitted.
When the fitness value of the offspring chromosome is greater than the fitness value of the parent chromosome, retaining the offspring chromosome to the genetic population of the next generation to generate the genetic population of the next generation; and when the fitness value of the offspring chromosome is less than or equal to the fitness value of the parent chromosome, reserving the parent chromosome to the genetic population of the next generation to generate the genetic population of the next generation.
It should be noted that, in order to ensure the diversity of the genetic population and avoid the solution process from falling into the local optimum, genetic variation needs to be performed to further expand the search space. The genetic variation process of chromosomes is as follows: for the selected parent chromosome P1 needing mutation, two mutation points i and j are randomly selected on the chromosome, and the chromosome gene values of i and j in the parent chromosome are burst to generate a child chromosome C1. Referring to fig. 7, fig. 7 is a schematic diagram illustrating genetic variations of a second embodiment of the multi-target virtual machine deployment method according to the present invention, where the variation points i are 2 and j is 7.
Further, based on the same consideration as the genetic crossover operation, the following adaptive mutation probability adjustment formula is also designed:
Figure BDA0002390228610000141
wherein β represents a variantThe heterofactor, β, has a value interval of (0, 1), is a randomly generated value, fitness (k) represents fitness of chromosome k, fitness (max) represents maximum fitness in the current genetic population, probmutation(k) Representing the mutation probability of chromosome k.
Further, the decision process of whether to perform chromosome mutation operation is as follows: a parent chromosome is selected using a genetic selection strategy based on a roulette strategy. Generating a random value between (0, 1) for the parent chromosome, and if the random value is less than the mutation probability of the parent chromosome, the chromosome can perform genetic mutation operation; otherwise, it is not executed.
Step S402: incrementing the current genetic generation by one; and returns to step S20.
It is easy to understand that after all the above steps are completed, the genetic population of the next generation is generated, i.e. one genetic behavior is completed, and the current genetic generation number is increased by one. Returning to the step S20 to perform fitness calculation again, and continuing to perform genetic behavior when the current genetic generation does not reach the maximum genetic generation, so as to obtain an optimal deployment scenario.
According to the method, the deployment scheme of the virtual machine is optimized through various genetic algorithms, the scheme that the optimized virtual machine is deployed to the physical host with more balanced resource utilization rate and energy consumption is obtained, and the efficiency and the effect of virtual machine deployment are improved.
Referring to fig. 8, fig. 8 is a block diagram illustrating a first embodiment of a multi-target virtual machine deployment apparatus according to the present invention.
The multi-target virtual machine deployment device comprises: the system comprises a model building module 10, a fitness calculating module 20, an optimal solution obtaining module 30 and a deployment module 40.
It is easy to understand that the present embodiment is based on the virtual machine deployment model of the first embodiment of the multi-target virtual machine deployment method of the present invention.
The model establishing module 10 is configured to acquire a virtual machine set and a physical host set to be deployed, use the number of virtual machines corresponding to the virtual machine set as a coding length of a chromosome individual, and establish a genetic population including a plurality of chromosome individuals.
The model establishing module 10 is specifically configured to obtain the number of physical hosts corresponding to the physical host set and the number of virtual machines corresponding to the virtual machine set; decoding, as chromosome individuals, deployment solutions of virtual machines in the set of virtual machines to physical hosts of the set of physical hosts. And setting the number of the chromosomes according to a preset population scale by taking the number of the virtual machines as the coding length of the chromosome individuals. And respectively taking two groups contained in each chromosome individual as a virtual machine group and a physical host group. And setting a gene value range in the virtual machine group according to the number of the virtual machines, and setting a gene value range in the physical host group according to the number of the physical hosts.
It should be noted that two groups represent chromosomes in the virtual machine deployment problem: a virtual cluster group VMlist and a physical host group Hostlist. The VMlist group is used for representing the serial number of the virtual machine to be deployed, the genes on the group are represented by integer real values between 1 and n, n is the number of the virtual machine, and the coding length of the chromosome individual is also n; the Hostlist group is used for representing the host serial number of the corresponding virtual machine, and the value range of the genes on the group is an integer real number value between 1 and m. Coding is carried out according to the subordination relation of the virtual machine, the gene position of the coding represents the serial number of the virtual machine, and the gene value represents a host machine for deploying the virtual machine. The length of the chromosome in the code is fixed, namely the length is the same as the number of the virtual machines to be deployed, so that the chromosome individual evolution can be carried out by adopting a standard genetic operator.
And establishing a genetic population according to the chromosome individual number, the coding length and the gene value range, wherein the method specifically comprises the following steps: establishing an unassigned genetic population according to the chromosome individual number and the coding length; dividing the unassigned genetic population into a first population, a second population and a third population according to preset genetic population dividing conditions; assigning values to the first population according to a power consumption minimum condition based on the gene value range, assigning values to the second population according to a resource utilization maximum condition based on the gene value range, and randomly assigning values to the third population based on the gene value range; and constructing the genetic population according to each genetic population after assignment.
It should be noted that the diversity of the initial genetic population greatly affects the performance of the genetic algorithm, and the conventional genetic algorithm mostly generates the initial genetic population in a random manner. In order to improve the initial quality of chromosomes and the evolution convergence speed of chromosome individuals, a formula corresponding to the minimum condition of power consumption is used as a single objective function, namely, the power consumption is minimized as a target, and a virtual machine deployment scheme with one fifth of genetic population scale is generated and used as a part of an initial genetic population; and then, taking a formula corresponding to the maximum condition of resource utilization as a single objective function, namely taking the maximum condition of resource utilization as an objective, and generating a virtual machine deployment scheme with one fifth of the genetic population scale as a part of the initial genetic population. The remaining three fifths of the genetic population was generated in a randomized fashion. The sub-optimal deployment schemes of the two single targets can effectively improve the speed of chromosome evolution and guide chromosome individuals to evolve in an optimal solution.
It is easily understood that the genetic population is divided by one fifth, one fifth and three fifths in the present embodiment, and the ratio can be adjusted according to the actual requirement of the deployment scheme in the specific implementation, which is not limited by the present embodiment.
It should be noted that the step of generating the power consumption minimized virtual machine deployment scenario is performed by an improved descending order best-fit heuristic method based on power consumption. The specific method comprises the following steps: arranging all the virtual machines in a descending order according to the CPU utilization requests of the virtual machines; and sequentially deploying each virtual machine to the host with the highest energy efficiency (the minimum objective function value). Therefore, the host with higher energy efficiency can be preferentially selected, and the heterogeneity of the host resources is fully utilized.
It should be noted that the step of generating the virtual machine deployment scenario with maximized resource utilization rate is performed by a descending optimal adaptation heuristic method based on resource utilization rate. The specific method comprises the following steps: arranging all the virtual machines in a descending order according to the CPU utilization requests of the virtual machines; and sequentially deploying each virtual machine to the host with the highest resource utilization rate (the maximum objective function value). Therefore, the host with higher occupation utilization rate can be preferentially selected, and the idle host is closed, so that the power consumption is saved.
The fitness calculation module 20 is configured to perform fitness calculation on each chromosome individual in the genetic population; and also for detecting the current genetic generation of the genetic population.
It should be noted that, according to the objective function corresponding to the deployment of the virtual machine, the smaller the objective function value is, the larger the individual fitness of the chromosome is. Therefore, a fitness function for evaluating a virtual machine deployment solution represented by the position of the individual chromosome can be set, and the corresponding formula is as follows:
Figure BDA0002390228610000171
if the obtained deployment solution cannot satisfy a certain constraint condition (at least one constraint adjustment), its fitness may be set to 0. Thus, when evaluating the quality of the virtual machine deployment solution represented by a chromosome individual, the final fitness function may be defined as:
Figure BDA0002390228610000172
it is easy to understand that, the larger the fitness value corresponding to a chromosome individual is, the more excellent the virtual machine deployment scheme represented by the chromosome individual is.
The optimal solution obtaining module 30 is configured to, when the current genetic generation is equal to a preset genetic generation, take the chromosome individual with the largest current fitness value as a target chromosome individual, and decode the target chromosome individual to obtain an optimal solution for deployment of the virtual machine.
It is easy to understand that the predetermined genetic generation is the largest genetic generation number GEN of the genetic populationmaxThe optimal solution obtaining module 30 is configured to perform genetic termination judgment. And if the current genetic generation reaches the maximum genetic generation, outputting the chromosome with the highest fitness as a final target chromosome individual, and decoding the final target chromosome individual into the maximum genetic generation number, namely the final virtual machine deployment scheme.
The deployment module 40 is configured to deploy the virtual machines in the virtual machine set to the physical hosts of the physical host set according to the optimal solution for deploying the virtual machines.
It is easy to understand that after the optimal solution for virtual machine deployment is obtained, virtual machine deployment can be performed according to the optimal solution, so that reasonable application of physical host resources and energy consumption is realized.
According to the embodiment of the invention, under the condition that the resource utilization rate and the energy consumption of the physical host are both constrained, the physical host and the physical host are synchronously and uniformly optimized to form multi-target balance optimization of virtual machine deployment, so that the efficiency and the effect of the virtual machine deployment are improved.
It should be understood that the above is only an example, and the technical solution of the present invention is not limited in any way, and in a specific application, a person skilled in the art may set the technical solution as needed, and the present invention is not limited thereto.
It should be noted that the above-described work flows are only exemplary, and do not limit the scope of the present invention, and in practical applications, a person skilled in the art may select some or all of them to achieve the purpose of the solution of the embodiment according to actual needs, and the present invention is not limited herein.
In addition, the technical details that are not described in detail in the present embodiment may refer to the multi-target virtual machine deployment method provided in any embodiment of the present invention, and are not described herein again.
Furthermore, it should be noted that, in the present embodiment, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention or portions thereof that contribute to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (e.g. Read Only Memory (ROM)/RAM, magnetic disk, optical disk), and includes several instructions for enabling a terminal device (e.g. a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A multi-target virtual machine deployment method, the method comprising:
acquiring a virtual machine set and a physical host set to be deployed, taking the number of virtual machines corresponding to the virtual machine set as the coding length of chromosome individuals, and establishing a genetic population comprising a plurality of chromosome individuals;
performing fitness calculation on each chromosome individual in the genetic population;
detecting a current genetic generation of the genetic population;
when the current genetic generation is equal to a preset genetic generation, taking the chromosome individual with the maximum current fitness value as a target chromosome individual, and decoding the target chromosome individual to obtain an optimal solution of virtual machine deployment;
deploying the virtual machines in the virtual machine set to the physical hosts of the physical host set according to the optimal solution for deploying the virtual machines.
2. The multi-target virtual machine deployment method according to claim 1, wherein the step of acquiring the virtual machine set and the physical host set to be deployed, and establishing the genetic population including a plurality of chromosome individuals by using the number of virtual machines corresponding to the virtual machine set as the coding length of the chromosome individuals comprises:
acquiring the number of physical hosts corresponding to the physical host set and the number of virtual machines corresponding to the virtual machine set;
decoding, as chromosome individuals, deployment solutions of virtual machines in the set of virtual machines to physical hosts of the set of physical hosts;
setting the number of chromosomes according to a preset population scale by taking the number of the virtual machines as the coding length of the chromosome individual;
respectively taking two groups contained in each chromosome individual as a virtual machine group and a physical host group;
setting a gene value range in the virtual machine group according to the number of the virtual machines, and setting a gene value range in the physical host group according to the number of the physical hosts;
and establishing a genetic population according to the chromosome individual number, the coding length and the gene value range.
3. The multi-target virtual machine deployment method of claim 2, wherein said step of establishing genetic populations based on said individual chromosome number, said coding length and said range of gene values comprises:
establishing an unassigned genetic population according to the chromosome individual number and the coding length;
dividing the unassigned genetic population into a first population, a second population and a third population according to preset genetic population dividing conditions;
assigning values to the first population according to a power consumption minimum condition based on the gene value range, assigning values to the second population according to a resource utilization maximum condition based on the gene value range, and randomly assigning values to the third population based on the gene value range;
and constructing the genetic population according to each genetic population after assignment.
4. The multi-target virtual machine deployment method of claim 3, wherein said step of detecting a current genetic generation of said genetic population is followed by further comprising:
when the current genetic generation is smaller than a preset genetic generation, generating a genetic population of the next generation according to a preset genetic algorithm;
and adding one to the current genetic generation and returning to the step of calculating the fitness of each chromosome individual in the genetic population.
5. The multi-target virtual machine deployment method according to claim 4, wherein said step of generating a genetic population of a next generation according to a predetermined genetic algorithm when said current genetic generation is smaller than a predetermined genetic generation, comprises:
reserving the chromosome individual with the maximum fitness value to the genetic population of the next generation;
calculating the relative fitness of the remaining chromosome individuals in the current genetic population, and performing genetic selection on the remaining chromosome individuals according to the relative fitness calculation result and a roulette strategy;
the individual chromosomes obtained by genetic selection are retained to the genetic population of the next generation to generate the genetic population of the next generation.
6. The multi-target virtual machine deployment method according to claim 5, wherein the step of reserving individual chromosomes obtained by genetic selection to the genetic population of the next generation to generate the genetic population of the next generation is followed by further comprising:
obtaining chromosome individuals left after genetic selection according to a preset proportion, and performing genetic crossing on the obtained chromosome individuals; wherein, the chromosome individual before genetic crossing is a parent chromosome, and the chromosome individual after genetic crossing is a child chromosome;
performing fitness calculation on the offspring chromosome to obtain a fitness value;
when the fitness value of the offspring chromosome is greater than the fitness value of the parent chromosome, retaining the offspring chromosome to the genetic population of the next generation to generate the genetic population of the next generation;
and when the fitness value of the offspring chromosome is less than or equal to the fitness value of the parent chromosome, reserving the parent chromosome to the genetic population of the next generation to generate the genetic population of the next generation.
7. The multi-target virtual machine deployment method according to claim 5, wherein the step of reserving individual chromosomes obtained by genetic selection to the genetic population of the next generation to generate the genetic population of the next generation is followed by further comprising:
obtaining chromosome individuals left after genetic selection according to a preset proportion, and carrying out genetic variation on the obtained chromosome individuals; wherein, the chromosome individual before genetic variation is a parent chromosome, and the chromosome individual after genetic variation is a child chromosome;
performing fitness calculation on the offspring chromosome to obtain a fitness value;
when the fitness value of the offspring chromosome is greater than the fitness value of the parent chromosome, retaining the offspring chromosome to the genetic population of the next generation to generate the genetic population of the next generation;
and when the fitness value of the offspring chromosome is less than or equal to the fitness value of the parent chromosome, reserving the parent chromosome to the genetic population of the next generation to generate the genetic population of the next generation.
8. A multi-target virtual machine deployment apparatus, the apparatus comprising: a model establishing module, a fitness calculating module, an optimal solution obtaining module and a deployment module, wherein,
the model establishing module is used for acquiring a virtual machine set and a physical host set to be deployed, taking the number of virtual machines corresponding to the virtual machine set as the coding length of each chromosome individual, and establishing a genetic population containing a plurality of chromosome individuals;
the fitness calculation module is used for calculating the fitness of each chromosome individual in the genetic population; also for detecting a current genetic generation of the genetic population;
the optimal solution acquisition module is used for taking the chromosome individual with the maximum current fitness value as a target chromosome individual and decoding the target chromosome individual to acquire the optimal solution of the deployment of the virtual machine when the current genetic generation is equal to a preset genetic generation;
the deployment module is used for deploying the virtual machines in the virtual machine set to the physical hosts of the physical host set according to the optimal solution for deploying the virtual machines.
9. An electronic device, characterized in that the electronic device comprises: a memory, a processor, and a multi-target virtual machine deployment program stored on the memory and executable on the processor, the multi-target virtual machine deployment program configured to implement the steps of the multi-target virtual machine deployment method of any one of claims 1-7.
10. A storage medium having stored thereon a multi-target virtual machine deployment program which, when executed by a processor, implements the steps of the multi-target virtual machine deployment method of any one of claims 1 to 7.
CN202010114159.1A 2020-02-24 2020-02-24 Multi-target virtual machine deployment method, device, equipment and storage medium Active CN111324422B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010114159.1A CN111324422B (en) 2020-02-24 2020-02-24 Multi-target virtual machine deployment method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010114159.1A CN111324422B (en) 2020-02-24 2020-02-24 Multi-target virtual machine deployment method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111324422A true CN111324422A (en) 2020-06-23
CN111324422B CN111324422B (en) 2024-04-16

Family

ID=71172866

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010114159.1A Active CN111324422B (en) 2020-02-24 2020-02-24 Multi-target virtual machine deployment method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111324422B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112433807A (en) * 2020-10-19 2021-03-02 暨南大学 Airflow perception type virtual machine scheduling method oriented to data center global energy consumption optimization
CN112463291A (en) * 2020-11-12 2021-03-09 苏州浪潮智能科技有限公司 Virtual machine deployment method, device, equipment and readable storage medium
CN112464309A (en) * 2020-11-24 2021-03-09 中天众达智慧城市科技有限公司 Equipment arrangement method of smart city data center
CN113726462A (en) * 2021-07-30 2021-11-30 浪潮电子信息产业股份有限公司 PCIe virtual channel selection method, device, system and medium
CN112464309B (en) * 2020-11-24 2024-04-30 中天众达智慧城市科技有限公司 Equipment arrangement method for smart city data center

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013150490A1 (en) * 2012-04-05 2013-10-10 Telefonaktiebolaget Lm Ericsson (Publ) Method and device to optimise placement of virtual machines with use of multiple parameters
US20130308570A1 (en) * 2012-05-17 2013-11-21 Beijing University Of Posts And Telecommunications Method for joint optimization of schedule and resource allocation based on the genetic algorithm
CN104811491A (en) * 2015-04-17 2015-07-29 华南理工大学 Cloud computing resource scheduling method based on genetic algorithm
CN105740051A (en) * 2016-01-27 2016-07-06 北京工业大学 Cloud computing resource scheduling realization method based on improved genetic algorithm
CN105843689A (en) * 2016-04-12 2016-08-10 合肥工业大学 Virtual machine deployment method and system
CN106293936A (en) * 2016-07-29 2017-01-04 浪潮(北京)电子信息产业有限公司 A kind of determination method and device of the locally optimal solution of physical host virtual memory
CN108897600A (en) * 2018-06-14 2018-11-27 郑州云海信息技术有限公司 A kind of virtual machine placement method under cloud computing environment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013150490A1 (en) * 2012-04-05 2013-10-10 Telefonaktiebolaget Lm Ericsson (Publ) Method and device to optimise placement of virtual machines with use of multiple parameters
US20130308570A1 (en) * 2012-05-17 2013-11-21 Beijing University Of Posts And Telecommunications Method for joint optimization of schedule and resource allocation based on the genetic algorithm
CN104811491A (en) * 2015-04-17 2015-07-29 华南理工大学 Cloud computing resource scheduling method based on genetic algorithm
CN105740051A (en) * 2016-01-27 2016-07-06 北京工业大学 Cloud computing resource scheduling realization method based on improved genetic algorithm
CN105843689A (en) * 2016-04-12 2016-08-10 合肥工业大学 Virtual machine deployment method and system
CN106293936A (en) * 2016-07-29 2017-01-04 浪潮(北京)电子信息产业有限公司 A kind of determination method and device of the locally optimal solution of physical host virtual memory
CN108897600A (en) * 2018-06-14 2018-11-27 郑州云海信息技术有限公司 A kind of virtual machine placement method under cloud computing environment

Non-Patent Citations (9)

* Cited by examiner, † Cited by third party
Title
孙蒙: "面向绿色云计算的能耗优化策略研究", 中国优秀硕士学位论文全文数据库信息科技辑, 15 February 2018 (2018-02-15), pages 2 - 26 *
宋杰著: "大数据处理平台能耗优化方法的研究", 30 November 2016, 东北大学出版社, pages: 21 - 24 *
文静等: "基于改进的遗传算法的虚拟机部署研究", pages 1291 - 1299 *
杨媛: "基于多目标优化的虚拟机资源调度问题研究", 中国优秀硕士学位论文全文数据库信息科技辑, 15 January 2020 (2020-01-15), pages 7 - 35 *
王宏生等: "项目调度的数学模型与启发式算法", 30 November 2017, 中国矿业大学出版社, pages: 112 - 106 *
胡苗苗: "基于改进遗传算法的虚拟机初始化部署算法研究", pages 12 - 24 *
董浩等: "基于多种群遗传算法的虚拟机优化部署研究", pages 335 - 341 *
赵春等: "基于动态调整阈值的虚拟机迁移算法", 计算机应用, 10 September 2017 (2017-09-10), pages 2547 - 2550 *
黎海雪: "基于多目标蚁群优化的虚拟机放置算法", 计算机与数字工程, 31 December 2018 (2018-12-31), pages 2445 - 2449 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112433807A (en) * 2020-10-19 2021-03-02 暨南大学 Airflow perception type virtual machine scheduling method oriented to data center global energy consumption optimization
CN112463291A (en) * 2020-11-12 2021-03-09 苏州浪潮智能科技有限公司 Virtual machine deployment method, device, equipment and readable storage medium
CN112463291B (en) * 2020-11-12 2023-01-10 苏州浪潮智能科技有限公司 Virtual machine deployment method, device, equipment and readable storage medium
CN112464309A (en) * 2020-11-24 2021-03-09 中天众达智慧城市科技有限公司 Equipment arrangement method of smart city data center
CN112464309B (en) * 2020-11-24 2024-04-30 中天众达智慧城市科技有限公司 Equipment arrangement method for smart city data center
CN113726462A (en) * 2021-07-30 2021-11-30 浪潮电子信息产业股份有限公司 PCIe virtual channel selection method, device, system and medium

Also Published As

Publication number Publication date
CN111324422B (en) 2024-04-16

Similar Documents

Publication Publication Date Title
Chen et al. Energy-efficient offloading for DNN-based smart IoT systems in cloud-edge environments
Li et al. Energy-efficient and quality-aware VM consolidation method
CN111324422A (en) Multi-target virtual machine deployment method, device, equipment and storage medium
Gao et al. Hierarchical multi-agent optimization for resource allocation in cloud computing
Wang et al. A new multi-objective bi-level programming model for energy and locality aware multi-job scheduling in cloud computing
CN111522666B (en) Cloud robot edge computing unloading model and unloading method thereof
Wei et al. Multi-resource balance optimization for virtual machine placement in cloud data centers
Deng et al. A data and task co-scheduling algorithm for scientific cloud workflows
Jamali et al. Improving grouping genetic algorithm for virtual machine placement in cloud data centers
CN111338765B (en) Virtual machine deployment method, device, equipment and storage medium based on cat swarm algorithm
CN114741955A (en) Multi-objective optimization task scheduling method based on security cloud
Madhumala et al. Virtual machine placement using energy efficient particle swarm optimization in cloud datacenter
Zhou et al. Deep reinforcement learning-based algorithms selectors for the resource scheduling in hierarchical cloud computing
Peng et al. Joint optimisation for time consumption and energy consumption of multi‐application and load balancing of cloudlets in mobile edge computing
CN112380016A (en) Cloud computing resource load balancing scheduling method based on improved genetic algorithm and application
CN113504998A (en) Method, device and equipment for determining task scheduling scheme
Vigliotti et al. Energy-efficient virtual machines placement
CN114980216B (en) Dependency task unloading system and method based on mobile edge calculation
Chen et al. A cost minimization data allocation algorithm for dynamic datacenter resizing
CN110908800B (en) Scheduling optimization method based on scheduling entropy in edge cloud collaborative environment
Sahoo et al. MCSA: A multi-constraint scheduling algorithm for real-time task in virtualized cloud
Liu et al. Task scheduling model of edge computing for AI flow computing in Internet of Things
Gong et al. Research and Simulation Implementation of Fog Calculation Resource Allocation Algorithm
CN113254195B (en) Power optimization operation method, terminal device and computer readable storage medium
JP2024040614A (en) Technology to reduce switching time of learning models and networks in deep learning

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