Energy-saving method and system for data center

By calculating server migration priority and load correlation, the load balancing factor is used to optimize the virtual machine migration solution, which solves the problems of load imbalance and frequent virtual machine migration in the data center, and realizes load balancing and energy consumption optimization in the data center.

CN119356863BActive Publication Date: 2025-08-22ZHENGZHOU DIGITAL ZHENGTONG INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411403203.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2025-08-22
Estimated Expiration
2044-10-09

AI Technical Summary

Technical Problem

In data centers, task migration may lead to unbalanced server operation load and frequent virtual machines migration, thereby increasing power consumption, which is difficult to effectively solve in the existing technology.

Method used

By calculating the migration priority and load correlation of each server, the load balancing factor is used to optimize the virtual machine migration scheme to ensure that the load indicators of the migrated server are minimized, and frequent virtual machines are avoided. Hot or cold migration technology is used for server hibernation management.

Benefits of technology

It realizes load balancing and energy consumption optimization in the data center, reduces energy consumption waste caused by frequent migration of virtual machines, and improves energy saving efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119356863B_ABST
    Figure CN119356863B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of data processing for computer resource allocation, and more particularly to a data center-oriented energy-saving method and system, comprising: recording a server with the highest migration priority as an outgoing server, recording other servers other than the outgoing server as incoming servers, obtaining an imbalance factor for the incoming servers based on differences in migration priorities between the incoming servers, obtaining a load index for the incoming servers based on differences in loads of the incoming servers and the imbalance factor for the incoming servers, and migrating all virtual machines from the outgoing servers to all the incoming servers so that the load index of all incoming servers after migration is minimized. The present invention further improves energy-saving efficiency while ensuring load balancing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing for computer resource allocation, and in particular to an energy-saving method and system for data centers. Background Art

[0002] A data center is a facility that centrally manages computing resources, storage resources, and network resources. It is used to store, process, and transmit large amounts of data. It often consumes enormous amounts of electricity during operation. To conserve power consumption in a data center, it is necessary to rationally control the use of computing resources, storage resources, and network resources. Patent CN117519980B discloses an energy-saving data center that migrates tasks running on low-load servers to other servers, making the low-load servers idle and saving server power consumption.

[0003] However, when migrating tasks, all or most of the tasks of the low-load server need to be migrated to other servers. If the migration method is unreasonable, on the one hand, it will cause unbalanced load on other servers, and on the other hand, it may cause some tasks to be migrated multiple times and frequently, which will cause the migration process to consume more electricity. Summary of the Invention

[0004] To solve the above problems, the present invention provides an energy-saving method and system for a data center.

[0005] The energy-saving method and system for data centers of the present invention adopt the following technical solutions:

[0006] An embodiment of the present invention provides an energy-saving method for a data center, the method comprising the following steps:

[0007] Each server in the data center runs several virtual machines. The sum of the loads of all virtual machines is taken as the load of each server. The migration priority of each server is negatively correlated with the load of each server.

[0008] The server with the highest migration priority is recorded as the migration-out server, and the other servers are recorded as the migration-in servers; any migration-in server is recorded as the reference server, and the migration priority of the reference server is recorded as T;

[0009] The difference in migration priority between all incoming servers with a migration priority greater than or equal to T and the reference server is recorded as the first difference. The difference in migration priority between all incoming servers with a migration priority less than T and the reference server is recorded as the second difference. The imbalance factor of the reference server is obtained based on the first difference and the second difference.

[0010] Migrate all virtual machines from the outgoing servers to all incoming servers so that the load index of all incoming servers is minimized after the migration. The load index of each incoming server is obtained as follows:

[0011] For all the migrated servers after migration, any one of them is recorded as A, and the difference between the load of all the migrated servers and the load of A is obtained. The difference between the difference and the imbalance factor of A is recorded as the load index of A.

[0012] Preferably, the difference in migration priority between all incoming servers having a migration priority greater than or equal to T and the reference server is recorded as a first difference, and the difference in migration priority between all incoming servers having a migration priority less than T and the reference server is recorded as a second difference. The imbalance factor of the reference server is obtained based on the first difference and the second difference, and the specific steps include the following:

[0013] The average migration priority of all incoming servers with a migration priority greater than or equal to T is recorded as T1, and the average migration priority of all incoming servers with a migration priority less than T is recorded as T2. As the imbalance factor of the reference server, T1-T is the first difference and T-T2 is the second difference.

[0014] Preferably, the step of obtaining the difference between the load of all migrated servers and the load of A includes the following specific steps:

[0015] The absolute value of the difference between the load of each migrated server and the load of A is recorded as the third difference of each migrated server, and the average of the third differences of all migrated servers is obtained, which represents the difference between the load of all migrated servers and the load of A.

[0016] Preferably, the difference between the difference and the imbalance factor of A is recorded as the load index of A, and the specific steps included are as follows:

[0017] The difference between the load of all migrated servers and the load of A is recorded as difference F; the absolute value of the difference between difference F and the imbalance factor of A is recorded as the load index of A.

[0018] Preferably, the step of migrating all virtual machines from the outgoing servers to all incoming servers so that the load index of all incoming servers after the migration is minimized includes the following specific steps:

[0019] All virtual machines in the outgoing server are recorded as virtual machines to be migrated out, and all virtual machines to be migrated out are randomly assigned to all incoming servers. Each assignment method is recorded as a migration plan; under each migration plan, all virtual machine migrations of each incoming server include the virtual machine to be migrated out, and the average of the load indicators of all incoming servers is recorded as the imbalance of each migration plan; among all migration plans, the migration plan with the smallest imbalance is recorded as the final migration plan, and the final migration plan includes the incoming server to which the virtual machine to be migrated is assigned, and the virtual machine to be migrated is migrated to the assigned incoming server.

[0020] Preferably, the step of migrating the virtual machine to be migrated to the allocated migration server includes the following specific steps: placing the migration server in a dormant state.

[0021] Preferably, after the outgoing server is in a dormant state, the outgoing server and the final migration plan are obtained again after a preset time period, and the virtual machines to be migrated in the outgoing server are migrated to the incoming server according to the final migration plan; and so on, until the number of outgoing servers obtained is greater than or equal to the preset number N.

[0022] Preferably, the specific calculation formula of the migration priority of each server is as follows: migration priority Q=exp(-q), where q represents the load of each server, and exp() represents an exponential function with a natural constant as the base.

[0023] Preferably, the specific steps of obtaining the load of the virtual machine are as follows:

[0024] The CPU usage sequence, data traffic sequence, memory access sequence and data storage sequence of the virtual machine are obtained, and the CPU usage sequence, data traffic sequence, memory access sequence and data storage sequence are linearly normalized respectively. The means of the CPU usage sequence, data traffic sequence, memory access sequence and data storage sequence after linear normalization are denoted as f1, f2, f3 and f4 respectively. The mean of f1, f2, f3 and f4 is denoted as the load of each virtual machine.

[0025] In addition, an embodiment of the present invention also provides an energy-saving system for a data center, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned energy-saving method for a data center are implemented.

[0026] The beneficial effects of the technical solution of the present invention are:

[0027] The present invention obtains the imbalance factor of the incoming server based on the migration priority of the incoming server, indicating the difference in migration priority between each incoming server and other incoming servers, and is used to describe whether the incoming server needs to pay attention to load balancing. Furthermore, the present invention migrates all virtual machines from the outgoing server to all incoming servers, minimizing the load indicators of all incoming servers. This avoids the situation where virtual machines in certain incoming servers (i.e., incoming servers with larger imbalance factors) are immediately migrated out after being migrated in (i.e., frequent migration). At the same time, it ensures that all incoming servers have a certain degree of load balancing, especially those with smaller imbalance factors, thereby further improving energy efficiency while ensuring load balancing. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0029] Figure 1 A flowchart of the steps of a data center energy-saving method provided by one embodiment of the present invention. DETAILED DESCRIPTION

[0030] To further illustrate the technical means and effectiveness of the present invention in achieving its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, describes in detail the specific implementation, structure, features, and effectiveness of the energy-saving method and system for data centers proposed by the present invention. In the following description, different references to "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.

[0031] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0032] The specific scheme of the energy-saving method and system for data centers provided by the present invention will be described in detail below with reference to the accompanying drawings.

[0033] Data centers typically contain numerous servers, each equipped with hardware resources such as a CPU, storage devices, and network equipment, used for logical computing, data reading and writing, and network access. To more efficiently utilize hardware resources and improve flexibility and management efficiency, each server's hardware resources (CPU, memory, storage, and network) are abstracted and allocated to multiple virtual machines (VMs). Each VM runs an independent operating system and applications to perform its corresponding tasks.

[0034] When the energy consumption of a data center is high, all virtual machines in several low-load servers need to be migrated to other servers in turn. When the migration plan is inappropriate, it will cause serious load imbalance in other servers after the virtual machines are migrated, resulting in insufficient computing resources for some servers and surplus computing resources for other servers. Although an additional server balancing process can be performed to solve this problem, it will not only occupy more computing resources, but also bring additional energy consumption. Even if the energy consumption problem of balancing is not considered, the following problem will still exist: the virtual machines in some servers are migrated to another server during balancing, and then in order to save energy, the virtual machines need to be migrated to other servers again, resulting in frequent migration of virtual machines, and thus the problem of low energy saving efficiency.

[0035] Example 1:

[0036] See also Figure 1 , which shows a flowchart of the steps of the energy-saving method for a data center provided by the first embodiment of the present invention, the method includes the following steps:

[0037] Step S001: Several virtual machines are running in each server in the data center. The sum of the loads of all virtual machines is taken as the load of each server. The migration priority of each server is negatively correlated with the load of each server.

[0038] The load of a virtual machine is used to describe the usage of server hardware resources (such as CPU, storage devices, network devices, etc.) when the virtual machine is working.

[0039] As an example, the load of each virtual machine is obtained as follows:

[0040] In the recent time period (for example, within the last hour), the CPU usage of the virtual machine per second constitutes the CPU usage sequence, the network data traffic per second (equal to the sum of the upstream data volume and the downstream data volume of the network device) constitutes the data traffic sequence, the number of memory reads and writes per second is recorded as the memory access sequence, and the number of external storage device reads and writes per second is recorded as the data storage sequence.

[0041] The CPU usage, data traffic, memory access, and data storage sequences are linearly normalized. The means of these sequences after linear normalization are denoted as f1, f2, f3, and f4, respectively. The mean of f1, f2, f3, and f4 is the load of each virtual machine. The purpose of linear normalization is to remove interference from dimensions and orders of magnitude.

[0042] In other embodiments, other hardware resources may be added when calculating the load. For example, the number of times a virtual machine refreshes its display screen per second in a recent time period may constitute a refresh sequence. The load of each virtual machine may be further calculated based on the refresh sequence and the other sequences. The specific method is similar to that described above and will not be further described in this embodiment.

[0043] The greater the load of each virtual machine, the more hardware resources the virtual machine consumes.

[0044] The sum of the loads of all virtual machines within a server is taken as the load of each server. The migration priority of each server is negatively correlated with its load. That is, the lighter the server load, the more likely it is that all virtual machines on that server will need to be migrated out (i.e., the higher the migration priority). This will then put the server into a sleep or low-power state, thereby reducing its energy consumption.

[0045] This embodiment reduces the energy consumption of some servers (ie, servers with smaller loads) by migrating virtual machines from multiple servers with smaller loads, thereby making the data center more energy-efficient.

[0046] As an example, the migration priority of each server is calculated as follows:

[0047] The migration priority of each server is Q=exp(-q), where q represents the load of each server, and exp() represents an exponential function with a natural constant as the base.

[0048] In other embodiments, Q may be set to 1 / (q+1).

[0049] Step S002: record the server with the highest migration priority as the outgoing server, and record other servers except the outgoing server as incoming servers; record any incoming server as the reference server, and record the migration priority of the reference server as T; the difference in migration priority between all incoming servers with a migration priority greater than or equal to T and the reference server is recorded as the first difference, and the difference in migration priority between all incoming servers with a migration priority less than T and the reference server is recorded as the second difference, and obtain the imbalance factor of the reference server based on the first difference and the second difference.

[0050] One feasible method to achieve energy saving in the data center is to migrate all virtual machines from the server with the highest migration priority (i.e., the server to be migrated out). After the migration is completed, after a preset time period (e.g., after 1 hour), migrate all virtual machines from the server with the highest migration priority among the remaining servers.

[0051] When migrating virtual machines, it is necessary to determine which incoming server each virtual machine in the outgoing server will be migrated to. All virtual machines in the outgoing server can be migrated to different incoming servers using different migration plans.

[0052] For example, if the virtual machines in the servers being migrated out are a1, a2, and a3, and the virtual machines being migrated into are b1 and b2, respectively; then, one migration plan is: a1 and a2 are both migrated to b1, and a3 is migrated to b2; other migration plans include: a1 is migrated to b1, and a2 and a3 are migrated to b2; and a2 and a3 are both migrated to b1, and a1 is migrated to b2; here, this embodiment does not list other migration plans one by one.

[0053] An inappropriate migration solution will not only cause serious load imbalance on the migrated server, but also cause the virtual machine to be frequently migrated, resulting in low energy saving efficiency.

[0054] For example, after a1 and a2 are migrated to b1, b1 has the highest migration priority. At this time, a1 and a2 need to be migrated out, and so on. As a result, a1 and a2 may be migrated multiple times in a short period of time (for example, within the last 2 to 5 hours), which is not conducive to energy saving.

[0055] In this embodiment, the difference in migration priority between all incoming servers with a migration priority greater than or equal to T and the reference server is recorded as the first difference, and the difference in migration priority between all incoming servers with a migration priority less than T and the reference server is recorded as the second difference. The imbalance factor of the reference server is obtained based on the first difference and the second difference.

[0056] The imbalance factor of the reference server is used to describe the difference in migration priority between the reference server and other migrated servers. Its function is: when the virtual machines in the migrated-out server are migrated to the migrated-in server respectively, according to the imbalance factor, some of the migrated-in servers are allowed to focus on the load balance, while the other parts do not need to pay too much attention to the load balance. Ultimately, while ensuring a certain degree of load balance on the migrated-in server, it avoids the situation where virtual machines are frequently migrated due to inappropriate migration plans, thereby further improving energy saving efficiency.

[0057] As an example, obtaining the imbalance factor of the reference server includes the following steps:

[0058] The average migration priority of all incoming servers with a migration priority greater than or equal to T is recorded as T1, and the average migration priority of all incoming servers with a migration priority less than T is recorded as T2. As the imbalance factor of the reference server, where T1-T is the first difference, and T-T2 is the second difference. The purpose of adding 1 to both the numerator and denominator in the formula is to avoid the denominator being zero. In other embodiments, 1 in the formula can be replaced with other values ​​greater than 0, which is not specifically limited in this embodiment.

[0059] A larger imbalance factor indicates that the difference between the reference server's migration priority and T2 is smaller, while the difference with T1 is larger. This indicates that the reference server is more likely to be used as a migration-out server in the future. At this time, the virtual machines in it need to be migrated out. Therefore, there is less need to pay attention to load balancing when migrating virtual machines to the reference server.

[0060] Step S003: Migrate all virtual machines in the outgoing servers to all incoming servers so that the difference in load indicators of all incoming servers after migration is minimized, wherein the load indicator is obtained by the imbalance factor.

[0061] The load index of each migrated server is calculated as follows:

[0062] All virtual machines to be migrated from the server are recorded as virtual machines to be migrated;

[0063] Any one of all the migrated servers after the virtual machine migration is recorded as A, and the load of A is obtained.

[0064] It should be noted that the term "all migrated servers" after a virtual machine migration refers to all migrated servers after migration according to any migration plan. In some migration plans, some outgoing virtual machines need to be migrated to A. In this case, the load of A is the sum of the loads of all virtual machines in A (including the loads of outgoing virtual machines that need to be migrated to A). In other migration plans, no virtual machines are migrated to A. In this case, the load of A is the sum of the loads of all virtual machines in A throughout its history.

[0065] For all migrated servers after virtual machine migration, the absolute value of the difference between the load of each migrated server and A is recorded as the third difference of each migrated server, the average of the third differences of all migrated servers is recorded as difference F, and the absolute value of the difference between difference F and the imbalance factor of A is recorded as A's load index.

[0066] In the above process, for each migration plan, each migrated server obtains a corresponding load indicator.

[0067] It should be noted that when the imbalance factor of a migrating server is large, the migrating server is less concerned with load balancing when migrating virtual machines, resulting in a larger load index. In other words, when the imbalance factor of a migrating server is large, the difference F needs to be large to reduce the load index. A larger difference F indicates a greater load difference between other migrating servers and A, meaning that A is unbalanced compared to other migrating servers.

[0068] When the imbalance factor of a migrating server is small, it needs to pay more attention to load balancing when migrating virtual machines, and the load index is small. In other words, when the imbalance factor of a migrating server is small, the difference F needs to be small to achieve a small load index. The smaller the difference F, the smaller the load difference between other migrating servers and A, indicating that A is more balanced than other migrating servers.

[0069] In summary, there are multiple solutions for migrating all virtual machines from the outgoing servers to all incoming servers. If there is a solution that minimizes the load index of all incoming servers, then the incoming servers with smaller imbalance factors can be kept as balanced as possible (i.e., they participate primarily in the adjustment of the balance state), while allowing the incoming servers with larger imbalance factors to be unbalanced (i.e., they do not participate primarily in the adjustment of the balance state). This solution serves as the final migration solution. Under this final migration solution, it avoids the situation where virtual machines in certain incoming servers (i.e., those with larger imbalance factors) are immediately migrated out after being migrated in (i.e., frequent migration situations), while ensuring that all incoming servers have a certain degree of load balancing, especially those with smaller imbalance factors.

[0070] As a preferred example, a method for obtaining a final migration plan in which the load indicators of all migrated servers are minimized includes:

[0071] All virtual machines to be migrated are randomly assigned to all incoming servers. Each assignment method is a migration plan. For example, if the virtual machines on the outgoing servers (i.e., the virtual machines to be migrated) are a1, a2, and a3, and the incoming servers are b1 and b2, then randomly assigning a1, a2, and a3 to b1 and b2 yields an assignment method, also known as a migration plan.

[0072] Under each migration scenario, all virtual machines migrated from each incoming server include the virtual machine to be migrated out. For example, if a1 and a2 are assigned to b1, and a3 is assigned to b2, a1 and a2 will also be virtual machines in b1, and a3 will be a virtual machine in b2. As described above, the load of each incoming server (such as A) is the sum of the loads of all virtual machines, including the virtual machine to be migrated out. Similarly, the load index of each incoming server is calculated.

[0073] The average of the load indicators of all migrated servers is used as the imbalance of each migration plan; the imbalance of each migration plan describes the difference between the loads of all migrated servers under each migration plan.

[0074] At this point, the imbalance of each migration plan obtained after each random allocation is determined. In this embodiment, random allocation is performed 100 times, resulting in 100 migration plans. The migration plan with the least imbalance among these 100 migration plans is recorded as the final migration plan. In other embodiments, 100 can be replaced with other values, and this embodiment does not specifically limit this.

[0075] As an optional example, a method for obtaining the final migration plan in which the load indicators of all migrated servers are minimized includes:

[0076] List all migration plans, and then obtain the imbalance of each migration plan. The migration plan with the smallest imbalance is recorded as the final migration plan.

[0077] It should be noted that when the number of virtual machines to be migrated out and servers to be migrated in is relatively large, the number of migration solutions included is also relatively large (for example, greater than 100). At this time, when the above optional examples are used, the amount of computation consumed is large. At this time, the above preferred examples can be used. Although the above preferred examples cannot obtain the migration solution with the global minimum imbalance, resulting in an accuracy rate not as high as the optional examples, the computational cost is small. When the number of virtual machines to be migrated out and servers to be migrated in is relatively small, the number of migration solutions included is also relatively small (for example, less than or equal to 100). At this time, the above optional examples can be used, and the accuracy of the optional examples is relatively high.

[0078] The final migration plan includes the migration server to which the virtual machine to be migrated is assigned, and the virtual machine to be migrated is migrated to the assigned migration server. For example, the final migration plan is to assign a1 to b1, and a2 and a3 to b2; then, a1 is migrated to b1 using hot migration, and a2 and a3 are also migrated to b2 using hot migration. Hot migration is one of the virtual machine migration methods, and can be performed without powering off the server. In other embodiments, cold migration (requiring a server power-off for migration) can also be used. Virtual machine migration methods are well known technologies and will not be described in detail in this embodiment.

[0079] After all virtual machines in the migrated server have been migrated out, the migrated server enters a dormant state. Then, after a preset time period (e.g., one hour), the migrated server is retrieved again and all virtual machines in the migrated server are migrated out according to the method from step S002 to step S003. The migrated server is then put into a dormant state. This process is repeated until the number of migrated servers is greater than or equal to N. In other embodiments, the power consumption of the entire data center can be retrieved in real time. Retrieval of migrated servers is stopped when the power consumption is less than a set rated power.

[0080] N is greater than or equal to 2. This embodiment is described by taking N equal to 25% of the number of all servers as an example. In other embodiments, it can be set to other values, which are not specifically limited in this embodiment.

[0081] Example 2:

[0082] This embodiment provides an energy-saving system for a data center. The system includes a memory, a processor, and a computer program stored in the memory and executable on the processor. The system also includes an interactive button. Each time a data center administrator presses the interactive button, the computer program executes steps S001 to S003 described above. When the number of servers to be migrated out is greater than or equal to N, the system stops acquiring servers to be migrated out and stops the computer program.

[0083] The data center manager presses the interactive button according to the actual energy consumption of the data center to achieve energy-saving operation of the data center. In this embodiment, the data center manager presses the interactive button once every other day.

[0084] In this embodiment, the virtual machine migration process and the process of migrating out of the server and entering the dormant state involved in pressing the interaction button once are recorded as one energy consumption optimization process.

[0085] Example 3:

[0086] Any migrated server is recorded as a reference server. This embodiment provides another method for obtaining the imbalance factor of the reference server, including:

[0087] During an energy consumption optimization process, after obtaining a migration server (denoted as migration server M) and before virtual machine migration is performed, it is determined whether other migration servers have been obtained before M. If no other migration servers have been obtained, the imbalance factor of the reference server obtained according to the method of Example 1 is used.

[0088] When other migration servers are obtained before M, the other migration servers obtained before M are recorded as historical migration servers, and the final migration plan for the migration of the virtual machine in the historical migration server is obtained (see Example 1 for the specific process), and the mean of the imbalance of these final migration plans is recorded as R.

[0089] First, the imbalance factor of the reference server is obtained according to the method described in Example 1, which is recorded as r, and exp(-R)×r is used as the final imbalance factor of the reference server (that is, the imbalance factor obtained in this example).

[0090] Finally, the imbalance factor obtained in this embodiment (ie, the final imbalance factor) is used to obtain the final migration plan for the virtual machine migration (see embodiment 1 for the specific process).

[0091] In the above process, a larger R value indicates that, during an energy consumption optimization process, there was a significant load imbalance after the historical virtual machine migration. In this case, using the imbalance factor obtained in this embodiment to obtain the final migration plan can avoid excessive focus on frequent virtual machine migrations, which may lead to serious load imbalance problems on data center servers. A smaller R value indicates that, during an energy consumption optimization process, there was no significant load imbalance after the historical virtual machine migration. In this case, using the imbalance factor obtained in this embodiment to obtain the final migration plan can avoid excessive focus on load imbalance and instead focus on frequent virtual machine migrations.

[0092] In summary, this embodiment further balances the imbalance and frequent migration of virtual machines during an energy consumption optimization process, so that the data center has higher operating efficiency (ie, load balancing) while operating in an energy-saving manner.

[0093] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. An energy-saving method for a data center, characterized in that: The method comprises the following steps: Each server in the data center runs several virtual machines. The sum of the loads of all virtual machines is taken as the load of each server. The migration priority of each server is negatively correlated with the load of each server. The server with the highest migration priority is recorded as the migration-out server, and the other servers are recorded as the migration-in servers; any migration-in server is recorded as the reference server, and the migration priority of the reference server is recorded as T; The difference in migration priority between all incoming servers with a migration priority greater than or equal to T and the reference server is recorded as the first difference. The difference in migration priority between all incoming servers with a migration priority less than T and the reference server is recorded as the second difference. The imbalance factor of the reference server is obtained based on the first difference and the second difference. Migrate all virtual machines from the outgoing servers to all incoming servers so that the load index of all incoming servers is minimized after the migration. The load index of each incoming server is obtained as follows: For all the migrated servers after migration, any one of them is denoted as A, and the difference between the load of all the migrated servers and the load of A is obtained. The difference between the load of all the migrated servers and the imbalance factor of A is recorded as the load index of A; The difference in migration priority between all incoming servers with a migration priority greater than or equal to T and the reference server is recorded as a first difference, and the difference in migration priority between all incoming servers with a migration priority less than T and the reference server is recorded as a second difference. The imbalance factor of the reference server is obtained based on the first difference and the second difference, including the following specific steps: The average migration priority of all incoming servers with a migration priority greater than or equal to T is recorded as T1, and the average migration priority of all incoming servers with a migration priority less than T is recorded as T2. As the imbalance factor of the reference server, For the first difference, The second difference.

2. The energy-saving method for data centers according to claim 1, characterized in that: The specific steps of obtaining the difference between the load of all migrated servers and the load of A are as follows: The absolute value of the difference between the load of each migrated server and the load of A is recorded as the third difference of each migrated server, and the average of the third differences of all migrated servers is obtained, which represents the difference between the load of all migrated servers and the load of A.

3. The energy-saving method for data centers according to claim 1, characterized in that: The difference between the difference and the imbalance factor of A is recorded as the load index of A, and the specific steps include: The difference between the load of all migrated servers and the load of A is recorded as difference F; the absolute value of the difference between difference F and the imbalance factor of A is recorded as the load index of A.

4. The energy-saving method for data centers according to claim 1, characterized in that: The specific steps of migrating all virtual machines from the outgoing servers to all incoming servers so that the load indicators of all incoming servers after the migration are minimized are as follows: All virtual machines in the outgoing servers are recorded as virtual machines to be migrated out. All virtual machines to be migrated out are randomly assigned to all incoming servers. Each assignment method is recorded as a migration scheme. Under each migration scheme, all virtual machines in each incoming server are migrated, including the virtual machines to be migrated out. The average load index of all incoming servers is recorded as the imbalance of each migration scheme. Among all migration plans, the migration plan with the least imbalance is recorded as the final migration plan. The final migration plan includes the migration server assigned to the virtual machine to be migrated out, and the virtual machine to be migrated out is migrated to the assigned migration server.

5. The energy-saving method for data centers according to claim 4, characterized in that: The step of migrating the virtual machine to be migrated to the allocated migration server includes the following specific steps: placing the migration server in a dormant state.

6. The energy-saving method for data centers according to claim 5, characterized in that: After the outgoing server is in a dormant state, the outgoing server and the final migration plan are obtained again after a preset time period, and the virtual machines to be migrated in the outgoing server are migrated to the incoming server according to the final migration plan; The process continues in this way until the number of servers to be migrated out is greater than or equal to the preset number N.

7. The energy-saving method for data centers according to claim 1, characterized in that: The specific calculation formula of the migration priority of each server is as follows: migration priority Q=exp(-q), where q represents the load of each server, and exp() represents an exponential function with a natural constant as the base.

8. The energy-saving method for data centers according to claim 1, characterized in that: The specific steps for obtaining the load of the virtual machine are as follows: The CPU usage sequence, data traffic sequence, memory access sequence and data storage sequence of the virtual machine are obtained, and the CPU usage sequence, data traffic sequence, memory access sequence and data storage sequence are linearly normalized respectively. The means of the CPU usage sequence, data traffic sequence, memory access sequence and data storage sequence after linear normalization are denoted as f1, f2, f3 and f4 respectively. The mean of f1, f2, f3 and f4 is denoted as the load of each virtual machine.

9. An energy-saving system for a data center, the system comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the energy-saving method for a data center as described in any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Energy-saving data center

    CN117519980B

  • Method and system for distributing data center load and saving energy during virtual machine migration

    CN103077082A

  • Cloud data center-oriented computing task cross-region migration method and system

    CN115718644A