Data center-oriented energy saving method and system

By calculating the priority of migration according to the server load in the data center, and using an unbalanced factors to optimize the migration scheme, the problem of load unevenness and electrical energy consumption caused by task migration in the data center can be solved, and the more efficient energy saving effect is achieved.

CN119356863AActive Publication Date: 2025-01-24ZHENGZHOU DIGITAL ZHENGTONG INFORMATION TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In a data center, if the method is not reasonable during task migration, it may cause unbalanced server operation load and some tasks to be frequently migrated, resulting in increased power consumption.

Method used

By running the virtual machine in each server in the data center, migrate the priority of migration according to the load of the server, migrate the virtual machine of the server with a smaller load to the servers with larger loads and optimize the migration scheme through an uneasy factor. To ensure the smallest load indicators to move into the server.

Benefits of technology

Effectively avoid frequent migration of virtual machines, ensure the load balance between the server, and then improve the energy saving efficiency of the data center.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119356863A_ABST
    Figure CN119356863A_ABST
Patent Text Reader

Abstract

The invention relates to the field of data processing for computer resource allocation, in particular to a data center-oriented energy-saving method and system, which comprises the following steps of: recording a server with the maximum migration priority as an emigration server, recording other servers except the emigration server as immigration servers, and recording the immigration priority as the immigration priority; obtaining an imbalance factor of the immigration server according to a migration priority difference between the immigration servers, obtaining a load index of the immigration server according to a difference between loads of the immigration server and the imbalance factor of the immigration server, and migrating all virtual machines in the emigration server to all the immigration servers. And the load indexes of all the migrated immigration servers are minimum. According to the invention, the energy-saving efficiency is further improved while the load balance is ensured.
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 huge amounts of electricity during operation. In order to save the power consumption of the data center, it is necessary to reasonably 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 servers 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] In order 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 except the migration-out server 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 the migrating 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 the migrating 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 according to the first difference and the second difference.

[0010] Migrate all virtual machines in the migrated-out servers to all migrated-in servers, so that the load index of all migrated-in servers after the migration is minimized; the load index of each migrated-in 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 migration priority difference between all the migrating servers with a migration priority greater than or equal to T and the reference server is recorded as a first difference, and the migration priority difference between all the migrating servers with a migration priority less than T and the reference server is recorded as a second difference. The unbalanced factor of the reference server is obtained according to the first difference and the second difference, and the specific steps included are as follows:

[0013] The average migration priority of all servers with a migration priority greater than or equal to T is recorded as T1, and the average migration priority of all 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, and the average represents the difference between the load of all migrated servers and the load of A.

[0016] Preferably, the difference between the difference and the unbalanced 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 in the migrated-out servers to all migrated-in servers so that the load index of all migrated-in servers after the migration is minimized includes the following specific steps:

[0019] All virtual machines in the migrating servers are recorded as virtual machines to be migrated out, and all virtual machines to be migrated out are randomly assigned to all incoming servers, and each assignment method is recorded as a migration plan; under each migration plan, all virtual machine migrations of each incoming server include the virtual machines 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 servers to which the virtual machines to be migrated are assigned, and the virtual machines to be migrated out are migrated to the assigned incoming servers.

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

[0021] Preferably, after the outgoing server is in a dormant state, an outgoing server and a final migration plan are obtained again at an interval of 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), wherein 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, and 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, the system comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the above-mentioned energy-saving method for a data center when executing the computer program.

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

[0027] The present invention obtains the imbalance factor of the migrating server according to the migration priority of the migrating server, which indicates the difference in migration priority between each migrating server and other migrating servers, and is used to describe whether the migrating server needs to pay attention to load balancing. Further, the present invention migrates all virtual machines in the migrating servers to all migrating servers, so that the load index of all migrating servers is minimized, avoiding the situation where the virtual machines in some migrating servers (i.e., the migrating servers with larger imbalance factors) are just migrated in and then immediately migrated out (i.e., the situation of frequent migration), and at the same time ensures that all migrating servers have a certain load balancing, especially the migrating servers with smaller imbalance factors, thereby further improving energy saving 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 drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 creative work.

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

[0030] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the energy-saving method and system for data centers proposed by the present invention, its specific implementation method, structure, features and effects are described in detail below in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[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 is described in detail below with reference to the accompanying drawings.

[0033] Data centers generally contain a large number of servers, each of which is equipped with hardware resources such as CPU, storage devices, and network devices, which are used for logical computing, data reading and writing, and network access. In order to more efficiently utilize hardware resources and improve flexibility and management efficiency, each server abstracts its hardware resources (CPU, memory, storage, and network) and allocates them to multiple virtual machines. Each virtual machine has an independent operating system and application running to perform 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. If the migration plan is not appropriate, the load of other servers after the virtual machines are migrated will be seriously unbalanced, 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 take up more computing resources, but also bring additional energy consumption. Even if the energy consumption problem of balancing processing is not considered, the following problem will 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] Embodiment 1:

[0036] See also Figure 1 , which shows a flowchart of the steps of the energy-saving method for a data center provided by Embodiment 1 of the present invention, the method comprising 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 a 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 a data traffic sequence, the number of memory reads and writes per second is recorded as a memory access sequence, and the number of external storage device reads and writes per second is recorded as a data storage sequence.

[0041] The CPU usage sequence, data traffic sequence, memory access sequence, and data storage sequence are linearly normalized, and the means of the above sequences after linear normalization are recorded as f1, f2, f3, and f4, respectively. The mean of f1, f2, f3, and f4 is recorded as the load of each virtual machine. The purpose of linear normalization is to remove the interference of dimension and order 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 a display screen per second in a recent period of time constitutes a refresh sequence, and the load of each virtual machine is further obtained based on the refresh sequence and the above other sequences. The specific method is the same as above, and this embodiment will not be repeated.

[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 in the server is taken as the load of each server. The migration priority of each server is negatively correlated with the load of each server, that is, when the load of the server is smaller, the server needs to migrate all the virtual machines out (that is, the greater the migration priority), and then put the server into sleep or low power state, thereby reducing the energy consumption of the server.

[0045] This embodiment reduces the energy consumption of some servers (that is, 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=1 / (q+1) may be set.

[0049] Step S002, record the server with the highest migration priority as the outgoing server, and record other servers except the outgoing server as the 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] A 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). When 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 migrated-out servers are a1, a2, and a3, and the migrated-in servers are b1 and b2, then one of the migration plans is: a1 and a2 are 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 migrated to b1, and a1 is migrated to b2; here, this embodiment will 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 unbalanced 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 servers are migrated to the migrated-in servers respectively, some of the migrated-in servers are allowed to focus on the load balance according to the unbalanced factor, 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 servers, 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 unbalanced factor of the reference server includes the following steps:

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

[0059] The larger the imbalance factor is, the smaller the difference between the migration priority of the reference server and T2 is, and the larger the difference with T1 is, which means 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 no need to pay attention to the load balancing when migrating virtual machines to the reference server.

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

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

[0062] Record all virtual machines in the migrated server 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 all the servers migrated after the virtual machine migration refer to all the servers migrated after any migration plan. In some migration plans, some virtual machines to be migrated need to be migrated to A, and the load of A refers to the sum of the loads of all virtual machines in A (including the loads of the virtual machines to be migrated that need to be migrated to A); in other migration plans, no virtual machine is migrated to A, and the load of A is the sum of the loads of all virtual machines in A in the historical process.

[0065] For all migrated servers after the 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 the migrated server is large, the migrated server does not need to pay attention to the load balancing when migrating virtual machines, and the load index is large at this time. In other words, when the imbalance factor of the migrated server is large, the difference F needs to take a larger value to make the load index smaller. The larger the difference F is, the greater the load difference between other migrated servers and A, that is, A is unbalanced compared to other migrated servers.

[0068] When the imbalance factor of the migrated server is small, the migrated server needs to pay more attention to the load balance when migrating virtual machines, and the load index is small at this time. In other words, when the imbalance factor of the migrated server is small, the difference F needs to take a smaller value to make the load index smaller. The smaller the difference F is, the smaller the load difference between other migrated servers and A is, that is, A is balanced compared to other migrated servers.

[0069] In summary, migrating all virtual machines in the outgoing servers to all incoming servers includes multiple solutions. If there is a solution in which the load index of all incoming servers is the smallest, then the incoming servers with smaller imbalance factors can be kept in a balanced state as much as possible (i.e., they focus on adjusting the balanced state), while allowing the incoming servers with larger imbalance factors to be in an unbalanced state (i.e., they do not focus on adjusting the balanced state). This solution is used as the final migration solution. Under the final migration solution, it avoids the situation where virtual machines in some incoming servers (i.e., incoming servers with larger imbalance factors) are just migrated in and then immediately migrated out (i.e., the situation of frequent migration), while ensuring that all incoming servers have a certain load balance, especially the incoming servers with smaller imbalance factors.

[0070] As a preferred example, a method for obtaining a final migration solution when the load index of all migrated servers is the smallest includes:

[0071] All virtual machines to be migrated out are randomly assigned to all servers to be migrated in. Each assignment method is a migration plan. For example, the virtual machines in the servers to be migrated out (i.e., virtual machines to be migrated out) are a1, a2, and a3, and the servers to be migrated in are b1 and b2. Randomly assigning a1, a2, and a3 to b1 and b2 gives a assignment method, i.e., a migration plan.

[0072] Under each migration scheme, the migration of all virtual machines on each server includes the virtual machine to be migrated out. For example, a1 and a2 are assigned to b1, and a3 is assigned to b2. At this time, a1 and a2 are also virtual machines in b1, and a3 is a virtual machine in b2. As mentioned above, the load of each server (such as A above) is the sum of the loads of all virtual machines including the virtual machine to be migrated out. Similarly, the load index of each 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, for each migration scheme obtained after random allocation, the imbalance of the migration scheme is obtained. In this embodiment, random allocation is performed 100 times to obtain 100 migration schemes; among the 100 migration schemes, the migration scheme with the smallest imbalance is recorded as the final migration scheme. In other embodiments, 100 may be replaced by other values, which are not specifically limited in this embodiment.

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

[0076] All migration plans are listed, and then the imbalance of each migration plan is obtained. 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 schemes 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 scheme with the global minimum imbalance, resulting in a lower accuracy than the optional examples, the amount of computation 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 schemes 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 the hot migration method, and a2 and a3 are also migrated to b2 using the hot migration method. The hot migration method is one of the virtual machine migration methods, and the migration can be performed without powering off the server. In other embodiments, the cold migration method (which requires powering off the server for migration) can also be used. The virtual machine migration method is a well-known technology and will not be described in detail in this embodiment.

[0079] After all virtual machines in the migrated server are migrated out, the migrated server enters a dormant state, and then the migrated server is acquired again after a preset time period (for example, after an hour), and all virtual machines in the migrated server are migrated out according to the method of step S002 to step S003, and the migrated server enters a dormant state, and so on, until the number of migrated servers is greater than or equal to N, the acquisition of the migrated server is stopped. In other embodiments, the power consumption of the entire data center can be acquired in real time, and the acquisition of the migrated server is stopped when the power consumption is less than the 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 implementation.

[0081] Embodiment 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, and also includes an interactive button, and each time a data center manager presses the interactive button, the computer program executes the above steps S001 to S003. When the number of migrated servers is greater than or equal to N, the acquisition of migrated servers is stopped, and the operation of the computer program is stopped.

[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 involved in pressing the interactive button once and the process of migrating the server to enter the dormant state are recorded as one energy consumption optimization process.

[0085] Embodiment three:

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

[0087] In an energy consumption optimization process, after obtaining a migration server (referred to as migration server M) and before virtual machine migration is performed, it is determined whether other migration servers are obtained before M. If no other migration servers are obtained, the unbalanced factor of the reference server is obtained according to the method in the first embodiment.

[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 virtual machines in the historical migration servers 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 unbalanced factor of the reference server is obtained according to the method described in the first embodiment, denoted as r, and exp(-R)×r is used as the final unbalanced factor of the reference server (ie, the unbalanced factor obtained in this embodiment).

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

[0091] In the above process, the larger R is, the more obvious load imbalance exists after the migration of virtual machines in the history during an energy consumption optimization process. At this time, the imbalance factor obtained in this embodiment is used to obtain the final migration plan, which can avoid excessive attention to the frequent migration of virtual machines, which may cause serious load imbalance problems in the data center server. When R is smaller, it means that there is no obvious load imbalance after the migration of virtual machines in the history during an energy consumption optimization process. At this time, the imbalance factor obtained in this embodiment is used to obtain the final migration plan, and there is no need to pay too much attention to the load imbalance, but focus on the frequent migration of virtual machines.

[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 protection scope 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 except the migration-out server 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 the migrating 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 the migrating 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 according to the first difference and the second difference. Migrate all virtual machines in the migrated-out servers to all migrated-in servers, so that the load index of all migrated-in servers after the migration is minimized; the load index of each migrated-in server is obtained as follows: 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.

2. The energy-saving method for data centers according to claim 1, characterized in that: The migration priority difference between all the migrating servers with a migration priority greater than or equal to T and the reference server is recorded as a first difference, and the migration priority difference between all the migrating 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 according to the first difference and the second difference, and the specific steps are as follows: The average migration priority of all servers with a migration priority greater than or equal to T is recorded as T1, and the average migration priority of all 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.

3. 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, and the average represents the difference between the load of all migrated servers and the load of A.

4. The energy-saving method for data centers according to claim 1, characterized in that: The difference between the difference and the unbalanced factor of A is recorded as the load index of A, and the specific steps included are as follows: 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.

5. The energy-saving method for data centers according to claim 1, characterized in that: The step of migrating all virtual machines in the migrated-out servers to all the migrated-in servers so that the load index of all the migrated-in servers after the migration is minimized includes the following specific steps: All virtual machines in the outgoing servers 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 scheme. Under each migration scheme, all virtual machine migrations of each incoming server include the virtual machines to be migrated out, and the average of the load indicators of all incoming servers is recorded as the imbalance of each migration scheme. Among all migration plans, the migration plan with the smallest imbalance is recorded as the final migration plan, which includes the migration server to which the virtual machine to be migrated is allocated, and the virtual machine to be migrated is migrated to the allocated migration server.

6. The energy-saving method for data centers according to claim 5, 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.

7. The energy-saving method for data centers according to claim 6, 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; And so on, until the number of the obtained migrated servers is greater than or equal to the preset number N.

8. The energy saving method for data center 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.

9. The energy-saving method for data centers according to claim 1, characterized in that: The specific steps of 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, and the mean of f1, f2, f3 and f4 is denoted as the load of each virtual machine.

10. 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 claimed in any one of claims 1 to 9 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

  • Virtual machine fault migration method and system in distributed data cloud platform

    CN116089013A

  • Intelligent workload migration to optimize power supply efficiencies in computer data centers

    US20190370085A1