A cloud computing energy consumption optimization method, system and medium based on task migration
By establishing an energy consumption model in a cloud computing data center and using the complex correlation coefficient method to identify resource contention rate, optimizing virtual machine migration and shutdown, the problem of high cloud computing energy consumption is solved, and effective reduction of energy consumption and improvement of resource utilization is achieved.
Patent Information
- Application Number
- CN202510545861.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2045-04-28
AI Technical Summary
The existing cooling system optimization technology has poor energy consumption in cloud computing data centers, affecting the overall performance of the server. How to effectively reduce the energy consumption in the power cloud computing process has become an urgent problem.
By establishing an energy buffer model for each server in the target cloud computing data center in different states, using the complex correlation coefficient method to calculate the resource contention rate between virtual machines, determining the list of servers to be migrated, and sorting it according to priority, performing virtual machine task migration and shutdown operations to minimize total energy consumption.
Effective optimization of the energy consumption of cloud computing data centers has been achieved, ensuring maximum resource utilization and reducing overall energy consumption.
Smart Images

Figure CN120066235B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power cloud computing, and in particular to a method, system and medium for optimizing cloud computing energy consumption based on task migration. Background Art
[0002] The power industry is complex, encompassing both tightly coupled critical business systems and numerous loosely coupled business systems. These loosely coupled systems also involve a wide range of hardware and software platforms, including databases and web applications. The hardware configuration and performance of these servers can impact the stability of these systems. Cloud computing (CC), as a distributed computing paradigm, not only provides massive computing and storage resources but also deploys a wide range of flexible analysis and processing capabilities, offering efficient solutions for virtually all types of large-scale computing. However, the growing demand for cloud services and the rapid expansion of cloud data centers have led to a dramatic increase in data center energy consumption.
[0003] Existing cooling system optimization technologies are often affected by the external environment when dealing with the energy consumption of cloud computing data centers, resulting in poor results in reducing the energy consumption of cloud computing data centers and affecting the overall performance of the server.
[0004] It can be seen that how to effectively reduce energy consumption in the process of power cloud computing and improve server performance has become a technical problem that needs to be urgently solved by technical personnel in this field. Summary of the Invention
[0005] The present invention provides a cloud computing energy consumption optimization method, system and medium based on task migration to solve the problem of how to accurately determine the server to be migrated and its energy consumption status, so as to ensure the utilization rate of resources.
[0006] To solve the above technical problems, embodiments of the present invention provide a method, system, and medium for optimizing cloud computing energy consumption based on task migration, including:
[0007] Construct a server total energy consumption model based on the energy consumption sub-models of each server in different states in the target cloud computing data center;
[0008] Taking minimizing the total energy consumption output by the server total energy consumption model as the objective function, the resource contention rate between the current task and other tasks running on each virtual machine in each server is calculated using the complex correlation coefficient method;
[0009] Determining a list of servers to be migrated according to the resource contention rate and the resource utilization rate of each server, and sorting the servers to be migrated in the list of servers to be migrated according to a preset priority;
[0010] According to the sorting results, energy consumption optimization operations of virtual machine task migration and shutdown are performed in sequence on the servers to be migrated.
[0011] Furthermore, the server total energy consumption model is constructed based on the established energy consumption sub-models of each server in different states, including:
[0012] Establish energy consumption sub-models reflecting computing energy consumption, storage energy consumption, network energy consumption, idle energy consumption, sleep energy consumption and conversion energy consumption of each server in working, conversion, idle, sleep and shutdown states;
[0013] The energy consumption sub-models are integrated to establish the total energy consumption model of the server.
[0014] Furthermore, the calculating of the resource contention ratio between the current task and other tasks running on each virtual machine in each server includes:
[0015] Obtain and vectorize the resource requirements of each task running on each virtual machine; the resource requirements reflect the amount of CPU resources, storage resources, and network device resources required by the task on the server;
[0016] The complex correlation coefficient between the first vector matrix corresponding to the resource demand of the current task and the second vector matrix composed of the resource demands of other tasks is calculated, and the resource contention rate between the tasks in each virtual machine is determined according to the complex correlation coefficient.
[0017] Furthermore, determining a list of servers to be migrated based on the resource contention rate and the resource utilization rate of each server includes:
[0018] The virtual machine migration and integration requirements are used as adjustment parameters, and the absolute median difference method is used to dynamically set the high-load threshold and low-load threshold of resource utilization;
[0019] The servers whose resource utilization is lower than the low load threshold and whose resource contention rate meets the preset value are included in the list of servers to be migrated.
[0020] Furthermore, the virtual machine migration and integration requirements are used as adjustment parameters, and the absolute median difference method is used to dynamically set the high-load threshold and the low-load threshold of resource utilization, including:
[0021] The high load threshold and the low load threshold are expressed by the following formula:
[0022]
[0023] Where S is the requirement for virtual machine migration and integration; is the high load threshold, is the low load threshold; is the absolute median difference.
[0024] Furthermore, the process of determining the server list to be migrated based on the resource contention rate and the resource utilization rate of each server further includes:
[0025] Determine a group of candidate servers as candidate variables according to the multiple correlation coefficient, and perform information scoring on each of the candidate variables;
[0026] A forward search strategy is used to traverse the scored candidate variables. When the cumulative information contribution rate reaches the preset condition, the target variable set is determined, and the corresponding servers in the target variable set are included in the list of servers to be migrated.
[0027] Furthermore, the step of sequentially performing virtual machine task migration and shutdown operations on the server to be migrated according to the sorting results includes:
[0028] Adding servers whose resource utilization exceeds the high-load threshold and servers that have been shut down to a list of servers that cannot be migrated;
[0029] According to the sorting results, the target servers excluding the servers in the non-migratable server list are sequentially allocated to the virtual machines in the servers to be migrated;
[0030] The server that has performed the virtual machine allocation is shut down and migrated to the non-migratable server list.
[0031] Another embodiment of the present invention provides a cloud computing energy consumption optimization system based on task migration, comprising:
[0032] An energy consumption model building module is used to build a server total energy consumption model based on the energy consumption sub-models of each server in different states in the established target cloud computing data center;
[0033] A resource contention rate determination module is used to calculate the resource contention rate between the current task and other tasks running on each virtual machine in each server using a complex correlation coefficient method, taking the total energy consumption output by the server total energy consumption model as the objective function;
[0034] a server list determination module for determining a server list to be migrated according to the resource contention rate and the resource utilization rate of each server, and sorting the servers to be migrated in the server list to be migrated according to a preset priority;
[0035] The energy consumption optimization module is used to perform energy consumption optimization operations of virtual machine task migration and shutdown on the server to be migrated in sequence according to the sorting results.
[0036] Another embodiment of the present invention provides a computer device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the cloud computing energy consumption optimization method based on task migration as described above is implemented.
[0037] Yet another embodiment of the present invention provides a computer-readable storage medium storing a computer program, wherein when the device where the computer-readable storage medium is located executes the computer program, the cloud computing energy consumption optimization method based on task migration as described above is implemented.
[0038] Compared with the prior art, the embodiments of the present invention have the following advantages:
[0039] This embodiment of the present invention establishes an energy consumption model to accurately assess server energy consumption under different workloads and conditions. By setting an objective function to minimize energy consumption and combining it with a complex correlation coefficient to determine server task migration, the system can effectively identify and optimize inefficient servers. Once tasks on a server are migrated to the target server, the system can safely shut down these idle servers, ensuring maximum resource utilization and reducing overall energy consumption. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 This is a flow chart of a method for optimizing cloud computing energy consumption based on task migration in one embodiment of the present invention;
[0041] Figure 2 This is a schematic diagram of the structure of a cloud computing energy consumption optimization system based on task migration in one embodiment of the present invention;
[0042] Figure 3 This is a structural block diagram of a preferred embodiment of a computer device provided by the present invention. DETAILED DESCRIPTION
[0043] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. The purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0044] In the description of this application, the terms "first," "second," "third," etc. are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, a feature specified as "first," "second," "third," etc. may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.
[0045] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be a communication between the two components. The terms "vertical", "horizontal", "left", "right", "up", "down" and similar expressions used herein are for illustrative purposes only, and do not indicate or imply that the device or component referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0046] In the description of this application, it should be noted that, unless otherwise defined, all technical and scientific terms used in this application have the same meanings as those commonly understood by those skilled in the art. The terms used in this specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. Those skilled in the art will understand the specific meanings of the above terms in this application in specific circumstances.
[0047] An embodiment of the present invention provides a cloud computing energy consumption optimization method based on task migration. For details, see Figure 1 , Figure 1 The figure shows a flow chart of a method for optimizing cloud computing energy consumption based on task migration in one embodiment of the present invention, which includes the following steps:
[0048] S1. Construct a server total energy consumption model based on the energy consumption sub-models of each server in different states in the established target cloud computing data center.
[0049] It is understandable that in a cloud computing data center, the energy consumption of a server in an idle state during actual operation is usually 70% of the energy consumption in a fully loaded state. Therefore, in this embodiment, β is used to represent the ratio of idle power consumption to fully loaded power consumption, and β is preferably 0.7. The relationship between the actual power of the server and the idle power, fully loaded power and CPU utilization can be expressed as
[0050]
[0051] Where, Indicates the actual power, Indicates the power at no load, Indicates the power at full load, Indicates the usage rate.
[0052] From the above formula, we can see that Indicates that the server's runtime power closely follows CPU utilization The energy consumption of the server during the target time is expressed as:
[0053]
[0054] It should be understood that reducing server energy consumption means reducing the server's idle time. For a server that runs for a long time, energy consumption is only useful when it is processing tasks. The rest of the time when the server is idle and waiting is energy waste.
[0055] Shutting down idle servers directly improves energy efficiency. However, if a large number of servers are shut down, the number of active servers will fall short of meeting user resource requirements, violating the SLA. This will necessitate restarting servers from the shutdown queue to increase resources available to process user requests. Therefore, based on the above formula, as an example, in some embodiments of the present invention, the power consumption of the jth server in a cloud data center is expressed as follows:
[0056]
[0057] Where, Indicates the power consumption in idle state; Indicates the duration of the jth server being turned on; represents the energy consumption of the kth virtual machine running on the server, and w represents the number of virtual machines on this server.
[0058] Next, based on the above-mentioned power consumption formula of the server, the total energy consumption of the server is modeled. It can be understood that the energy consumption of the server is mainly consumed by the CPU, storage, and network equipment. The server uses virtualization technology to virtualize one server into multiple servers. The purpose is to improve the utilization of the CPU and reduce the idle time. Based on this, the embodiment of the present invention reduces the energy consumption of the cloud computing data center by considering the migration of virtual machines. Assume that within a period of time [t1, t2], the virtual machine on the server needs to be migrated to another server. Assume that the migration start time is The migration ends at , where the migration energy consumption of the virtual machine is Indicates that in [ , The sum of the energy consumption of the two servers during migration is shown in the following formula:
[0059]
[0060] Where, 、 are the CPU utilization of the migrated virtual machines on the two servers respectively; and The weight coefficients of the two servers respectively; P is a function.
[0061] The resource power consumption of the server is different in different states, including five states: working, switching, idle, sleep and shutdown.
[0062] This embodiment establishes corresponding energy consumption sub-models according to the above five states, which are expressed as follows:
[0063] 1. Sleep energy consumption in sleep state:
[0064] Sleep power consumption refers to the complete shutdown of the entire machine after the operating status data is saved to the hard disk. The sleep power consumption sub-model in this embodiment is expressed as:
[0065]
[0066] Where, represents the sleep energy consumption of server j, is the sleep power consumption of server j, Indicates time.
[0067] 2. Idle energy consumption in idle state:
[0068] Idle energy consumption mainly refers to the consumption of CPU, graphics card, memory, etc. in idle state. In this embodiment, the idle energy consumption sub-model is expressed as:
[0069]
[0070] Where, represents the idle energy consumption of server j, refers to the idle power consumption of server j, Refers to free time.
[0071] 3. Conversion energy consumption in conversion state:
[0072] Conversion energy consumption refers to the energy consumption of the server when it switches from one state to another, which includes all components of the server, most importantly the CPU, graphics card, etc. In this embodiment, the conversion energy consumption sub-model is expressed as:
[0073]
[0074] Where, represents the conversion energy consumption of server j, represents the conversion power consumption of server j, Indicates the server conversion time.
[0075] 4. Working energy consumption in working state:
[0076] The working state mainly includes computing energy consumption, storage energy consumption, and network energy consumption. In the working state, the execution of tasks mainly consumes CPU and memory, and the corresponding energy consumption is called computing energy consumption. The computing energy consumption sub-model is expressed as:
[0077]
[0078] Where, represents the energy consumed by server j to execute task i, is the computing power consumption per unit time, Indicates the number of task instructions. Indicates processor speed.
[0079] Storage energy consumption refers to the energy consumed when disk reads and writes data. The storage energy consumption sub-model is expressed as:
[0080]
[0081] Where, is the storage energy consumption of server j, is the storage power consumption per unit time, is the read and write time of task i on server j, Indicates the amount of data read and written by the task, Indicates the speed of disk reading and writing.
[0082] Network energy consumption refers to the energy consumed during data transmission from the source server to the destination server. The transmission time is limited by the network bandwidth, which affects the energy consumption. The network energy consumption sub-model is expressed as:
[0083]
[0084] Where, is the energy consumption during the transmission of task i to server j, represents the transmission power consumption, represents the time consumed by task i transmission, Indicates the number of bytes of task i, Indicates network bandwidth.
[0085] By integrating the energy consumption sub-models, the corresponding comprehensive server energy consumption model can be obtained, which is expressed by the following formula:
[0086]
[0087] The total energy consumption of the server during the migration process includes the energy consumption output by each energy consumption sub-model and the energy consumption of virtual machine migration. The total energy consumption model of the server is expressed as:
[0088]
[0089] By establishing an energy consumption model, the embodiment of the present invention can accurately evaluate the energy consumption of the server under different workloads and states, and provide data support for subsequent migration optimization operations.
[0090] S2. Taking the total energy consumption output by minimizing the server total energy consumption model as the objective function, the resource contention rate between the current task and other tasks running on each virtual machine in each server is calculated using the complex correlation coefficient method.
[0091] It should be understood that the embodiments of the present invention aim to reduce energy consumption of cloud computing data centers by optimizing the migration method of virtual machines and shutting down idle / low-load servers after virtual machine migration and allocation.
[0092] Based on this, the embodiment of the present invention will construct an objective function based on the established server total energy consumption model. Specifically, the present invention provides the following example to describe the construction process of the objective function in detail:
[0093] Suppose a cloud computing data center contains Servers, tasks waiting to be assigned, The triples correspond to The CPU, storage, and network equipment of a server, For the The demand for three resources for each task is shown in the following formula:
[0094]
[0095] The distribution of tasks on the server can be achieved using a The two-dimensional matrix To express, Indicates the number of tasks, Indicates the number of servers. 0 indicates a task Not assigned to the server Up, for Indicates a task Assigned on the server superior.
[0096] To assign each task to an appropriate server, the available resources of the server must first meet the task requirements. For each server, the following constraints must be met:
[0097]
[0098] When the above constraints are met, the goal is to minimize the total energy consumption output by the server total energy consumption model, which can be expressed as:
[0099]
[0100] After constructing the objective function, the embodiment of the present invention uses the optimal output of the objective function as the target to perform server virtual machine task migration. First, a list of servers to be migrated must be determined.
[0101] This embodiment of the present invention uses a complex correlation coefficient method to identify virtual machines with a high probability of resource contention, i.e., virtual machines with highly correlated resource requirements between tasks. Resource requirements reflect the amount of CPU, storage, and network device resources a task requires from the server. The following detailed description of the process for determining the resource contention rate between tasks is provided by a specific example:
[0102] First, the resource requirements of each task running on each virtual machine need to be obtained and vectorized.
[0103] For example, when there are n tasks, the resource requirements of each task can be vectorized and represented as a 1*3 matrix X, as shown in the following formula:
[0104]
[0105] The resource requirements of other tasks can be quantified as a (n-1)*3 matrix , as shown below:
[0106]
[0107] According to the above formula, the complex correlation coefficient between the first vector matrix X corresponding to the resource requirements of the current task and the second vector matrix Y composed of the resource requirements of other tasks is calculated. Specifically, the following steps are included:
[0108] (1) Calculate each row vector in X and Y The correlation coefficient of . represents the covariance, represents the variance, then the correlation coefficient Expressed as:
[0109]
[0110] (2) Generate a new correlation coefficient matrix R from all the correlation coefficients:
[0111]
[0112] For each task, if each item in its correlation coefficient matrix is 1, it means that the probability of resource contention between it and other tasks is the highest. To express:
[0113]
[0114] The embodiment of the present invention calculates and The reciprocal of the Euclidean distance between them is used as the complex correlation coefficient between X and Y. The larger the Euclidean distance, the greater the distance between the two vectors, indicating a lower correlation. Therefore, the reciprocal of the Euclidean distance can be used to represent the complex correlation coefficient. and The Euclidean distance between them is as follows:
[0115]
[0116] (3) Then the complex correlation coefficient between X and Y is Expressed as:
[0117]
[0118] The resource contention rate between tasks in each virtual machine is determined based on the calculated complex correlation coefficient. A larger complex correlation coefficient indicates a higher degree of linear correlation between tasks and a greater probability of resource contention. This embodiment of the present invention quantifies resource contention risk through statistical correlation, enabling the prioritization of high-conflict tasks during subsequent migrations, thereby reducing post-migration performance disruptions.
[0119] S3. Determine a list of servers to be migrated according to the resource contention rate and the resource utilization rate of each server, and sort the servers to be migrated in the list of servers to be migrated according to preset priorities.
[0120] It is understandable that if the resource contention rate of the virtual machine in the server is high, it will lead to a decline in the performance of the virtual machine itself and delays in task execution. Highly contention virtual machines are usually resource-intensive tasks, and distributing them to multiple servers can achieve load balancing.
[0121] Based on this, the embodiment of the present invention includes servers whose resource contention rates meet a preset value into the list of servers to be migrated, that is, selects servers corresponding to virtual machines with the largest inter-task complex correlation coefficients into the list of servers to be migrated.
[0122] Furthermore, the present invention fully considers the impact of resource utilization (CPU utilization) on server energy consumption, and also includes servers whose resource utilization is lower than the low-load threshold into the list of servers to be migrated.
[0123] Considering that the workload of a cloud computing data center varies with time periods, this embodiment uses the absolute median difference method to dynamically set the high-load threshold and the low-load threshold of resource utilization.
[0124] Specifically, this embodiment rearranges the order based on CPU utilization changes and calculates the absolute median difference. Using the virtual machine migration and integration requirements as adjustment parameters, the high-load threshold and low-load threshold of resource utilization are dynamically set based on the MAD, expressed as:
[0125]
[0126] Where s is the requirement for virtual machine migration and integration; is the high load threshold, is the low-load threshold; MAD is the median absolute deviation. As you can see, s represents the intensity of migrating virtual machine tasks from servers with low load or high resource contention and consolidating them onto fewer servers. Smaller s values indicate fewer migrations. Larger s values necessitate timely migration and consolidation of virtual machines.
[0127] The embodiment of the present invention controls the number of servers to be migrated by setting a dynamic threshold, and adds "low-load" servers to the list of servers to be migrated.
[0128] It is worth noting that this embodiment will further use joint entropy, conditional entropy and mutual information in information theory to further evaluate the correlation between related variables.
[0129] Specifically, a group of candidate servers are determined as candidate variables based on the obtained complex correlation coefficient, and each variable (server) in the candidate variables is scored for information content. The purpose is to select the server that contributes the most to the target variable t (such as energy consumption). The information scoring process is expressed by the following formula:
[0130]
[0131] Where V is the set of all candidate servers; S is the set of selected tasks; is the number of data contained in the task set S; For Server With the server The sum of mutual information between ; For the target t and candidate input variables Mutual information between for Information score.
[0132] It can be seen that the information correlation strength of the migration process is determined by the above-mentioned multiple correlation coefficient. It should be understood that according to the above formula, the score The higher the corresponding server The higher the priority, the higher the server should be added to the list of servers to be migrated.
[0133] Based on this, in some embodiments of the present invention, a forward search strategy is used to traverse the scored candidate variables, and the target variable set is determined when the cumulative information contribution rate reaches a preset condition. The specific process includes the following steps:
[0134] 1. Calculate the maximum relevance of all candidate servers , select Largest server is the first input variable, expressed as:
[0135]
[0136] 2. Traverse step by step through the forward search strategy , , ..., each time we choose to maximize until the cumulative information contribution rate reaches the threshold.
[0137] Specifically, the selection (ranking) of the remaining variables is based on the comparison of the information score.
[0138] For example, in step m( ), the remaining variables are ( ),in for( ) is an ordered set of selected (or sorted) variables in ), so the variables selected in m are:
[0139]
[0140] Each time an input variable is selected, the algorithm dynamically searches forward one step, so the process incrementally evaluates all candidate variables until step , all servers V are evaluated and ranked. After ranking, the information score of each variable can be calculated according to the following formula:
[0141]
[0142] 3. Accumulate information contribution rate to determine the target variable set.
[0143] The cumulative information contribution rate is defined as ,when When the maximum value is reached, the corresponding target ordered variable set The corresponding servers in are included in the list of servers to be migrated.
[0144] After determining the list of servers to be migrated, the servers to be migrated in the list are sorted according to a preset priority. In an embodiment of the present invention, the servers are sorted from small to large according to resource utilization.
[0145] S4. Based on the sorting results, energy consumption optimization operations of virtual machine task migration and shutdown operations are sequentially performed on the server to be migrated.
[0146] According to the sorting results, the target servers are assigned to the virtual machines in each server to be migrated. It is worth noting that in the migration allocation process, in order to avoid resource conflicts during the task migration process, guarantee the quality of service (SLA), and ensure the effectiveness of the migration operation, unavailable servers must be excluded.
[0147] This embodiment lists servers whose resource utilization exceeds the high-load threshold and servers that have been shut down as unavailable servers and includes them in the non-migratable server list. When assigning a target server to a virtual machine, servers in the non-migratable server list are excluded. After the assignment is complete, the server to which the virtual machine has been assigned is shut down and migrated to the non-migratable server list. It is worth noting that to ensure server performance during the migration process, the target server must have no more than 90% of the CPU computing power.
[0148] When selecting a target server, give priority to servers with lower loads. In actual use, it is necessary to monitor the load of the cloud data center server in real time to keep abreast of the server status.
[0149] The present invention will provide an example to refine the process of determining the list to be migrated and migrating and shutting down virtual machine tasks:
[0150] (1) Set the requirements for virtual machine migration and integration;
[0151] (2) Obtain a list of unavailable servers, including overloaded servers and shut down servers;
[0152] (3) Obtain the resource utilization of each server. If the utilization is less than the low-load threshold, add the server to the list of servers to be migrated.
[0153] (4) If the list of servers to be migrated is not empty, execute step (5); otherwise, execute step (14);
[0154] (5) Sort the servers in the server list to be migrated in ascending order of resource usage;
[0155] (6) Obtaining a list of virtual machines on the first server in the sorted list of servers to be migrated;
[0156] (7) assigning a target server to each virtual machine in the server list to be migrated;
[0157] (8) If the destination server is not found, determine from the back to the front whether each host in the list of servers to be migrated can accept the current virtual machine;
[0158] (9) If the destination server is still not found, cancel the migration, exit the current loop, and execute step (4); otherwise, execute step (10);
[0159] (10) Migrate the tasks of the current virtual machine to the target server;
[0160] (11) Determine the next virtual machine in the server list to be migrated, and then execute step (12) at the end of the loop; otherwise, execute step (7);
[0161] (12) Delete the current server from the list of servers to be migrated and add it to the list of shut down servers;
[0162] (13) Determine the next low-load server in the list and execute step (4);
[0163] (14)End.
[0164] It is understandable that if the target server cannot be found during the allocation process, a reverse search will be performed for other servers in the list of servers to be migrated, and unavailable servers still need to be excluded during this process.
[0165] In summary, the embodiments of the present invention establish and integrate energy consumption models for each server in different states, with the goal of minimizing the total energy consumption of the server output, to migrate and shut down server virtual machines. In this process, the complex correlation coefficient between the current task running on each virtual machine in each server and other tasks is calculated as the resource contention rate. Combined with the dynamic adjustment of resource utilization thresholds, the servers to be migrated are accurately identified and determined, thereby migrating virtual machines from underloaded servers and shutting down these servers after migration. This ensures maximum resource utilization and can significantly reduce the energy consumption of cloud computing data centers.
[0166] An embodiment of the present invention provides a cloud computing energy consumption optimization system based on task migration. For details, see Figure 2 , Figure 2 FIG. 1 is a schematic diagram of a cloud computing energy consumption optimization system based on task migration in one embodiment of the present invention, including:
[0167] The energy consumption model building module M1 is used to build a server total energy consumption model based on the energy consumption sub-models of each server in different states in the target cloud computing data center;
[0168] The resource contention ratio determination module M2 is used to calculate the resource contention ratio between the current task and other tasks running on each virtual machine in each server using the complex correlation coefficient method, taking the total energy consumption output by the server total energy consumption model as the objective function;
[0169] A server list determination module M3 for determining a server list to be migrated according to the resource contention rate and the resource utilization rate of each server, and sorting the servers to be migrated in the server list according to a preset priority;
[0170] The energy consumption optimization module M4 is used to perform energy consumption optimization operations of virtual machine task migration and shutdown in sequence on the server to be migrated according to the sorting result.
[0171] like Figure 3 As shown, an embodiment of the present invention further provides a computer device, Figure 3 This is a structural block diagram of a preferred embodiment of a computer device provided by the present invention, wherein the computer device includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and the processor implements the cloud computing energy consumption optimization method based on task migration as described above when executing the computer program.
[0172] Preferably, the computer program can be divided into one or more modules / units (e.g., computer program 1, computer program 2, ...). These one or more modules / units are stored in the memory and executed by the processor to implement the present invention. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program in the computer device.
[0173] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor. The processor is the control center of the terminal device, and various parts of the terminal device are connected using various interfaces and lines.
[0174] The memory primarily includes a program storage area and a data storage area. The program storage area can store an operating system, at least one application required for a function, and the data storage area can store related data. Furthermore, the memory can be a high-speed random access memory or a non-volatile memory, such as a plug-in hard drive, a SmartMedia Card (SMC), a Secure Digital (SD) card, or a Flash Card. Alternatively, the memory can be other volatile solid-state storage devices.
[0175] It should be noted that the above terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art will understand that Figure 3 The block diagram is merely an example of a terminal device and does not limit the terminal device. The terminal device may include more or fewer components than shown, or a combination of certain components, or different components. Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware through a computer program. The program may be stored in a computer-readable storage medium. When executed, the program may include the processes of the above-described method embodiments. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0176] Accordingly, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to perform the steps in the method of the above embodiment, for example Figure 1 Steps S1 to S4 described in .
[0177] The above-described embodiments merely illustrate several implementations of the present invention, and while their descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art would be able to make numerous variations and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.
Claims
1. A cloud computing energy consumption optimization method based on task migration, characterized in that: include: Construct a server total energy consumption model based on the energy consumption sub-models of each server in different states in the target cloud computing data center; Taking minimizing the total energy consumption output by the server total energy consumption model as the objective function, the complex correlation coefficient method is used to calculate the resource contention rate between the current task and other tasks running on each virtual machine in each server. Specifically, the resource requirements of each task running on each virtual machine are obtained and expressed quantitatively. The resource requirements reflect the task's demand for the server's CPU resources, storage resources, and network device resources. Calculating a complex correlation coefficient between a first vector matrix corresponding to the resource demand of the current task and a second vector matrix composed of resource demands of other tasks, and determining a resource contention rate between tasks in each virtual machine based on the complex correlation coefficient; Determining a list of servers to be migrated according to the resource contention rate and the resource utilization rate of each server, and sorting the servers to be migrated in the list of servers to be migrated according to a preset priority; According to the sorting results, energy consumption optimization operations of virtual machine task migration and shutdown are performed in sequence on the servers to be migrated.
2. The cloud computing energy consumption optimization method based on task migration according to claim 1, characterized in that: The server total energy consumption model is constructed based on the established energy consumption sub-models of each server in different states, including: Establish energy consumption sub-models reflecting computing energy consumption, storage energy consumption, network energy consumption, idle energy consumption, sleep energy consumption and conversion energy consumption of each server in working, conversion, idle, sleep and shutdown states; The energy consumption sub-models are integrated to establish the total energy consumption model of the server.
3. The cloud computing energy consumption optimization method based on task migration according to claim 1, characterized in that: Determining a list of servers to be migrated according to the resource contention rate and the resource utilization rate of each server includes: The virtual machine migration and integration requirements are used as adjustment parameters, and the absolute median difference method is used to dynamically set the high-load threshold and low-load threshold of resource utilization; The servers whose resource utilization is lower than the low load threshold and whose resource contention rate meets the preset value are included in the list of servers to be migrated.
4. The cloud computing energy consumption optimization method based on task migration according to claim 3, characterized in that: The virtual machine migration and integration requirements are used as adjustment parameters, and the absolute median difference method is used to dynamically set the high-load threshold and the low-load threshold of resource utilization, including: The high load threshold and the low load threshold are expressed by the following formula: Where S is the requirement for virtual machine migration and integration; is the high load threshold, is the low load threshold; is the absolute median difference.
5. The cloud computing energy consumption optimization method based on task migration according to claim 1, characterized in that: The process of determining the server list to be migrated according to the resource contention rate and the resource utilization rate of each server further includes: Determine a group of candidate servers as candidate variables according to the multiple correlation coefficient, and perform information scoring on each of the candidate variables; A forward search strategy is used to traverse the scored candidate variables. When the cumulative information contribution rate reaches the preset condition, the target variable set is determined, and the corresponding servers in the target variable set are included in the list of servers to be migrated.
6. The cloud computing energy consumption optimization method based on task migration according to claim 3, characterized in that: The step of sequentially performing virtual machine task migration and shutdown operations on the server to be migrated according to the sorting results includes: Adding servers whose resource utilization exceeds the high-load threshold and servers that have been shut down to a list of servers that cannot be migrated; According to the sorting results, the target servers excluding the servers in the non-migratable server list are sequentially allocated to the virtual machines in the servers to be migrated; The server that has performed the virtual machine allocation is shut down and migrated to the non-migratable server list.
7. A cloud computing energy consumption optimization system based on task migration, characterized in that: include: An energy consumption model building module is used to build a server total energy consumption model based on the energy consumption sub-models of each server in different states in the established target cloud computing data center; The resource contention rate determination module is used to calculate the resource contention rate between the current task and other tasks running on each virtual machine in each server using the complex correlation coefficient method, with the total energy consumption output by the server total energy consumption model being minimized as the objective function. Specifically, the module obtains and vectorizes the resource requirements of each task running on each virtual machine; the resource requirements reflect the demand of the task for the server's CPU resources, storage resources, and network device resources. Calculating a complex correlation coefficient between a first vector matrix corresponding to the resource demand of the current task and a second vector matrix composed of resource demands of other tasks, and determining a resource contention rate between tasks in each virtual machine based on the complex correlation coefficient; a server list determination module for determining a server list to be migrated according to the resource contention rate and the resource utilization rate of each server, and sorting the servers to be migrated in the server list to be migrated according to a preset priority; The energy consumption optimization module is used to perform energy consumption optimization operations of virtual machine task migration and shutdown on the server to be migrated in sequence according to the sorting results.
8. A computer device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the method for optimizing cloud computing energy consumption based on task migration as described in any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the device where the computer-readable storage medium is located executes the computer program, the cloud computing energy consumption optimization method based on task migration as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Three-dimensional virtual resource scheduling method of cloud computing energy consumption key
CN106598733A