CN109901932A - A kind of Server Consolidation method based on virtual machine - Google Patents

A kind of Server Consolidation method based on virtual machine Download PDF

Info

Publication number
CN109901932A
CN109901932A CN201910185650.0A CN201910185650A CN109901932A CN 109901932 A CN109901932 A CN 109901932A CN 201910185650 A CN201910185650 A CN 201910185650A CN 109901932 A CN109901932 A CN 109901932A
Authority
CN
China
Prior art keywords
server
virtual machine
chromosome
algorithm
cpu
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
CN201910185650.0A
Other languages
Chinese (zh)
Other versions
CN109901932B (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.)
Northeastern University China
Original Assignee
Northeastern University China
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 Northeastern University China filed Critical Northeastern University China
Priority to CN201910185650.0A priority Critical patent/CN109901932B/en
Publication of CN109901932A publication Critical patent/CN109901932A/en
Application granted granted Critical
Publication of CN109901932B publication Critical patent/CN109901932B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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

  • Multi Processors (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The Server Consolidation method based on virtual machine that the invention discloses a kind of, the Server Consolidation method based on virtual machine include the server part integration algorithm based on dynamic threshold and the server overall situation integration algorithm based on genetic algorithm.The present invention is scientific and reasonable, it is safe and convenient to use, pass through part integration and global integration, it can effectively realize according to cloud data center load variation dynamic and carry out the critical function of Server Consolidation, to promote service supporting capacity and O&M efficiency, reduce investment and risk of policy making, achieve the purpose that reduce investment outlay with it is energy saving.The target of the server part integration algorithm of proposition is that the part integration of a small range is carried out to the server in high load state and low load conditions, meets power conservation requirement;The target of server overall situation integration algorithm is to integrate in a wider context to server, operates in virtual machine on server as few as possible while guaranteeing service quality, to promote whole resource utilization and reduce energy consumption.

Description

A kind of Server Consolidation method based on virtual machine
Technical field
The present invention relates to cloud data center Server Consolidation technical field, specially a kind of server based on virtual machine is whole Conjunction method.
Background technique
Although having there is the research in terms of many Server Consolidations at present, and reality is put into there are many method Among the application environment of border, but some shortcomings and shortcoming are remained in current research, such as certain data centers use people Work mode integrates server, causes human cost very high, and is easy to cause response not in time, to influence to service Quality and the final experience of user;Some integration algorithms integrate server using static integrated strategy, and this method is not Timely change can be made according to the real-time requirement of user, thus will cause the waste of the energy;Some integration algorithms only focus on A small number of dimensions of server are integrated, and without accounting for from global angle, thus it is dynamic to meet server well The requirement of state integration, and it is easy to cause the frequent migration of virtual machine, and then cause the decline of migration shake and service quality, institute It is badly in need of a kind of novel server integration method with, people to solve the above problems.
Summary of the invention
The present invention provides a kind of Server Consolidation method based on virtual machine, can effectively solve to mention in above-mentioned background technique Out the problem of.
To achieve the above object, the invention provides the following technical scheme: a kind of Server Consolidation method based on virtual machine, The Server Consolidation method based on virtual machine includes server part integration algorithm based on dynamic threshold and based on heredity The server overall situation integration algorithm of algorithm;
The Server Consolidation method based on virtual machine includes the following steps:
S1, the monitoring information for obtaining server and virtual machine;
S2, data center's overall resource utilization is calculated according to monitoring information;
S3, Server Consolidation algorithm is selected according to data center's overall resource utilization;
The server part integration algorithm based on dynamic threshold includes the following steps:
A1, the high load threshold value of calculation server integration;
A2, Threshold Analysis server load state is carried according to Server Consolidation height;
A3, the server in high load state is filtered out;
A4, the server in low load conditions is filtered out;
A5, server locally integration is carried out based on BFD algorithm;
The server overall situation integration algorithm based on genetic algorithm includes the following steps:
B1, chromosome coding;
B2, initial chromosome coding population is generated;
B3, fitness function setting;
B4, selection operation;
B5, crossover operation;
B6, mutation operation;
B7, stopping criterion for iteration.
According to the above technical scheme, in the step S1 and step S2, according to server monitoring center to server and void Quasi- machine is monitored, and system calculates the utilization of resources of data center's entirety according to the server of acquisition and the monitoring information of virtual machine Rate compares data center's entirety resource utilization and given utilization threshold.
According to the above technical scheme, in the step S3, when data center's entirety resource utilization is normal, selection is based on The server part integration algorithm of dynamic threshold integrates server, gives when data center's entirety resource utilization is less than Utilization threshold when, select the server overall situation integration algorithm based on genetic algorithm server is integrated.
According to the above technical scheme, in the step A1, using the adaptive high threshold decision algorithm K-IQR that carries to server The high threshold value that carries of integration is calculated, comprising the following steps:
(1) cluster behaviour is carried out to data set using K-mediods clustering algorithm method for sorted data set Make, and is divided into 4 parts;
(2) clustered 4 groups of good data are sought with each group of average value respectively, which can preferably react The feature of every group of data value carries out solution quartile to data with interquartile range method;
(3) the parameter SLAT of introducing response service quality judges the service quality of server the past period, SLAT parameter indicates that server cpu busy percentage is more than to account for the ratio of total run time 100% time, because working as server CPU Load will significantly cause the decline of server performance and seriously affect its property for operating above task when being greater than 100% Can, the calculation method of SLAT such as following formula:
Wherein,Indicate server i cpu busy percentage within the previous period be more than 100% cause violation service quality Time,Indicate server i total time active within the previous period;
After above-mentioned steps, high load threshold value T proposed in this paperuIt can be calculated with following formula:
Tu=(1-m*IQR) * (1-SLAT)
The case where above-mentioned threshold calculations formula shows when server load is too low, causes SLAT to violate at this time phase To less, according to the formula then threshold value can increase appropriate to accommodate more loads, and when load too high, can make The case where violating at SLAT is more, then (1-SLAT) can reduce, to reduce high load threshold value, and then reduces the feelings that SLAT is violated Condition, the formula can dynamically adjust high load threshold value in a certain range, and high load threshold value is bigger, and SLAT violation situation is more, but It can reduce that energy consumption is energy saving, although the case where violating SLAT when threshold value is small is less to will cause the larger of energy consumption.
According to the above technical scheme, in described step A2, A3 and A4, according to the current of the server and virtual machine got The threshold value of server is calculated with historic load information, analyzes the state of current slot server, is filtered out and is carried in high The server of state and server in low load conditions.
According to the above technical scheme, in the step A5, integration is obtained using the server part integration algorithm based on BFD Scheme, and execute integration, the local integration algorithm based on BFD the following steps are included:
(1) virtual robot arm to be migrated is subjected to descending arrangement according to the service condition of cpu busy percentage;
(2) the server group that can accommodate the virtual machine is filtered out;
(3) estimation that energy consumption will be carried out between virtual machine and the server that can accommodate it, selects virtual machine moving After moving on to the server, energy consumption increases destination server of the smallest server as migration;
It (4) will be on corresponding virtual machine (vm) migration to destination server according to the Server Consolidation scheme acquired before.
According to the above technical scheme, in the step B1 and B2, comprehensive integration problem is defined as shown by the following formula:
Wherein, Vi CPU、Vi MEMAnd Vi DiskRespectively indicate the CPU of virtual machine i, the loading condition of memory and disk, Pi CPU、 Pj MEMAnd Pj DiskRespectively indicate the CPU of server j, the number of resources of memory and disk, ThCPU、Th MEMAnd Th DiskRespectively indicate service The threshold value of device CPU, memory and disk, it is specified that the sum of all kinds of resources of whole virtual machines run on each server no more than The product of the maximum value that server can be provided and all kinds of resource thresholds to defined, expression formula XijIndicate that can virtual machine i It is integrated on physical server j, XijIt indicates to be placed on server j with virtual machine i when value is 1, value 0 Then indicate cannot, MIN (Nactive) indicate active server minimum number;
Using based on article group coding mode carry out chromosome coding, the generation of the initial chromosome population include with Lower step:
(1) under the premise of a part of chromosome is the cpu resource constraint formulations in meeting comprehensive integration problem defined formula It is random to generate;
(2) virtual machine is taken out at random to the server in overload, until the server reaches load balancing state;
(3) virtual machine thereon is also taken out to the server in low load conditions;
(4) virtual machine being removed is put into remaining at random and can accommodate on the server of the virtual machine.
According to the above technical scheme, in the step B3, under the constraint of cpu resource, use server as few as possible Virtual machine as much as possible is placed, fitness function is as follows:
L (x)=1/C (x)
Wherein, C (x) indicates the length of chromosome x, represents the quantity of the server needed after integration, and value gets over novel Bright required server is fewer, and correspondingly the value of L (x) then can be bigger;
In the step B4, among the process being compared to randomly selected two chromosome, it is possible that suitable The situation that angle value is equal is answered, since the migration of virtual machine can cause the increase of number of processes and I/O number, not only will increase in this way Energy consumption can also be such that the performance of whole system declines, it is therefore necessary to the migration number for reducing virtual machine, by the dyeing of generation The chromosome that body group and currently practical server and virtual machine mapping relations encode compares, and optimum selecting migrates number most Few chromosome enters next round.
According to the above technical scheme, in the step B5, concrete operations the following steps are included:
(1) completely random selects two chromosomes as parent, first compares their fitness values for the two chromosomes Size, the big chromosome of fitness value is as parent x, if fitness value is equal in magnitude, is judged on which chromosome with formula The virtual machine (vm) migration number needed is minimum, and migration that least chromosome of number is as parent x, and in addition item chromosome is father For y;
(2) value of each gene on chromosome y is judged using formula, the maximum gene of selective value is as parent y cross part The content divided is inserted into parent x, and intersection is combined to the virtual robot arm of chromosome, i.e., is inserted into one section of gene from parent y (one group of virtual machine) into parent x, formula is as follows:
Wherein, xjIndicate upper j-th of the server of chromosome x, Vi cpuIndicate the cpu load value size of i-th of virtual machine, Pi cpuThe maximum cpu load value that can be provided for indicating server j, calculates cpu busy percentage on each server, passes through the public affairs Formula indicates the case where cpu resource utilizes on server j;
(3) in parent x obtained in the previous step, certain virtual machines it is possible that twice, delete on parent x be selected Gene has each gene where identical virtual machine;
(4) during the deletion of previous step, some virtual machines be will be deleted, it is therefore desirable to using FF algorithm again by these Deleted virtual machine is inserted into server, in this way the available new child servers of a series of crossover operation.
According to the above technical scheme, in the step B6, gene can be made to send out with the probability of very little by mutation operator Raw simple variation, can make chromosome close towards optimal solution, the change of the server code mode based on group by this method Different to carry out there are two types of mode, one is genes integrally to make a variation, and one gene of deletion is namely deleted whole in parent All virtual robot arms on a server;
Another mode is the variation of a small number of information on gene, deletes some on certain each virtual robot arm or several void Intend machine, the mutation operator in this patent is selected to certain section of gene rather than operated to some point on gene, is assessed on chromosome Each gene point resource utilization the case where, select deletion to be worth the smallest virtual machine, that is, resource utilization is minimum Then virtual machine is deleted, deleted virtual machine is reinserted into server according to FF algorithm, a kind of in this way Variation can be obtained by new son individual, and improve resource utilization;If the virtual machine after deleting can not be inserted into other In chromosome, then the virtual robot arm that other can be inserted is inserted into other genes, and what can not be inserted into still remains in pervious base Because upper;
In the step B7, optimal solution may finally be obtained by above-mentioned operation, but because of the limitation of physical condition, The algorithm unconfined cannot be iterated, and it is necessary to the termination condition of genetic algorithm is arranged.For based on genetic algorithm There are two the termination conditions of Server Consolidation algorithm, and under the premise of meeting constraint formulations, one is the secondary of population iterative evolution Number is more than that certain number meets a kind of any of the above situation and change second is that remaining chromosome reaches certain number in population Dai Douhui is terminated, and still remaining chromosome is required solution after meeting stopping criterion for iteration, each chromosome is exactly A kind of mapping relations of new virtual machine and server.Assess each chromosome generated respectively with current cloud data center The mapping relations of virtual machine and server compare calculating, choose fitness value maximum and migrate that the smallest dye of number Colour solid, the mapping solution as cloud data center Server Consolidation.
Beneficial effects of the present invention: the present invention is scientific and reasonable, safe and convenient to use, passes through the server based on dynamic threshold Local integration algorithm and server overall situation integration algorithm based on genetic algorithm can effectively realize negative according to cloud data center It carries variation dynamic and carries out the critical function of Server Consolidation, promote service supporting capacity and O&M efficiency to reach, reduce and throw Money and risk of policy making are reduced investment outlay and energy saving purpose.The server part integration algorithm of proposition and be based on genetic algorithm The target of global integration algorithm be to be integrated to the server in high load state and low load conditions, guaranteeing service quality While operate in virtual machine on server as few as possible, while as far as possible reduce virtual machine migration number, thus It promotes resource utilization and reduces energy consumption.
Detailed description of the invention
Attached drawing is used to provide further understanding of the present invention, and constitutes part of specification, with reality of the invention It applies example to be used to explain the present invention together, not be construed as limiting the invention.
In the accompanying drawings:
Fig. 1 is flow diagram of the invention;
Fig. 2 is the server part integration algorithm flow diagram the present invention is based on dynamic threshold;
Fig. 3 is the server part integration algorithm energy consumption situation contrast schematic diagram the present invention is based on dynamic threshold;
Fig. 4 is that the present invention is based on the comparisons of the server part integration algorithm virtual machine minimum transition number of dynamic threshold to illustrate Figure;
Fig. 5 is the flow diagram of the server overall situation integration algorithm the present invention is based on genetic algorithm;
Fig. 6 is the server overall situation integration algorithm energy consumption situation contrast schematic diagram the present invention is based on genetic algorithm;
Fig. 7 is that the present invention is based on the comparisons of the server overall situation integration algorithm virtual machine minimum transition number of genetic algorithm to illustrate Figure.
Specific embodiment
Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings, it should be understood that preferred reality described herein Apply example only for the purpose of illustrating and explaining the present invention and is not intended to limit the present invention.
Embodiment 1: as shown in Figure 1, the present invention provides a kind of technical solution, a kind of Server Consolidation side based on virtual machine Method, the Server Consolidation method based on virtual machine are included server part integration algorithm based on dynamic threshold and are calculated based on heredity The server overall situation integration algorithm of method;
Server Consolidation method based on virtual machine includes the following steps:
S1, the monitoring information for obtaining server and virtual machine;
S2, data center's overall resource utilization is calculated according to monitoring information;
S3, Server Consolidation algorithm is selected according to data center's overall resource utilization;
According to the above technical scheme, in step S1 and step S2, according to server monitoring center to server and virtual machine It is monitored, system calculates data center's entirety resource utilization according to the server of acquisition and the monitoring information of virtual machine, will Data center's entirety resource utilization is compared with given utilization threshold.
According to the above technical scheme, in step S3, when data center's entirety resource utilization is normal, selection is based on dynamic The server part integration algorithm of threshold value integrates server, when data center's entirety resource utilization is less than given benefit When with rate threshold value, the server overall situation integration algorithm based on genetic algorithm is selected to integrate server.
Embodiment 2: as in Figure 2-4, the server part integration algorithm based on dynamic threshold includes the following steps:
A1, the high load threshold value of calculation server integration;
A2, Threshold Analysis server load state is carried according to Server Consolidation height;
A3, the server in high load state is filtered out;
A4, the server in low load conditions is filtered out;
A5, server locally integration is carried out based on BFD algorithm.
According to the above technical scheme, in step A1, using the adaptive high threshold decision algorithm K-IQR that carries to Server Consolidation Height carries threshold value and is calculated, comprising the following steps:
(1) cluster behaviour is carried out to data set using K-mediods clustering algorithm method for sorted data set Make, and is divided into 4 groups;
(2) clustered 4 groups of good data are sought with each group of average value respectively, which can preferably react The feature of every group of data value carries out solution quartile to data with interquartile range method;
(3) the parameter SLAT of introducing response service quality judges the service quality of server the past period, SLAT parameter indicates that server cpu busy percentage is more than to account for the ratio of total run time 100% time, because working as server CPU Load will significantly cause the decline of server performance and seriously affect its property for operating above task when being greater than 100% Can, the calculation method of SLAT such as following formula:
Wherein,Indicate server i cpu busy percentage within the previous period be more than 100% cause violation service quality Time,Indicate server i total time active within the previous period;
After above-mentioned steps, high load threshold value T proposed in this paperuIt can be calculated with following formula:
Tu=(1-m*IQR) * (1-SLAT)
The case where above-mentioned threshold calculations formula shows when server load is too low, causes SLAT to violate at this time phase To less, according to the formula then threshold value can increase appropriate to accommodate more loads, and when load too high, can make The case where violating at SLAT is more, then (1-SLAT) can reduce, to reduce high load threshold value, and then reduces the feelings that SLAT is violated Condition, the formula can dynamically adjust high load threshold value in a certain range, and high load threshold value is bigger, and SLAT violation situation is more, but It can reduce that energy consumption is energy saving, although the case where violating SLAT when threshold value is small is less to will cause the larger of energy consumption.
According to the above technical scheme, it step A2, in A3 and A4, according to the current of the server and virtual machine got and goes through History load information calculates the threshold value of server, analyzes the state of current slot server, filters out in high load state Server and server in low load conditions.
According to the above technical scheme, in step A5, integration side is obtained using the server part integration algorithm based on BFD Case, and execute integration, the local integration algorithm based on BFD the following steps are included:
(1) virtual robot arm to be migrated is subjected to descending arrangement according to the service condition of cpu busy percentage;
(2) the server group that can accommodate the virtual machine is filtered out;
(3) estimation that energy consumption will be carried out between virtual machine and the server that can accommodate it, selects virtual machine moving After moving on to the server, energy consumption increases destination server of the smallest server as migration;
It (4) will be on corresponding virtual machine (vm) migration to destination server according to the Server Consolidation scheme acquired before.
Embodiment 3: as illustrated in figs. 5-7, the server overall situation integration algorithm based on genetic algorithm includes the following steps:
B1, chromosome coding;
B2, initial chromosome coding population is generated;
B3, fitness function setting;
B4, selection operation;
B5, crossover operation;
B6, mutation operation;
B7, stopping criterion for iteration.
According to the above technical scheme, in step B1 and B2, comprehensive integration problem is defined as shown by the following formula:
Wherein, Vi CPU、Vi MEMAnd Vi DiskRespectively indicate the CPU of virtual machine i, the loading condition of memory and disk, Pj CPU、 Pj MENAnd Pj DoskRespectively indicate the CPU of server j, the number of resources of memory and disk, ThCPU、Th MEMAnd Th DiskRespectively indicate service The threshold value of device CPU, memory and disk, it is specified that the sum of all kinds of resources of whole virtual machines run on each server no more than The product of the maximum value that server can be provided and all kinds of resource thresholds to defined, expression formula XijIndicate that can virtual machine i It is integrated on physical server j, XijIt indicates to be placed on server j with virtual machine i when value is 1, value 0 Then indicate cannot, MIN (Nactive) indicate active server minimum number;
Chromosome coding is carried out using the coding mode based on article group, the generation of initial chromosome population includes following step It is rapid:
(1) under the premise of a part of chromosome is the cpu resource constraint formulations in meeting comprehensive integration problem defined formula It is random to generate;
(2) virtual machine is taken out at random to the server in overload, until the server reaches load balancing state;
(3) virtual machine thereon is also taken out to the server in low load conditions;
(4) virtual machine being removed is put into remaining at random and can accommodate on the server of the virtual machine.
According to the above technical scheme, in step B3, under the constraint of cpu resource, use server as few as possible is put Virtual machine as much as possible is set, fitness function is as follows:
L (x)=1/C (x)
Wherein, C (x) indicates the length of chromosome x, represents the quantity of the server needed after integration, and value gets over novel Bright required server is fewer, and correspondingly the value of L (x) then can be bigger;
In step B4, among the process being compared to randomly selected two chromosome, it is possible that fitness It is worth equal situation, since the migration of virtual machine can cause the increase of number of processes and I/O number, not only will increase the energy in this way Consumption, can also be such that the performance of whole system declines, it is therefore necessary to the migration number for reducing virtual machine, by the genome of generation The chromosome encoded with currently practical server and virtual machine mapping relations compares, and it is least that optimum selecting migrates number Chromosome enters next round.
According to the above technical scheme, in step B5, concrete operations the following steps are included:
(1) completely random selects two chromosomes as parent, first compares their fitness values for the two chromosomes Size, the big chromosome of fitness value is as parent x, if fitness value is equal in magnitude, is judged on which chromosome with formula The virtual machine (vm) migration number needed is minimum, and migration that least chromosome of number is as parent x, and in addition item chromosome is father For y;
(2) value of each gene on chromosome y is judged using formula, the maximum gene of selective value is as parent y cross part The content divided is inserted into parent x, and intersection is combined to the virtual robot arm of chromosome, i.e., is inserted into one section of gene from parent y (one group of virtual machine) into parent x, formula is as follows:
Wherein, xjIndicate upper j-th of the server of chromosome x, Vi cpuIndicate the cpu load value size of i-th of virtual machine, Pi cpuThe maximum cpu load value that can be provided for indicating server j, calculates cpu busy percentage on each server, passes through the public affairs Formula indicates the case where cpu resource utilizes on server j;
(5) in parent x obtained in the previous step, certain virtual machines it is possible that twice, delete on parent x be selected Gene has each gene where identical virtual machine;
(6) during the deletion of previous step, some virtual machines be will be deleted, it is therefore desirable to using FF algorithm again by these Deleted virtual machine is inserted into server, in this way the available new child servers of a series of crossover operation.
According to the above technical scheme, in step B6, it can make gene that letter occur with the probability of very little by mutation operator Single variation, can make chromosome close towards optimal solution, the variation of the server code mode based on group can by this method To carry out there are two types of in a manner of, one is genes integrally to make a variation, and a gene is deleted in parent and namely deletes entire clothes All virtual robot arms on business device;
Another mode is the variation of a small number of information on gene, deletes some on certain each virtual robot arm or several void Intend machine, the mutation operator in this patent is selected to certain section of gene rather than operated to some point on gene, is assessed on chromosome Each gene point resource utilization the case where, select deletion to be worth the smallest virtual machine, that is, resource utilization is minimum Then virtual machine is deleted, deleted virtual machine is reinserted into server according to FF algorithm, a kind of in this way Variation can be obtained by new son individual, and improve resource utilization;If the virtual machine after deleting can not be inserted into other In chromosome, then the virtual robot arm that other can be inserted is inserted into other genes, and what can not be inserted into still remains in pervious base Because upper;
In step B7, optimal solution may finally be obtained by above-mentioned operation, but because of the limitation of physical condition, the calculation Method unconfined cannot be iterated, and it is necessary to the termination condition of genetic algorithm is arranged.For the service based on genetic algorithm There are two the termination conditions of device integration algorithm, under the premise of meeting constraint formulations, one be population iterative evolution number it is super Certain number is crossed, second is that remaining chromosome reaches certain number in population, meets a kind of any of the above situation iteration all It can terminate, still remaining chromosome is required solution after meeting stopping criterion for iteration, each chromosome is exactly a kind of The mapping relations of new virtual machine and server.It is virtual with current cloud data center respectively to assess each chromosome generated The mapping relations of machine and server compare calculating, choose fitness value maximum and migrate that the smallest dyeing of number Body, the mapping solution as cloud data center Server Consolidation.
Based on above-mentioned, the present invention has the advantages that the present invention is scientific and reasonable, it is safe and convenient to use, by being based on dynamic threshold The server part integration algorithm of value and server overall situation integration algorithm based on genetic algorithm can be effectively realized according to cloud Data center's load variation promotes service supporting capacity and O&M to reach dynamically to carry out the critical function of Server Consolidation Efficiency reduces investment and risk of policy making, reduces investment outlay and energy saving purpose.The mesh of the server part integration algorithm of proposition Mark is that local integration is carried out to the server in high load state and low load conditions, makes virtual machine while guaranteeing service quality It operates on server as few as possible, while the migration number of virtual machine can also be effectively reduced, to promote resource benefit With rate and reduce energy consumption.
Finally, it should be noted that being not intended to restrict the invention the foregoing is merely preferred embodiment of the invention, to the greatest extent Present invention has been described in detail with reference to the aforementioned embodiments for pipe, for those skilled in the art, still can be with It modifies the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features.It is all Within the spirit and principles in the present invention, any modification, equivalent replacement, improvement and so on should be included in guarantor of the invention Within the scope of shield.

Claims (10)

1. a kind of Server Consolidation method based on virtual machine, which is characterized in that the Server Consolidation side based on virtual machine Method includes the server part integration algorithm based on dynamic threshold and the server overall situation integration algorithm based on genetic algorithm;
The Server Consolidation method based on virtual machine includes the following steps:
S1, the monitoring information for obtaining server and virtual machine;
S2, data center's overall resource utilization is calculated according to monitoring information;
S3, Server Consolidation algorithm is selected according to data center's overall resource utilization;
The server part integration algorithm based on dynamic threshold includes the following steps:
A1, the high load threshold value of calculation server integration;
A2, Threshold Analysis server load state is carried according to Server Consolidation height;
A3, the server in high load state is filtered out;
A4, the server in low load conditions is filtered out;
A5, server locally integration is carried out based on BFD algorithm;
The server overall situation integration algorithm based on genetic algorithm includes the following steps:
B1, chromosome coding;
B2, initial chromosome coding population is generated;
B3, fitness function setting;
B4, selection operation;
B5, crossover operation;
B6, mutation operation;
B7, stopping criterion for iteration.
2. a kind of Server Consolidation method based on virtual machine according to claim 1, which is characterized in that the step S1 In step S2, server and virtual machine are monitored according to server monitoring center, system according to the server of acquisition and The monitoring information of virtual machine calculates data center's entirety resource utilization, by data center's entirety resource utilization and given Utilization threshold compares.
3. a kind of Server Consolidation method based on virtual machine according to claim 1, which is characterized in that the step S3 In, when data center's entirety resource utilization is normal, select the server part integration algorithm based on dynamic threshold to service Device is integrated, and when data center's entirety resource utilization is less than given utilization threshold, is selected based on genetic algorithm Server overall situation integration algorithm integrates server.
4. a kind of Server Consolidation method based on virtual machine according to claim 1, which is characterized in that the step A1 In, threshold value is carried to Server Consolidation height using adaptive high load threshold decision algorithm K-IQR and is calculated, comprising the following steps:
(1) cluster operation is carried out to data set using K-mediods clustering algorithm method for sorted data set, and It is divided into 4 groups;
(2) clustered 4 groups of good data are sought with each group of average value respectively, which can preferably react every group The feature of data value carries out solution quartile to data with interquartile range method;
(3) the parameter SLAT of introducing response service quality judges the service quality of server the past period, SLAT Parameter indicates that server cpu busy percentage is more than to account for the ratio of total run time 100% time, because working as server cpu load The decline of server performance will be significantly caused when greater than 100% and seriously affects its performance for operating above task, The calculation method of SLAT such as following formula:
Wherein,Indicate that server i cpu busy percentage within the previous period was more than 100% time for leading to violation service quality,Indicate server i total time active within the previous period;
After above-mentioned steps, high load threshold value T proposed in this paperuIt can be calculated with following formula:
Tu=(1-m*IQR) * (1-SLAT)
The case where above-mentioned threshold calculations formula shows when server load is too low, causes SLAT to violate at this time is relatively Few, according to the formula, then threshold value appropriate can increase to accommodate more loads, and when load too high, it will cause The case where SLAT is violated is more, then (1-SLAT) can reduce, to reduce high load threshold value, and then reduces the case where SLAT is violated, The formula can dynamically adjust high load threshold value in a certain range, and high load threshold value is bigger, and it is more that SLAT violates situation, but can drop Low energy consumption is energy saving, although the case where violating SLAT when threshold value is small is less to will cause the larger of energy consumption.
5. a kind of Server Consolidation method based on virtual machine according to claim 1, which is characterized in that the step In A2, A3 and A4, the threshold value of server is calculated according to the current and historic load information of the server and virtual machine got, The state for analyzing current slot server filters out server in high load state and in the service of low load conditions Device.
6. a kind of Server Consolidation method based on virtual machine according to claim 1, which is characterized in that the step A5 In, integrated scheme is obtained using the server part integration algorithm based on BFD, and execute integration, the part based on BFD is whole Hop algorithm the following steps are included:
(1) virtual robot arm to be migrated is subjected to descending arrangement according to the service condition of cpu busy percentage;
(2) the server group that can accommodate the virtual machine is filtered out;
(3) estimation that energy consumption will be carried out between virtual machine and the server that can accommodate it, selects virtual machine moving to After the server, energy consumption increases destination server of the smallest server as migration;
It (4) will be on corresponding virtual machine (vm) migration to destination server according to the Server Consolidation scheme acquired before.
7. a kind of Server Consolidation method based on virtual machine according to claim 1, which is characterized in that the step B1 In B2, comprehensive integration problem is defined as shown by the following formula:
Wherein, Vi CPU、Vi MEMAnd Vi DiskRespectively indicate the CPU of virtual machine i, the loading condition of memory and disk, Pj CPU、Pj MEMWith Pj DiskRespectively indicate the CPU of server j, the number of resources of memory and disk, ThCPU、ThMEMAnd ThDiskRespectively indicate server The threshold value of CPU, memory and disk are, it is specified that the sum of all kinds of resources of whole virtual machines run on each server no more than take The product of maximum value and all kinds of resource thresholds to defined that business device can be provided, expression formula XijIndicate that can virtual machine i whole It closes on physical server j, XijIt indicates to be placed on server j with virtual machine i when value is 1, value is 0 Indicate cannot, MIN (Nactive) indicate active server minimum number;
Chromosome coding is carried out using the coding mode based on article group, the generation of the initial chromosome population includes following step It is rapid:
(1) it is random under the premise of a part of chromosome is the cpu resource constraint formulations in meeting comprehensive integration problem defined formula It generates;
(2) virtual machine is taken out at random to the server in overload, until the server reaches load balancing state;
(3) virtual machine thereon is also taken out to the server in low load conditions;
(4) virtual machine being removed is put into remaining at random and can accommodate on the server of the virtual machine.
8. a kind of Server Consolidation method based on virtual machine according to claim 1, which is characterized in that the step B3 In, under the constraint of cpu resource, use server as few as possible places virtual machine as much as possible, and fitness function is such as Shown in lower:
L (x)=1/C (x)
Wherein, C (x) indicates the length of chromosome x, represents the quantity of the server needed after integration, value is smaller to illustrate institute The server needed is fewer, and correspondingly the value of L (x) then can be bigger;
In the step B4, among the process being compared to randomly selected two chromosome, it is possible that fitness It is worth equal situation, since the migration of virtual machine can cause the increase of number of processes and I/O number, not only will increase the energy in this way Consumption, can also be such that the performance of whole system declines, it is therefore necessary to the migration number for reducing virtual machine, by the genome of generation The chromosome encoded with currently practical server and virtual machine mapping relations compares, and it is least that optimum selecting migrates number Chromosome enters next round.
9. a kind of Server Consolidation method based on virtual machine according to claim 1, which is characterized in that the step B5 In, concrete operations the following steps are included:
(1) completely random selects two chromosomes as parent, first compares their fitness value sizes for the two chromosomes, The big chromosome of fitness value is as parent x, if fitness value is equal in magnitude, judges to need on which chromosome with formula Virtual machine (vm) migration number is minimum, and migration that least chromosome of number is as parent x, and in addition item chromosome is parent y;
(2) value of each gene on chromosome y is judged using formula, the maximum gene of selective value is as parent y cross section Content is inserted into parent x, and intersection is combined to the virtual robot arm of chromosome, i.e., is inserted into one section (one group of gene from parent y Virtual machine) into parent x, formula is as follows:
Wherein, xjIndicate upper j-th of the server of chromosome x, Vi cpuIndicate the cpu load value size of i-th of virtual machine, Pi cpuTable The maximum cpu load value that can be provided for showing server j, calculates cpu busy percentage on each server, is indicated by the formula The case where cpu resource utilizes on server j;
(3) in parent x obtained in the previous step, certain virtual machines are it is possible that twice, deleting on parent x and being selected gene Each gene where having identical virtual machine;
(4) during the deletion of previous step, some virtual machines be will be deleted, it is therefore desirable to which algorithm is again using FF (Fist Fit) These deleted virtual machines are inserted into server, in this way the available new sub-services of a series of crossover operation Device.
10. a kind of Server Consolidation method based on virtual machine according to claim 1, which is characterized in that the step In B6, it can make gene that simple variation occur with the probability of very little by mutation operator, can make to dye by this method Body is close towards optimal solution, and the variation of the server code mode based on group can be carried out there are two types of mode, and it is whole that one is genes Body makes a variation, and a gene is deleted in parent and namely deletes virtual robot arm all on entire server;
Another mode is the variation of a small number of information on gene, delete on certain each virtual robot arm some or it is several virtual Machine, the mutation operator in this patent are selected to certain section of gene rather than are operated to some point on gene, assess on chromosome The case where resource utilization of each gene point, selects deletion to be worth the smallest virtual machine, that is, the void that resource utilization is minimum Quasi- machine, is then deleted, and deleted virtual machine is reinserted into server according to FF algorithm, a kind of change in this way Change and can be obtained by new son individual, and improves resource utilization;If the virtual machine after deleting can not be inserted into other dyes In colour solid, then the virtual robot arm that other can be inserted is inserted into other genes, and what can not be inserted into still remains in pervious gene On;
In the step B7, optimal solution may finally be obtained by above-mentioned operation, but because of the limitation of physical condition, the calculation Method unconfined cannot be iterated, it is necessary to which the termination condition of genetic algorithm is arranged, for the service based on genetic algorithm There are two the termination conditions of device integration algorithm, under the premise of meeting constraint formulations, one be population iterative evolution number it is super Certain number is crossed, second is that remaining chromosome reaches certain number in population, meets a kind of any of the above situation iteration all It can terminate, still remaining chromosome is required solution after meeting stopping criterion for iteration, each chromosome is exactly a kind of It is virtual with current cloud data center respectively to assess each chromosome generated for the mapping relations of new virtual machine and server The mapping relations of machine and server compare calculating, choose fitness value maximum and migrate that the smallest dyeing of number Body, the mapping solution as cloud data center Server Consolidation.
CN201910185650.0A 2019-03-12 2019-03-12 Server integration method based on virtual machine Active CN109901932B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910185650.0A CN109901932B (en) 2019-03-12 2019-03-12 Server integration method based on virtual machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910185650.0A CN109901932B (en) 2019-03-12 2019-03-12 Server integration method based on virtual machine

Publications (2)

Publication Number Publication Date
CN109901932A true CN109901932A (en) 2019-06-18
CN109901932B CN109901932B (en) 2023-04-07

Family

ID=66947119

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910185650.0A Active CN109901932B (en) 2019-03-12 2019-03-12 Server integration method based on virtual machine

Country Status (1)

Country Link
CN (1) CN109901932B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111562967A (en) * 2020-05-09 2020-08-21 广东工业大学 Virtual machine integration method based on heuristic algorithm
CN112433815A (en) * 2020-11-24 2021-03-02 中国科学院深圳先进技术研究院 Cloud data center energy saving method and system based on container control
CN112651538A (en) * 2019-10-11 2021-04-13 阿里巴巴集团控股有限公司 Method and device for configuring rack
CN113075995A (en) * 2021-04-26 2021-07-06 华南理工大学 Virtual machine energy-saving integration method, system and storage medium based on mixed group intelligence
CN113157435A (en) * 2021-03-01 2021-07-23 长沙学院 Energy efficiency-targeted virtual machine deployment algorithm and system for cloud data center
WO2022104500A1 (en) * 2020-11-17 2022-05-27 深圳先进技术研究院 Load control method and apparatus, computer device, and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104199736A (en) * 2014-06-30 2014-12-10 浙江大学苏州工业技术研究院 Method for saving energy of data center under cloud environment
US20150039764A1 (en) * 2013-07-31 2015-02-05 Anton Beloglazov System, Method and Computer Program Product for Energy-Efficient and Service Level Agreement (SLA)-Based Management of Data Centers for Cloud Computing
US9176764B1 (en) * 2013-09-25 2015-11-03 Amazon Technologies, Inc. Managing memory in virtualized environments
CN105302630A (en) * 2015-10-26 2016-02-03 深圳大学 Dynamic adjustment method and system for virtual machine
WO2016165392A1 (en) * 2015-04-17 2016-10-20 华南理工大学 Genetic algorithm-based cloud computing resource scheduling method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150039764A1 (en) * 2013-07-31 2015-02-05 Anton Beloglazov System, Method and Computer Program Product for Energy-Efficient and Service Level Agreement (SLA)-Based Management of Data Centers for Cloud Computing
US9176764B1 (en) * 2013-09-25 2015-11-03 Amazon Technologies, Inc. Managing memory in virtualized environments
CN104199736A (en) * 2014-06-30 2014-12-10 浙江大学苏州工业技术研究院 Method for saving energy of data center under cloud environment
WO2016165392A1 (en) * 2015-04-17 2016-10-20 华南理工大学 Genetic algorithm-based cloud computing resource scheduling method
CN105302630A (en) * 2015-10-26 2016-02-03 深圳大学 Dynamic adjustment method and system for virtual machine

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
孟凡超 等: "基于蚁群优化算法的云计算资源负载均衡研究", 《华中科技大学学报(自然科学版)》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112651538A (en) * 2019-10-11 2021-04-13 阿里巴巴集团控股有限公司 Method and device for configuring rack
CN111562967A (en) * 2020-05-09 2020-08-21 广东工业大学 Virtual machine integration method based on heuristic algorithm
WO2022104500A1 (en) * 2020-11-17 2022-05-27 深圳先进技术研究院 Load control method and apparatus, computer device, and storage medium
CN112433815A (en) * 2020-11-24 2021-03-02 中国科学院深圳先进技术研究院 Cloud data center energy saving method and system based on container control
CN113157435A (en) * 2021-03-01 2021-07-23 长沙学院 Energy efficiency-targeted virtual machine deployment algorithm and system for cloud data center
CN113157435B (en) * 2021-03-01 2023-11-24 长沙学院 Virtual machine deployment method and system with energy efficiency as target of cloud data center
CN113075995A (en) * 2021-04-26 2021-07-06 华南理工大学 Virtual machine energy-saving integration method, system and storage medium based on mixed group intelligence
CN113075995B (en) * 2021-04-26 2024-02-27 华南理工大学 Virtual machine energy-saving integration method, system and storage medium based on hybrid group intelligence

Also Published As

Publication number Publication date
CN109901932B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
CN109901932A (en) A kind of Server Consolidation method based on virtual machine
Yang et al. A multi-objective task scheduling method for fog computing in cyber-physical-social services
CN108429815A (en) Dynamic resource scheduling method based on OpenStack
CN107491341A (en) A kind of virtual machine distribution method based on particle group optimizing
CN106484512B (en) The dispatching method of computing unit
CN102681902A (en) Load balancing method based on task distribution of multicore system
CN103916438B (en) Cloud testing environment scheduling method and system based on load forecast
CN105323166B (en) A kind of method for routing preferential based on network energy efficiency towards cloud computing
CN102262567A (en) Virtual machine scheduling decision system, platform and method
CN104731528B (en) A kind of construction method and system of cloud computing block storage service
CN108023958A (en) A kind of resource scheduling system based on cloud platform resource monitoring
CN114296868B (en) Virtual machine automatic migration decision method based on user experience in multi-cloud environment
CN109324876A (en) A kind of Docker of High Availabitity and virtual machine initial placement method
CN104901861A (en) Network topology pre-optimization-based virtual network mapping method capable of improving availability
CN106201693A (en) Dispatching method in a kind of virtualized environment and system
CN107608777A (en) The dispatching method of big data processing task in a kind of distributed environment
CN106656555A (en) Dynamic adjustment method of service resources of cloud computing system
CN109976879B (en) Cloud computing virtual machine placement method based on resource usage curve complementation
CN105847385B (en) A kind of cloud computing platform dispatching method of virtual machine based on operation duration
CN115858155A (en) Dynamic capacity expansion and contraction method and device for application resources of computing power network platform
CN108388471B (en) Management method based on double-threshold constraint virtual machine migration
Singh Genetic approach based optimized load balancing in cloud computing: a performance perspective
CN105872082B (en) Fine granularity resource response system based on container cluster load-balancing algorithm
CN104657422B (en) A kind of content issue intelligent method for classifying based on categorised decision tree
CN113778627A (en) Scheduling method for creating cloud resources

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