CN109901932B - Server integration method based on virtual machine - Google Patents

Server integration method based on virtual machine Download PDF

Info

Publication number
CN109901932B
CN109901932B CN201910185650.0A CN201910185650A CN109901932B CN 109901932 B CN109901932 B CN 109901932B CN 201910185650 A CN201910185650 A CN 201910185650A CN 109901932 B CN109901932 B CN 109901932B
Authority
CN
China
Prior art keywords
server
virtual machine
integration
chromosome
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.)
Active
Application number
CN201910185650.0A
Other languages
Chinese (zh)
Other versions
CN109901932A (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

Images

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

Abstract

The invention discloses a server integration method based on a virtual machine, which comprises a server local integration algorithm based on a dynamic threshold value and a server global integration algorithm based on a genetic algorithm. The invention is scientific and reasonable, is safe and convenient to use, and can effectively realize the important function of server integration according to the load change dynamic of the cloud data center through local integration and global integration, thereby improving the service supporting capacity and the operation and maintenance efficiency, reducing the investment and decision risk, and achieving the purposes of saving investment and energy. The provided server local integration algorithm aims at performing local integration in a small range on servers in a high-load state and a low-load state to meet the energy-saving requirement; the aim of the server global integration algorithm is to integrate the servers in a larger range, ensure the service quality and simultaneously enable the virtual machines to run on the servers as few as possible, thereby improving the overall resource utilization rate and reducing the energy consumption.

Description

Server integration method based on virtual machine
Technical Field
The invention relates to the technical field of cloud data center server integration, in particular to a server integration method based on a virtual machine.
Background
Although many studies on server integration are already carried out at present, and many methods are put into practical application environments, some shortcomings and shortcomings still exist in the current studies, for example, some data centers adopt manual methods to integrate servers, which results in very high labor cost and easily causes untimely response, thereby affecting service quality and final user experience; some integration algorithms adopt a static integration strategy to integrate the server, and the method cannot change in time according to the real-time requirements of users, so that energy waste is caused; some integration algorithms only focus on a few dimensions of the server for integration, and are not considered from the global perspective, so that the requirements of dynamic integration of the server cannot be well met, frequent migration of virtual machines is easily caused, and then migration jitter and service quality are reduced, so that a novel server integration method is urgently needed to solve the problems.
Disclosure of Invention
The invention provides a server integration method based on a virtual machine, which can effectively solve the problems in the background technology.
In order to achieve the purpose, the invention provides the following technical scheme: a virtual machine-based server integration method comprises a dynamic threshold-based server local integration algorithm and a genetic algorithm-based server global integration algorithm;
the server integration method based on the virtual machine comprises the following steps:
s1, acquiring monitoring information of a server and a virtual machine;
s2, calculating the overall resource utilization rate of the data center according to the monitoring information;
s3, selecting a server integration algorithm according to the overall resource utilization rate of the data center;
the server local integration algorithm based on the dynamic threshold comprises the following steps:
a1, calculating an integrated high-load threshold value of a server;
a2, analyzing the load state of the server according to the server integration high-load threshold;
a3, screening out a server in a high-load state;
a4, screening out a server in a low-load state;
a5, performing server local integration based on a bidirectional forwarding detection algorithm;
the server global integration algorithm based on the genetic algorithm comprises the following steps:
b1, chromosome coding;
b2, generating an initial chromosome coding population;
b3, setting a fitness function;
b4, selecting operation;
b5, performing cross operation;
b6, mutation operation;
and B7, iteration termination conditions.
According to the technical scheme, in the step S1 and the step S2, the server and the virtual machine are monitored according to the server monitoring center, the system calculates the overall resource utilization rate of the data center according to the acquired monitoring information of the server and the virtual machine, and the overall resource utilization rate of the data center is compared with a given utilization rate threshold value.
According to the technical scheme, in the step S3, when the utilization rate of the whole resources of the data center is normal, a server local integration algorithm based on a dynamic threshold value is selected to integrate the servers, and when the utilization rate of the whole resources of the data center is smaller than a given utilization rate threshold value, a server global integration algorithm based on a genetic algorithm is selected to integrate the servers.
According to the technical scheme, in the step A1, the calculation of the server integrated high-load threshold value by using the self-adaptive high-load threshold value judgment algorithm K-IQR comprises the following steps:
(1) Carrying out clustering operation on the data set by using a K-means clustering algorithm method aiming at the sequenced data set, and dividing the data set into 4 parts;
(2) Respectively solving the average value of each group of 4 clustered groups of data, wherein the average value can better reflect the characteristics of each group of data values, and solving quartile by using a quartile difference method;
(3) The method for calculating the SLAT comprises the following steps that a parameter SLAT reflecting the service quality is introduced to judge the service quality of a server in a past period, wherein the SLAT parameter represents the ratio of the time of the utilization rate of a server CPU exceeding 100% to the total running time, because the performance of the server is obviously degraded and the performance of a task running on the server is seriously influenced when the load of the server CPU is more than 100%, and the calculation method of the SLAT comprises the following formula:
Figure GDA0003691017810000031
wherein, the first and the second end of the pipe are connected with each other,
Figure GDA0003691017810000032
a time, representing a quality of service violation by the server i, of more than 100% CPU utilization in the previous cycle>
Figure GDA0003691017810000033
Represents the total time that server i was active in the previous cycle;
after the above steps, the high load threshold T proposed herein u Can be calculated with the following formula:
T u =(1-m*IQR)*(1-SLAT)
the threshold calculation formula shows that, when the server load is too low, the number of the conditions causing the SLAT violation is relatively small, the threshold can be appropriately increased according to the formula to accommodate more loads, when the load is too high, the number of the conditions causing the SLAT violation is more, the (1-SLAT) is reduced, so that the high-load threshold is reduced, and the conditions causing the SLAT violation are further reduced.
According to the technical scheme, in the steps A2, A3 and A4, the threshold value of the server is calculated according to the obtained current and historical load information of the server and the virtual machine, the state of the server in the current time period is analyzed, and the server in the high-load state and the server in the low-load state are screened out.
According to the above technical solution, in the step A5, an integration scheme is obtained by using a server local integration algorithm based on bidirectional forwarding detection, and integration is performed, where the local integration algorithm based on bidirectional forwarding detection includes the following steps:
(1) Arranging virtual machine sets to be migrated in a descending order according to the use condition of the CPU utilization rate;
(2) Screening out a server group which can accommodate the virtual machine;
(3) Estimating energy consumption between the virtual machine and a server capable of accommodating the virtual machine, and selecting the server with the minimum energy consumption increase after the virtual machine is migrated to the server as a migration target server;
(4) And migrating the corresponding virtual machine to the target server according to the obtained server integration scheme.
According to the above technical solution, in the steps B1 and B2, the definition is as shown in the following formula:
Figure GDA0003691017810000041
wherein, V i CPU 、V i MEM And V i Disk Respectively representing the load conditions of the CPU, the memory and the disk of the virtual machine i, P j CPU 、P j MEM And P j Disk Respectively representing the resource numbers Th of CPU, memory and disk of server j CPU 、Th MEM And Th Disk Respectively representing the thresholds of a CPU, a memory and a disk of the server, stipulating that the sum of various resources of all virtual machines operated on each server can not exceed the product of the maximum value which can be provided by the server and the threshold of various resources specified, and expressing X ij Indicates whether virtual machine i can be integrated onto physical server j, X ij When the value is 1, the virtual machine i can be placed on the server j, and when the value is 0, the virtual machine i cannot be placed on the server j, namely MIN (N) active ) Indicating that the number of active servers is minimal;
carrying out chromosome coding by using a coding mode based on an article group, wherein the generation of the initial chromosome population comprises the following steps:
(1) A part of chromosomes are randomly generated on the premise of meeting a CPU resource constraint formula in a comprehensive integration problem definition formula;
(2) Randomly taking out the virtual machine from the server in the overload state until the server reaches a load balancing state;
(3) The virtual machine on the server in the low load state is also taken out;
(4) The fetched virtual machine is randomly placed on the remaining servers that can host the virtual machine.
According to the above technical solution, in the step B3, under the constraint of CPU resources, as many virtual machines as possible are placed by using as few servers as possible, and the fitness function is as follows:
L(x)=1/C(x)
wherein, C (x) represents the length of chromosome x, and represents the number of servers required after integration, and the smaller the value of C (x), the fewer the servers required, and correspondingly the larger the value of L (x);
in the step B4, in the process of comparing the two chromosomes selected at random, a situation that the fitness values are equal may occur, and since the migration of the virtual machine may cause an increase in the number of processes and the number of I/O times, not only energy consumption may be increased, but also the performance of the entire system may be degraded, it is necessary to reduce the number of virtual machine migrations, compare the generated chromosome group with the chromosome obtained by encoding the mapping relationship between the current actual server and the virtual machine, and preferentially select the chromosome with the smallest number of migrations to enter the next round.
According to the above technical solution, in the step B5, the specific operation includes the following steps:
(1) Completely randomly selecting two chromosomes as parent generations, comparing the fitness values of the two chromosomes, and using the chromosome with the high fitness value as a parent generation x;
(2) Judging the value of each gene on the chromosome y by using a formula, selecting the gene with the maximum value as the content of the crossed part of the parent y to be inserted into the parent x, wherein the crossing is to combine the virtual machine set of the chromosome, namely, inserting a section of gene (a group of virtual machines) from the parent y into the parent x, and the formula is as follows:
Figure GDA0003691017810000061
wherein x is j Denotes the jth server on chromosome x, V i cpu Indicates the magnitude of the CPU load value, P, of the ith virtual machine i cpu The maximum CPU load value which can be provided by the server j is represented, the CPU utilization rate on each server is calculated, and the condition of CPU resource utilization on the server j is represented by the formula;
(3) In the parent x obtained in the previous step, some virtual machines may appear twice, and each gene of the virtual machine, which is the same as the selected gene, in the parent x is deleted;
(4) In the deleting process of the previous step, some virtual machines are deleted, so that the deleted virtual machines need to be inserted into the server again by using the FF algorithm, and a new sub server can be obtained through a series of cross operations.
According to the technical scheme, in the step B6, the genes can be simply changed with small probability through a mutation operator, the chromosome can be close to the optimal solution through the method, and the mutation based on the group server coding mode can be performed in two modes, namely, the mutation is performed on the whole gene, and the deletion of one gene in a parent generation, namely, the deletion of all virtual machine sets on the whole server;
another way is that a small number of information on the gene is mutated, and one or more virtual machines on each virtual machine set are deleted, the mutation operator in the patent selects to operate a certain section of gene instead of a certain point on the gene, evaluates the condition of the resource utilization rate of each gene point on the chromosome, selects the virtual machine with the minimum deletion value, namely the virtual machine with the minimum resource utilization rate, and then deletes the virtual machine, and reinserts the deleted virtual machine into the server according to the FF algorithm, so that a new sub-individual can be obtained through the change, and the resource utilization rate is improved; if the deleted virtual machine cannot be inserted into other chromosomes, inserting other virtual machine sets which can be inserted into other genes, and remaining the virtual machine sets which cannot be inserted into the other genes on the former genes;
in the step B7, the optimal solution can be finally obtained through the above operations, but because of the limitation of the actual conditions, the algorithm cannot be iterated without limitation, and it is necessary to set a termination condition of the genetic algorithm. The method comprises the steps that two termination conditions of a server integration algorithm based on a genetic algorithm are provided, on the premise that a constraint formula is met, the number of times of population iterative evolution exceeds a certain number, and on the other hand, the number of remaining chromosomes in a population reaches a certain number, iteration can be terminated when any one condition is met, the remaining chromosomes are the solution obtained after the iteration termination conditions are met, and each chromosome is a new mapping relation between a virtual machine and a server. And evaluating the mapping relation between each generated chromosome and the current cloud data center virtual machine and server, and comparing and calculating, and selecting the chromosome with the largest fitness value and the smallest migration frequency as a mapping solution for cloud data center server integration.
The invention has the beneficial effects that: the invention is scientific and reasonable, is safe and convenient to use, and can effectively realize the important function of dynamically integrating the servers according to the load change of the cloud data center through the local server integration algorithm based on the dynamic threshold value and the global server integration algorithm based on the genetic algorithm, thereby achieving the purposes of improving the service supporting capacity and the operation and maintenance efficiency, reducing the investment and decision risk, and saving the investment and energy. The provided server local integration algorithm and the global integration algorithm based on the genetic algorithm aim at integrating servers in a high-load state and a low-load state, ensure the service quality, simultaneously enable the virtual machines to run on the servers as few as possible, and simultaneously reduce the migration times of the virtual machines as much as possible, thereby improving the resource utilization rate and reducing the energy consumption.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention.
In the drawings:
FIG. 1 is a schematic flow diagram of the present invention;
FIG. 2 is a schematic flow chart of a server local integration algorithm based on dynamic threshold values according to the present invention;
FIG. 3 is a schematic diagram comparing the energy consumption of the server local integration algorithm based on dynamic threshold according to the present invention;
FIG. 4 is a schematic diagram illustrating comparison of minimum migration times of a virtual machine in a server local integration algorithm based on dynamic threshold values according to the present invention;
FIG. 5 is a schematic flow chart of the server global integration algorithm based on genetic algorithm of the present invention;
FIG. 6 is a schematic diagram comparing the energy consumption of the global integration algorithm of the server based on the genetic algorithm according to the present invention;
FIG. 7 is a schematic diagram comparing the minimum migration times of a virtual machine based on a genetic algorithm server global integration algorithm of the present invention.
Detailed Description
The preferred embodiments of the present invention will be described in conjunction with the accompanying drawings, and it will be understood that they are described herein for the purpose of illustration and explanation and not limitation.
Example 1: as shown in fig. 1, the present invention provides a technical solution, which is a virtual machine-based server integration method, including a dynamic threshold-based server local integration algorithm and a genetic algorithm-based server global integration algorithm;
the server integration method based on the virtual machine comprises the following steps:
s1, acquiring monitoring information of a server and a virtual machine;
s2, calculating the overall resource utilization rate of the data center according to the monitoring information;
s3, selecting a server integration algorithm according to the overall resource utilization rate of the data center;
according to the technical scheme, in the step S1 and the step S2, the server and the virtual machine are monitored according to the server monitoring center, the system calculates the overall resource utilization rate of the data center according to the acquired monitoring information of the server and the virtual machine, and the overall resource utilization rate of the data center is compared with a given utilization rate threshold value.
According to the technical scheme, in the step S3, when the utilization rate of the whole resources of the data center is normal, a server local integration algorithm based on a dynamic threshold value is selected to integrate the servers, and when the utilization rate of the whole resources of the data center is smaller than a given utilization rate threshold value, a server global integration algorithm based on a genetic algorithm is selected to integrate the servers.
Example 2: as shown in fig. 2-4, the server local integration algorithm based on dynamic threshold includes the following steps:
a1, calculating a server integration high-load threshold;
a2, analyzing the load state of the server according to the server integration high-load threshold;
a3, screening out a server in a high-load state;
a4, screening out a server in a low-load state;
and A5, performing server local integration based on a bidirectional forwarding detection algorithm.
According to the technical scheme, in the step A1, the method for calculating the server integration high-load threshold by using the self-adaptive high-load threshold judgment algorithm K-IQR comprises the following steps:
(1) Carrying out clustering operation on the data sets by using a K-means clustering algorithm method aiming at the sequenced data sets, and dividing the data sets into 4 groups;
(2) Respectively solving the average value of each group of 4 clustered groups of data, wherein the average value can better reflect the characteristics of each group of data values, and solving quartile by using a quartile difference method;
(3) The method for calculating the SLAT comprises the following steps that a parameter SLAT reflecting the service quality is introduced to judge the service quality of a server in the past period of time, wherein the SLAT parameter represents the ratio of the time when the utilization rate of a server CPU exceeds 100% to the total running time, and because the performance of the server is obviously degraded and the performance of a task running on the server is seriously influenced when the load of the server CPU is more than 100%, the calculation method of the SLAT is as follows:
Figure GDA0003691017810000101
wherein, the first and the second end of the pipe are connected with each other,
Figure GDA0003691017810000102
a time, representing a quality of service violation by the server i, of more than 100% CPU utilization in the previous cycle>
Figure GDA0003691017810000103
Represents the total time that server i was active in the previous cycle;
after the steps, the high load threshold T is provided u Can be calculated with the following formula:
T u =(1-m*IQR)*(1-SLAT)
the threshold calculation formula shows that, when the server load is too low, the number of the conditions causing the SLAT violation is relatively small, the threshold can be appropriately increased according to the formula to accommodate more loads, when the load is too high, the number of the conditions causing the SLAT violation is more, the (1-SLAT) is reduced, so that the high-load threshold is reduced, and the conditions causing the SLAT violation are further reduced.
According to the technical scheme, in the steps A2, A3 and A4, the threshold value of the server is calculated according to the obtained current and historical load information of the server and the virtual machine, the state of the server in the current time period is analyzed, and the server in the high-load state and the server in the low-load state are screened out.
According to the technical scheme, in the step A5, an integration scheme is obtained by using a server local integration algorithm based on bidirectional forwarding detection, and integration is performed, wherein the local integration algorithm based on bidirectional forwarding detection comprises the following steps:
(1) Arranging virtual machine sets to be migrated in a descending order according to the use condition of the CPU utilization rate;
(2) Screening out a server group capable of accommodating the virtual machine;
(3) Estimating energy consumption between the virtual machine and a server capable of accommodating the virtual machine, and selecting the server with the minimum energy consumption increase after the virtual machine is migrated to the server as a migration target server;
(4) And migrating the corresponding virtual machine to the target server according to the obtained server integration scheme.
Example 3: as shown in fig. 5-7, the server global integration algorithm based on genetic algorithm includes the following steps:
b1, chromosome coding;
b2, generating an initial chromosome coding population;
b3, setting a fitness function;
b4, selecting operation;
b5, performing cross operation;
b6, mutation operation;
and B7, iteration termination conditions.
According to the above technical solution, in steps B1 and B2, the definition of the overall integration problem is shown in the following formula:
Figure GDA0003691017810000121
wherein, V i CPU 、V i MEM And V i Disk Respectively representing the load conditions of the CPU, the memory and the disk of the virtual machine i, P j CPU 、P j MEM And P j Disk Respectively representing the resource numbers Th of CPU, memory and disk of server j CPU 、Th MEM And Th Disk Respectively representing the threshold values of a CPU, a memory and a disk of the server, and specifying that the sum of various resources of all virtual machines running on each server cannot exceed the product of the maximum value provided by the server and the threshold value of the various resources specified, wherein an expression X ij Indicates whether virtual machine i can be integrated onto physical server j, X ij When the value is 1, the virtual machine i can be placed on the server j, and when the value is 0, the virtual machine i cannot be placed on the server j, namely MIN (N) active ) Indicating that the number of active servers is minimal;
carrying out chromosome coding by using a coding mode based on an article group, wherein the generation of the initial chromosome population comprises the following steps:
(1) A part of chromosomes are randomly generated on the premise of meeting a CPU resource constraint formula in a comprehensive integration problem definition formula;
(2) Randomly taking out the virtual machine from the server in the overload state until the server reaches a load balancing state;
(3) The virtual machine on the server in the low load state is also taken out;
(4) The fetched virtual machine is randomly placed on the remaining servers that can host the virtual machine.
According to the above technical solution, in step B3, under the constraint of CPU resources, as many virtual machines as possible are placed by using as few servers as possible, and the fitness function is as follows:
L(x)=1/C(x)
wherein C (x) represents the length of chromosome x and represents the number of servers required after integration, and the smaller the value of C (x), the fewer the required servers are, and the larger the value of L (x) is correspondingly;
in the step B4, in the process of comparing the two chromosomes selected at random, a situation that the fitness values are equal may occur, and since the migration of the virtual machine may cause an increase in the number of processes and the number of I/O times, not only energy consumption may be increased, but also the performance of the entire system may be degraded, it is necessary to reduce the number of virtual machine migrations, compare the generated chromosome group with the chromosome obtained by encoding the mapping relationship between the current actual server and the virtual machine, and preferentially select the chromosome with the smallest number of migrations to enter the next round.
According to the above technical solution, in the step B5, the specific operation includes the following steps:
(1) Completely randomly selecting two chromosomes as parents, comparing the fitness values of the two chromosomes, and using the chromosome with the large fitness value as a parent x;
(2) Judging the value of each gene on the chromosome y by using a formula, selecting the gene with the maximum value as the content of the crossed part of the parent y to be inserted into the parent x, wherein the crossing is to combine the virtual machine set of the chromosome, namely, inserting a section of gene (a group of virtual machines) from the parent y into the parent x, and the formula is as follows:
Figure GDA0003691017810000131
wherein x is j Denotes the jth server on chromosome x, V i cpu Indicates the magnitude of the CPU load value, P, of the ith virtual machine i cpu The maximum CPU load value which can be provided by the server j is represented, the CPU utilization rate on each server is calculated, and the condition of CPU resource utilization on the server j is represented by the formula;
(5) In the parent x obtained in the previous step, some virtual machines may appear twice, and each gene of the virtual machine, which is the same as the selected gene, in the parent x is deleted;
(6) In the last step of deletion, some virtual machines are deleted, so that the deleted virtual machines need to be re-inserted into the server by using the FF algorithm, and a new sub-server can be obtained through a series of cross operations.
According to the technical scheme, in the step B6, the genes can be simply changed with small probability through a mutation operator, the chromosome can be close to the optimal solution through the method, and the mutation based on the group server coding mode can be carried out in two modes, wherein one mode is that the whole genes are mutated, and the deletion of one gene in a parent generation is that is, all virtual machine sets on the whole server are deleted;
another way is that a small number of information on the gene is mutated, and one or more virtual machines on each virtual machine set are deleted, the mutation operator in the patent selects to operate a certain section of gene instead of a certain point on the gene, evaluates the condition of the resource utilization rate of each gene point on the chromosome, selects the virtual machine with the minimum deletion value, namely the virtual machine with the minimum resource utilization rate, and then deletes the virtual machine, and reinserts the deleted virtual machine into the server according to the FF algorithm, so that a new sub-individual can be obtained through the change, and the resource utilization rate is improved; if the deleted virtual machine cannot be inserted into other chromosomes, inserting other virtual machine sets which can be inserted into other genes, and remaining the virtual machine sets which cannot be inserted into the other genes on the former genes;
in step B7, the optimal solution can be finally obtained through the above operations, but because of the limitation of practical conditions, the algorithm cannot be iterated without limit, and it is necessary to set a termination condition of the genetic algorithm. The method comprises the steps that two termination conditions of a server integration algorithm based on a genetic algorithm are provided, on the premise that a constraint formula is met, the number of times of population iterative evolution exceeds a certain number, and on the other hand, the number of remaining chromosomes in a population reaches a certain number, iteration can be terminated when any one condition is met, the remaining chromosomes are the solution obtained after the iteration termination conditions are met, and each chromosome is a new mapping relation between a virtual machine and a server. And evaluating the mapping relation between each generated chromosome and the current cloud data center virtual machine and server, and comparing and calculating, and selecting the chromosome with the largest fitness value and the smallest migration times as a mapping solution for cloud data center server integration.
Based on the above, the invention has the advantages that: the invention is scientific and reasonable, is safe and convenient to use, and can effectively realize the important function of dynamically integrating the servers according to the load change of the cloud data center through the server local integration algorithm based on the dynamic threshold value and the server global integration algorithm based on the genetic algorithm, thereby achieving the purposes of improving the service supporting capacity and the operation and maintenance efficiency, reducing the investment and decision risk, saving the investment and saving the energy. The provided server local integration algorithm aims at performing local integration on servers in a high-load state and a low-load state, so that the virtual machines run on the servers as few as possible while the service quality is ensured, and the migration times of the virtual machines can be effectively reduced, thereby improving the resource utilization rate and reducing the energy consumption.
Finally, it should be noted that: although the present invention has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that modifications may be made to the embodiments described above, or equivalents may be substituted for elements thereof. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (6)

1. The server integration method based on the virtual machine is characterized by comprising a server local integration algorithm based on a dynamic threshold value and a server global integration algorithm based on a genetic algorithm;
the server integration method based on the virtual machine comprises the following steps:
s1, acquiring monitoring information of a server and a virtual machine;
s2, calculating the overall resource utilization rate of the data center according to the monitoring information;
s3, selecting a server integration algorithm according to the overall resource utilization rate of the data center;
the server local integration algorithm based on the dynamic threshold comprises the following steps:
a1, calculating a server integration high-load threshold;
a2, analyzing the load state of the server according to the server integration high-load threshold;
a3, screening out a server in a high-load state;
a4, screening out a server in a low-load state;
a5, performing server local integration based on a bidirectional forwarding detection algorithm;
the server global integration algorithm based on the genetic algorithm comprises the following steps:
b1, chromosome coding;
b2, generating an initial chromosome coding population;
b3, setting a fitness function;
b4, selecting operation;
b5, performing cross operation;
b6, performing mutation operation;
b7, iteration termination conditions;
in the server global integration algorithm based on the genetic algorithm, the server integration problem is defined as the following formula:
Figure FDA0003732331440000021
wherein, V i CPU 、V i MEM And V i Disk Respectively representing the load sizes of a CPU, a memory and a disk of a virtual machine i; p is j CPU 、P j MEM And P j Disk Respectively representing the resource quantity T of CPU, memory and disk provided by the server j h CPU 、Th MEM And Th Disk Respectively representing the high load threshold ratio of a CPU, a memory and a disk of the server, and specifying that the sum of various resources of all virtual machines running on each server cannot exceed the product of the maximum value which can be provided by the server and the high load threshold ratio of various specified resources, wherein an expression X ij Indicates whether virtual machine i can be integrated onto physical server j, X ij When the value is 1, the virtual machine i can be placed on the server j, when the value is 0, the virtual machine i cannot be placed on the server j, and N is active Denotes the number of active servers, MIN (N) active ) Indicating that the number of active servers is minimized;
carrying out chromosome coding by using a coding mode based on an article group, wherein the generation of the initial chromosome population comprises the following steps:
(1) A part of chromosomes are randomly generated on the premise of meeting a CPU resource constraint formula in a comprehensive integration problem definition formula;
(2) Randomly taking out the virtual machine from the server in the overload state until the server reaches a load balancing state;
(3) The virtual machine on the server in the low load state is also taken out;
(4) Randomly placing the fetched virtual machine on the rest servers capable of accommodating the virtual machine;
under the constraint of CPU resources, as few servers as possible are adopted to place as many virtual machines as possible, and the fitness function is as follows:
L(x)=1/C(x)
wherein C (x) represents the length of chromosome x and represents the number of servers required after integration, and the smaller the value of C (x), the fewer the required servers are, and the larger the value of L (x) is correspondingly;
in the step B4, in the process of comparing two chromosomes selected at random, a situation that the fitness values are equal may occur, and since the migration of the virtual machine may cause an increase in the number of processes and the number of I/O times, not only energy consumption may be increased, but also the performance of the entire system may be degraded, it is necessary to reduce the number of virtual machine migrations, compare the generated chromosome group with the chromosome obtained by encoding the mapping relationship between the current actual server and the virtual machine, and preferentially select the chromosome with the smallest number of migrations to enter the next round;
in the step B5, the specific operation includes the following steps:
(1) Completely randomly selecting two chromosomes as parents, comparing the fitness values of the two chromosomes, and using the chromosome with the large fitness value as a parent x;
(2) Calculating the value of each gene on the chromosome y by using the following formula, selecting the gene with the maximum value as the content of the crossed part of the parent y to be inserted into the parent x, wherein the crossing is to combine the virtual machine set of the chromosome, namely selecting a section of gene from the parent y to be inserted into x, namely migrating a group of virtual machines in y into the parent x, and the calculation formula is as follows:
Figure FDA0003732331440000041
wherein x is j Denotes the jth server on chromosome x, V i cpu Indicates the magnitude of the CPU load value, P, of the ith virtual machine j cpu The maximum CPU load value which can be provided by the server j is represented, the CPU utilization rate on each server is calculated, and the condition of CPU resource utilization on the server j is represented by the formula;
(3) In the parent x obtained in the last step, some virtual machines may appear twice, and each gene of the virtual machine on the parent x, which is the same as the selected gene, is deleted;
in the deleting process of the previous step, some virtual machines can be deleted, so that FF is needed, namely, the deleted virtual machines are inserted into the server again by the Fist Fit algorithm, and a new sub-server can be obtained through a series of cross operations;
in the step B6, the genes can be simply changed with a small probability by the mutation operator, the chromosome can be moved toward the optimal solution by the method, and the mutation based on the group server coding mode can be performed in two ways, one is that the whole genes are mutated, and one gene is deleted in the parent, that is, all virtual machine groups on the whole server are deleted;
another mode is that a small amount of information on the gene is mutated, one or more virtual machines on the virtual machine set are deleted, a mutation operator selects to operate a certain section of gene but not a certain point on the gene, the condition of the resource utilization rate of each gene point on the chromosome is evaluated, the virtual machine with the minimum deletion value, namely the virtual machine with the minimum resource utilization rate, is selected and then deleted, the deleted virtual machine is reinserted into the server according to the Fist Fit algorithm, a new sub-individual can be obtained through the change, and the resource utilization rate is improved; if the deleted virtual machine cannot be inserted into other chromosomes, inserting other virtual machine sets which can be inserted into other genes, and remaining the virtual machine sets which cannot be inserted into the other genes on the former genes;
in the step B7, an optimal solution can be finally obtained through the above operations, but because of the limitation of actual conditions, the algorithm cannot be iterated without limitation, a termination condition of the genetic algorithm is set, two termination conditions are provided for a server integration algorithm based on the genetic algorithm, on the premise that a constraint formula is satisfied, one is that the number of times of population iterative evolution exceeds a certain number, and the other is that the number of remaining chromosomes in the population reaches a certain number, the iteration is terminated in accordance with any one of the above conditions, and when the iteration termination condition is satisfied, the remaining chromosomes are the solution to be obtained, each chromosome is a new mapping relationship between a virtual machine and a server, each chromosome generated in the step B7 is evaluated, is a mapping integration scheme of a server virtual machine, the fitness value of each chromosome is calculated, and the chromosome with the largest fitness value and the smallest migration number is selected to be used as a solution for cloud data center server integration.
2. The method for integrating servers based on virtual machines according to claim 1, wherein in the steps S1 and S2, the server monitoring center monitors the servers and the virtual machines, and the system calculates the overall resource utilization rate of the data center according to the acquired monitoring information of the servers and the virtual machines, and compares the overall resource utilization rate of the data center with a given utilization rate threshold.
3. The method according to claim 1, wherein in step S3, when the overall resource utilization of the data center is normal, a server local integration algorithm based on a dynamic threshold is selected to integrate the servers, and when the overall resource utilization of the data center is less than a given utilization threshold, a server global integration algorithm based on a genetic algorithm is selected to integrate the servers.
4. The virtual machine-based server integration method according to claim 1, wherein in the step A1, the calculation of the server integration high-load threshold value by using the adaptive high-load threshold value determination algorithm K-IQR comprises the following steps:
(1) Carrying out clustering operation on the data sets by using a K-means clustering algorithm method aiming at the sequenced data sets, and dividing the data sets into 4 groups;
(2) Respectively solving the average value of each group of 4 clustered data, wherein the average value can better reflect the characteristics of each group of data values, and solving quartile by using a quartile difference method;
(3) The method for calculating the SLAT comprises the following steps that a parameter SLAT reflecting the service quality is introduced to judge the service quality of a server in a past period, wherein the SLAT parameter represents the ratio of the time of the utilization rate of a server CPU exceeding 100% to the total running time, because the performance of the server is obviously degraded and the performance of a task running on the server is seriously influenced when the load of the server CPU is more than 100%, and the calculation method of the SLAT comprises the following formula:
Figure FDA0003732331440000061
wherein, the first and the second end of the pipe are connected with each other,
Figure FDA0003732331440000062
indicating a time during which a CPU utilization of server i above 100% in the previous cycle resulted in a quality of service violation,
Figure FDA0003732331440000063
represents the total time that server i was active in the previous cycle;
after the steps, the high load threshold value T u Can be calculated with the following formula:
T u =(1-m*IQR)*(1-SLAT)
the above formula for calculating the threshold value shows that, when the server load is too low, the value of SLAT is relatively small, and the threshold value T is set u Will be increased appropriately to accommodate more load, and when the load is too high, resulting in an increase in the SLAT value, (1-SLAT) will be decreased, and the threshold T will be decreased u The energy consumption is reduced by reducing and further reducing the SLAT, the high load threshold value can be dynamically adjusted within a certain range by the formula, the larger the high load threshold value is, the larger the SLAT is, but the energy consumption is reduced, and the energy consumption is larger although the situation of violating the SLAT is less when the threshold value is small.
5. The method according to claim 1, wherein in steps A2, A3 and A4, a threshold of the server is calculated according to the obtained current and historical load information of the server and the virtual machine, the state of the server in the current time period is analyzed, and the server in the high load state and the server in the low load state are screened out.
6. The virtual machine-based server integration method according to claim 1, wherein in the step A5, an integration scheme is derived and integration is performed by using a server local integration algorithm based on bidirectional forwarding detection, and the local integration algorithm based on bidirectional forwarding detection comprises the following steps:
(1) Arranging virtual machine sets to be migrated in a descending order according to the use condition of the CPU utilization rate;
(2) Screening out a server group capable of accommodating the virtual machine;
(3) Estimating energy consumption between the virtual machine and a server capable of accommodating the virtual machine, and selecting the server with the minimum energy consumption increase after the virtual machine is migrated to the server as a migration target server;
(4) And migrating the corresponding virtual machine to the target server according to the obtained server integration scheme.
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 CN109901932A (en) 2019-06-18
CN109901932B true 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)

Families Citing this family (6)

* 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
CN111562967B (en) * 2020-05-09 2023-04-07 广东工业大学 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
CN113157435B (en) * 2021-03-01 2023-11-24 长沙学院 Virtual machine deployment method and system with energy efficiency as target of cloud data center
CN113075995B (en) * 2021-04-26 2024-02-27 华南理工大学 Virtual machine energy-saving integration method, system and storage medium based on hybrid group intelligence

Citations (4)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9363190B2 (en) * 2013-07-31 2016-06-07 Manjrasoft Pty. Ltd. System, method and computer program product for energy-efficient and service level agreement (SLA)-based management of data centers for cloud computing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
基于蚁群优化算法的云计算资源负载均衡研究;孟凡超 等;《华中科技大学学报(自然科学版)》;20131231;第41卷;第57-62页 *

Also Published As

Publication number Publication date
CN109901932A (en) 2019-06-18

Similar Documents

Publication Publication Date Title
CN109901932B (en) Server integration method based on virtual machine
Yang et al. A multi-objective task scheduling method for fog computing in cyber-physical-social services
Yiqiu et al. Cloud computing task scheduling algorithm based on improved genetic algorithm
CN105159751B (en) The virtual machine migration method of energy efficient in a kind of cloud data center
US7305536B2 (en) Storage system capable of relocating data
CN108416465B (en) Workflow optimization method in mobile cloud environment
CN107197053A (en) A kind of load-balancing method and device
CN107220108B (en) Method and system for realizing load balance of cloud data center
CN111489188A (en) Resident adjustable load potential mining method and system
CN112019620A (en) Web cluster load balancing algorithm and system based on Nginx dynamic weighting
CN107423109B (en) Anonymous random variable-based virtual machine energy-saving scheduling method
Fu et al. Energy-aware vm initial placement strategy based on bpso in cloud computing
CN112256402A (en) Cloud platform data center resource prediction and scheduling method and system
CN111290831A (en) Virtual machine migration method based on reinforcement learning for cloud computing
Sonklin et al. A decrease-and-conquer genetic algorithm for energy efficient virtual machine placement in data centers
CN111176784B (en) Virtual machine integration method based on extreme learning machine and ant colony system
CN109976879B (en) Cloud computing virtual machine placement method based on resource usage curve complementation
Jiang et al. An energy-aware virtual machine migration strategy based on three-way decisions
CN108388471B (en) Management method based on double-threshold constraint virtual machine migration
CN111930484B (en) Power grid information communication server thread pool performance optimization method and system
CN117076882A (en) Dynamic prediction management method for cloud service resources
CN112637286A (en) Network architecture adjusting method, device, system and computer readable storage medium
CN115934349A (en) Resource scheduling method, device, equipment and computer readable storage medium
CN110888713A (en) Trusted virtual machine migration algorithm for heterogeneous cloud data center
CN113157435B (en) Virtual machine deployment method and system with energy efficiency as target of cloud data center

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