A cloud computing resource scheduling method, system, terminal and storage medium
By dividing user requests into interactive and batch tasks in the cloud computing data center, and using green perception algorithms to generate scheduling strategies, the problem of inability to effectively schedule tasks and insufficient utilization of green energy in the existing technology is solved, efficient resource scheduling and green energy utilization are achieved, and carbon emissions and environmental pollution are reduced.
Patent Information
- Application Number
- CN202110834069.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-23
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2041-07-23
AI Technical Summary
The energy-saving methods of existing cloud computing data centers cannot effectively schedule tasks, and the use of green energy is not comprehensive enough, and there is a lack of scheduling solutions for different types of tasks.
A cloud computing resource scheduling method is proposed. By obtaining user requests and dividing them into interactive tasks and batch tasks, collecting data center load status data, calculating the total energy consumption of the server, and using green perception algorithm to generate scheduling strategies, including Brownout control algorithm and Deferring delay execution algorithm, it is used to adjust the microservice state and postpone task execution time to optimize energy consumption utilization.
Multi-layer resource scheduling based on microservice management, virtual machine scheduling and physical machine expansion are realized, which reduces carbon emissions in the data center, improves the utilization rate of green energy, ensures efficient execution of tasks, and reduces the pollution of the environment by cloud computing.
Smart Images

Figure CN113672383B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of cloud computing technology, and in particular relates to a cloud computing resource scheduling method, system, terminal and storage medium. Background Art
[0002] Cloud computing uses a pay-per-use pricing method to deliver various IT (Internet Technology) service resources on demand through the Internet. At the same time, cloud computing has excellent characteristics such as strong scalability, low cost, and flexible deployment. Relying on cloud computing, enterprises do not need to spend a lot of money on the construction and operation and maintenance of data centers, and can remotely deploy and access services anytime and anywhere. Today, cloud computing has been adopted by organizations of different types and sizes, improving the productivity of enterprises. However, the continuous operation of large-scale data centers consumes a lot of electricity, and at the same time brings a lot of carbon emissions, causing serious environmental pollution. This has attracted widespread attention from researchers, and many cloud computing energy-saving technologies have been proposed.
[0003] In recent years, energy-saving methods for cloud computing data centers mainly include:
[0004] (1) VM consolidation: VM consolidation can be used to migrate VMs hosted by servers with lower loads to other servers, and then adjust these servers to low-power mode or shut them down directly to reduce system energy consumption. For servers with higher loads, VMs need to be migrated to reduce the probability of server overload and ensure the quality of service for users.
[0005] (2) Dynamic Voltage Frequency Scaling (DVFS): This method balances computing performance and server energy consumption based on the current system load. When the load is low, DVFS technology will reduce the frequency and voltage to reduce server energy consumption. When the task load is high, the frequency and voltage will be increased to efficiently process user requests.
[0006] In summary, the existing energy-saving methods of cloud computing data centers usually schedule resources at the granularity of virtual machines, but cannot effectively schedule tasks. In addition, the existing technologies for utilizing green energy are not comprehensive enough, and different scheduling schemes are not designed for different types of tasks. Summary of the invention
[0007] The present application provides a cloud computing resource scheduling method, system, terminal and storage medium, aiming to solve the technical problems that the energy-saving methods of cloud computing data centers in the prior art cannot effectively schedule tasks and the methods for utilizing green energy are not comprehensive enough.
[0008] In order to solve the above problems, this application provides the following technical solutions:
[0009] A cloud computing resource scheduling method, comprising:
[0010] Obtaining user requests, and dividing the user requests into interactive tasks and batch tasks;
[0011] Collecting load status data of the data center, and calculating the total energy consumption of the servers in the data center according to the load status data;
[0012] Based on the total energy consumption of the servers in the data center, a green perception algorithm is used to calculate the interactive tasks and batch tasks, and generate scheduling strategies for the interactive tasks and batch tasks; wherein the green perception algorithm includes a Brownout control algorithm and a Deferring delayed execution algorithm, the Brownout control algorithm is used to detect whether there are deactivatable microservices in the current server, and to determine whether green energy can be used at the current moment, and to generate a scheduling strategy for the interactive tasks; the Deferring delayed execution algorithm is used to determine whether to postpone the execution time of the batch tasks according to the available time of green energy in the data center, and to generate a scheduling strategy for the batch tasks;
[0013] Based on the generated scheduling strategy, a virtual machine scheduling algorithm and a host scaling machine expansion algorithm are used to perform virtual machine migration and machine expansion operations on the data center.
[0014] The technical solution adopted by the embodiment of the present application also includes: the calculation of the total energy consumption of the server in the data center according to the load status data includes:
[0015] Calculate the server energy consumption of each physical machine:
[0016]
[0017] in, represents the server energy consumption of physical machine i, w i Indicates the number of virtual machines deployed on physical machine i, represents the energy consumption of physical machine i in idle state, represents the dynamic energy consumption of physical machine i under load, θ t represents the regulator value at time t, which represents the resource utilization percentage of the microservice, represents the sum of resource utilization of all microservices running on the jth virtual machine on physical machine i, The calculation formula is:
[0018]
[0019] Among them A j represents the number of microservices on virtual machine j, represents the resource utilization of the kth microservice on virtual machine j;
[0020] Calculate the energy consumption of the cooling equipment of each physical machine based on the energy consumption of the server:
[0021]
[0022]
[0023] Among them, CoP(T sup ) is the cooling efficiency, T sup is the temperature at which the cooling equipment cools;
[0024] The total energy consumption of the servers in the data center at time t is:
[0025] P t =d(t)′+c(d(t)′)
[0026] in, represents the total energy consumption of all servers in the data center at time t, where n represents the number of servers in the data center, Represents the total energy consumption of all cooling equipment in the data center at time t.
[0027] The technical solution adopted by the embodiment of the present application also includes: the calculation of the total energy consumption of the server in the data center according to the load status data also includes:
[0028] Calculate the workload of the data center; the workload calculation method is:
[0029] Assume that there are M interactive tasks and N batch tasks in the data center. m (t) represents the workload of interactive task m at time t, u m represents the resources required by the interactive task m, a m (t)×u m represents the resource requested by interactive task m at time t, b n (t) represents the workload of interactive task n at time t, u n represents the resources required for interactive task n, b n (t)×u n represents the resources requested by interactive task n at time t. For batch tasks, the scheduler can choose to postpone their execution to the next time. Therefore, the actual resource requested by interactive task n at time t is b n (t) is:
[0030]
[0031] In the above formula, represents the proportion of interactive tasks that are postponed at time t-1, b n (t)′ represents the original workload of interactive task n at time t;
[0032] The workload of the data center at time t is:
[0033]
[0034] The technical solution adopted by the embodiment of the present application also includes: the green perception algorithm is used to calculate the interactive tasks and the batch processing tasks, and the scheduling strategy for generating the interactive tasks and the batch processing tasks is specifically:
[0035] For each time t, the resource utilization of server i is known Resource utilization maximum threshold TU up and the minimum threshold TU low ,
[0036] Calculate the number of overloaded servers in a data center if For interactive tasks, the Brownout control algorithm is executed; for batch tasks, the Deferring delayed execution algorithm is executed;
[0037] Calculate the average resource utilization of the server cluster at time t if Then execute the virtual machine scheduling algorithm and host scaling machine expansion algorithm;
[0038] If neither of the above two conditions is met, the task is executed directly.
[0039] The technical solution adopted by the embodiment of the present application also includes: the execution process of the Brownout control algorithm is specifically as follows:
[0040] For each server in the server list, the current resource utilization of server i is known Determine whether green energy R can be used at the current time t t If green energy cannot be used, the brownout control algorithm is triggered and the overload degree of the data center is calculated. Using dimmerθ t Calculate the expected utilization reduction of server i And according to the dimmer value θ t Select a set of microservices on server i and deactivate them;
[0041] If green energy can be used, determine the available green energy R at the current time t t Is it less than the total energy consumption P? t If yes, the brownout control algorithm is triggered to calculate Where ∈ represents the ratio of the resource utilization of the batch task to the total resource utilization of the physical machine; according to θ t Search for a set of microservices and deactivate them; if not, utilize green energy to perform interactive tasks.
[0042] The technical solution adopted by the embodiment of the present application also includes: the execution process of the Deferring delayed execution algorithm is specifically as follows:
[0043] For all batch processing tasks, the following three situations are judged respectively:
[0044] Determine whether the deadline of the batch task is at the beginning of the green energy availability Previously, if yes, it means that the batch processing task cannot be executed using green energy, then the batch processing task is directly executed at time t; otherwise, the Deferring delayed execution algorithm is used to delay the execution time of the batch processing task. Then in time Update tasks in real time;
[0045] Determine whether the start time of the batch task is within the time interval when green energy is available. If so, use green energy to execute the batch task; otherwise, use the Deferring delayed execution algorithm to delay the execution time of the batch task. and in time Update tasks in real time;
[0046] Determine whether the start time of the batch task is within the available time of green energy Afterwards, if yes, it means there is no more available green energy, and the batch processing task is directly executed at time t.
[0047] The technical solution adopted by the embodiment of the present application also includes: the virtual machine scheduling algorithm and the Hostscaling machine expansion algorithm are used to perform virtual machine migration and machine expansion operations on the data center, specifically:
[0048] If the average utilization of the server cluster at time t Less than the resource utilization threshold TU low , the virtual machine scheduling algorithm is used to migrate the virtual machine, and the host scaling algorithm is executed to adjust the number of physical machines. The execution process of the host scaling algorithm specifically includes:
[0049] Calculate the difference n′ between the predicted number of physical machines required and the number of physical machines actually used. If n′>0, it means that there is sufficient green energy at the current time t, then add n′ servers to the system.
[0050] If n′<0, it means that the total resources of the physical machines at the current time t exceed the resources requested by the user, then n′ physical machines are shut down in the system;
[0051] If n′=0, it means that the resources of the data center just meet the user request, and the number of physical machines is not adjusted.
[0052] Another technical solution adopted by the embodiment of the present application is: a cloud computing resource scheduling system, comprising:
[0053] Task acquisition module: used to acquire user requests and divide the user requests into interactive tasks and batch tasks;
[0054] Energy consumption calculation module: used to collect the load status data of the data center and calculate the total energy consumption of the servers in the data center according to the load status data;
[0055] Scheduling strategy generation module: used to calculate the interactive tasks and batch tasks based on the total energy consumption of the servers in the data center using a green perception algorithm to generate a scheduling strategy for the interactive tasks and batch tasks; wherein the green perception algorithm includes a Brownout control algorithm and a Deferring delayed execution algorithm, the Brownout control algorithm is used to detect whether there are deactivatable microservices in the current server, and to determine whether green energy can be used at the current moment, and to generate a scheduling strategy for the interactive tasks; the Deferring delayed execution algorithm is used to determine whether to postpone the execution time of the batch tasks according to the available time of green energy in the data center, and to generate a scheduling strategy for the batch tasks;
[0056] Scheduling policy execution module: used to perform virtual machine migration and machine expansion operations on the data center based on the generated scheduling policy, using a virtual machine scheduling algorithm and a Hostscaling machine expansion algorithm.
[0057] Another technical solution adopted by the embodiment of the present application is: a terminal, the terminal includes a processor and a memory coupled to the processor, wherein:
[0058] The memory stores program instructions for implementing the cloud computing resource scheduling method;
[0059] The processor is used to execute the program instructions stored in the memory to control cloud computing resource scheduling.
[0060] Another technical solution adopted by the embodiment of the present application is: a storage medium storing program instructions executable by a processor, wherein the program instructions are used to execute the cloud computing resource scheduling method.
[0061] Compared with the prior art, the beneficial effects of the embodiments of the present application are as follows: the cloud computing resource scheduling method, system, terminal and storage medium of the embodiments of the present application divide user requests into interactive tasks and batch tasks, and for different types of tasks, respectively use the brownout control algorithm and the deferring delayed execution algorithm to adaptively adjust the state of microservices according to the load of the data center, generate different scheduling strategies, and perform virtual machine migration and machine expansion operations according to the scheduling strategies, thereby realizing multi-layer resource scheduling based on microservice management, virtual machine scheduling and physical machine expansion. The embodiments of the present application take into account the use of green energy by the data center in the scheduling strategy, reduce the carbon emissions of the data center, ensure the efficient execution of tasks, and reduce the pollution of cloud computing to the environment. In the microservice management algorithm, the utilization rate of green energy is further improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 is a flow chart of a cloud computing resource scheduling method according to an embodiment of the present application;
[0063] Figure 2 A schematic diagram of the structure of a cloud computing resource scheduling system according to an embodiment of the present application;
[0064] Figure 3 This is a schematic diagram of the terminal structure of an embodiment of the present application;
[0065] Figure 4 A schematic diagram of the structure of a storage medium according to an embodiment of the present application. DETAILED DESCRIPTION
[0066] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0067] See also Figure 1 , is a flow chart of a cloud computing resource scheduling method according to an embodiment of the present application. The cloud computing resource scheduling method according to an embodiment of the present application comprises the following steps:
[0068] S10: Obtain user requests from the data center and divide the user requests into interactive tasks and batch tasks;
[0069] In this step, the obtained user request includes the timestamp of the user request and the data of each user request to access the page. Interactive tasks are tasks that need to provide real-time services to ensure service quality. For example, web applications that require a fast response from the server. Batch tasks are tasks that do not require high real-time performance and can provide services with delay.
[0070] S20: Collect load status data at each level (physical machine, virtual machine, microservice) in the data center;
[0071] In this step, the collected load status data includes data such as virtual machine resource utilization and physical machine energy consumption.
[0072] S30: Calculate the total energy consumption of the servers in the data center according to the load status data;
[0073] In this step, since the server energy consumption mainly comes from the CPU work, the CPU utilization is mainly considered when calculating the server energy consumption. The workload needs to be distributed to the virtual machine for execution, which will affect the CPU utilization of the virtual machine and further affect the server energy consumption. Therefore, when calculating the server energy consumption, the workload of the data center (that is, the total resources requested by users in the data center) needs to be calculated first.
[0074] In the embodiment of the present application, the workload calculation method is as follows: Assume that there are M interactive tasks in the data center, a m (t) represents the workload of interactive task m at time t, u m represents the resources required for interactive task m, then a m (t)×u m represents the resources requested by interactive task m at time t. Assume that there are N batch tasks in the data center, b n (t) represents the workload of interactive task n at time t, u n represents the resources required for interactive task n, then b n (t)×u n represents the resource requested by interactive task n at time t. For batch tasks, the scheduler can choose to postpone their execution to the next time. Then the resource b actually requested by interactive task n at time t is n The calculation formula of (t) is:
[0075]
[0076] In formula (1), represents the proportion of interactive tasks that are postponed at time t-1, b n (t)′ represents the original workload of interactive task n at time t.
[0077] Based on the above, the system workload calculation formula at time t is:
[0078] d(t)=∑ m a m (t)×u m +∑ m b n (t)×u n (2)
[0079] In the embodiment of the present application, the calculation of server energy consumption needs to consider resource utilization at different levels such as physical machines, virtual machines, and microservices. The total server energy consumption in the data center consists of idle energy consumption and dynamic energy consumption, and the virtual machine resource utilization on the physical machine determines the dynamic energy consumption of the physical machine. The server energy consumption calculation formula for each physical machine is:
[0080]
[0081] in, represents the server energy consumption of physical machine i, w i Indicates the number of virtual machines deployed on physical machine i, represents the energy consumption of physical machine i in idle state, Represents the dynamic energy consumption of physical machine i under different load conditions. t Represents the dimmer value at time t, which represents the resource utilization percentage of the microservice. represents the sum of resource utilization of all microservices running on the jth virtual machine on physical machine i, The calculation formula is:
[0082]
[0083] Among them, A j represents the number of microservices on virtual machine j, represents the resource utilization of the kth microservice on virtual machine j.
[0084] Furthermore, in order to prevent physical machines from overheating, cooling equipment needs to be deployed in the data center to cool down the physical machines. The operation of the cooling equipment will also consume a lot of electricity. Therefore, when calculating the total energy consumption of the server, this application further calculates the energy consumption of the cooling equipment. The energy consumption of the cooling equipment is related to the total energy consumption of the server in the data center and the cooling efficiency. The calculation formula is:
[0085]
[0086]
[0087] In the above formula, CoP(T sup ) is the cooling efficiency, Tsup It is the temperature at which the cooling equipment cools.
[0088] Define the total energy consumption of all servers in the data center at time t as P t =d(t)′+c(d(t)′), where represents the total energy consumption of all servers in the data center at time t, where n represents the number of servers in the data center, Represents the total energy consumption of all cooling equipment in the data center at time t.
[0089] Define R t is the amount of green energy in the data center at time t. Green energy refers to renewable energy such as wind energy and solar energy. The optimization goal of this application can be expressed as minimizing the entire operation cycle (P t -R t ), that is:
[0090]
[0091]
[0092]
[0093]
[0094]
[0095] At the same time, formula (7) should satisfy the following conditions: d(t) should be less than the maximum capacity of the system D, the dimmer value θ t Belongs to [0,1], the total workload of the batch task cannot exceed the total resource requirement of the task.
[0096] S40: Based on the total energy consumption of the servers in the data center, a green-aware algorithm is used to calculate the interactive tasks and batch tasks respectively, and the scheduling strategies for the interactive tasks and batch tasks are generated respectively;
[0097] In this step, the green perception algorithm includes the Brownout control algorithm and the Deferring delay execution algorithm. Among them, the Brownout control algorithm is used to process interactive tasks, and the Deferring delay execution algorithm is used to process batch tasks. The green perception algorithm is specifically:
[0098] For each time t, the resource utilization of server i is known Resource utilization maximum threshold TU up and the minimum threshold TU low ;
[0099] First, calculate the number of overloaded servers in the data center if For interactive tasks, the Brownout control algorithm is executed; for batch tasks, the Deferring delayed execution algorithm is executed;
[0100] Calculate the average resource utilization of the server cluster at time t If the average resource utilization Less than the preset resource utilization threshold TU low , indicating that the data center can shut down some physical machines to reduce the total energy consumption, then the virtual machine scheduling algorithm and the host scaling machine expansion algorithm are executed;
[0101] If neither of the above two conditions is met, the task is executed directly.
[0102] Furthermore, the Brownout control algorithm is used to detect whether there are microservices that can be deactivated in the server to reduce the overall energy consumption of the system. The algorithm generates different scheduling strategies based on whether green energy can be used at the current time t. The execution process of the Brownout control algorithm is as follows:
[0103] Step 1: For each server in the server list, the current resource utilization of server i is known Determine whether green energy R can be used at the current time t t If green energy cannot be used, proceed to step 2; if green energy can be used, proceed to step 3;
[0104] Step 2: Trigger the brownout algorithm and calculate the dimmer value based on the overload level of the data center. Using the dimmer value θ t Calculate the expected utilization reduction of server i Then, according to the dimmer value θ t A set of microservices on server i is selected and deactivated, thereby reducing the utilization of the server.
[0105] Step 3: Determine the available green energy R at the current time t t Is it less than the total energy consumption P? t , if yes, go to step 4; if no, go to step 5;
[0106] Step 4: Trigger the brownout control algorithm to calculate the dimmer value Where ∈ represents the resource utilization of the batch task to the total resource utilization of the physical machine The ratio of; according to the dimmer value θ t Search for a set of microservices and deactivate them.
[0107] Step 5. Use green energy to perform interactive tasks.
[0108] The Deferring delayed execution algorithm is used to decide whether to postpone the execution time of batch tasks according to the available time of green energy, so as to maximize the utilization of green energy and reduce the carbon emissions of data centers. The execution process of the Deferring delayed execution algorithm is as follows:
[0109] For all batch processing tasks, the following three situations are judged respectively:
[0110] The first method is to determine whether the deadline of the batch task is at the beginning of the green energy availability. Previously, if the batch task deadline was Before, it means that green energy cannot be used to execute the task, so the task cannot be delayed and is executed directly at time t; otherwise, the Deferring delay execution algorithm delays the execution time of the task Then in time Update tasks when needed.
[0111] The second method is to determine whether the start time of the batch task is within the time interval when green energy is available. If so, the task is executed using green energy. Otherwise, the Deferring execution algorithm delays the execution time of the task. Then in time Update tasks when needed.
[0112] The third method is to determine whether the start time of the batch task is within the available time of green energy. After that, if the batch task start time is during the green energy available time After that, it means that there is no more available green energy, and the batch task is directly executed at time t to ensure QoS.
[0113] S50: Based on the scheduling strategy, the virtual machine scheduling algorithm and the host scaling machine expansion algorithm are used to perform virtual machine migration and machine expansion operations;
[0114] In this step, if the average utilization of the server cluster at time t is Less than the preset resource utilization threshold TU low , the virtual machine scheduling algorithm is used to migrate the virtual machines, and the Hostscaling machine expansion algorithm is executed to adjust the number of physical machines.
[0115] Specifically, the hostscaling machine expansion algorithm execution process includes:
[0116] Step 1: Calculate the difference n′ between the predicted number of physical machines required and the number of physical machines actually used, and determine the value of n′. If n′>0, execute step 2; if n′<0, execute step 3; if n′=0, execute step 4;
[0117] Step 2: If the green energy at the current time t is sufficient, n′ servers are added to the system to increase the available CPU utilization to improve QoS;
[0118] Step 3: If the total resources of the physical machines at the current time t exceed the resources requested by the user, then n′ physical machines are shut down in the system to reduce the energy consumption of the system.
[0119] Step 4: It means that the resources of the data center just meet the user's request and there is no need to adjust the number of physical machines.
[0120] Based on the above, the cloud computing resource scheduling method of the embodiment of the present application divides user requests into interactive tasks and batch tasks. For different types of tasks, the brownout control algorithm and the deferring delayed execution algorithm are used to adaptively adjust the state of microservices according to the load of the data center, generate different scheduling strategies, and perform virtual machine migration and machine expansion operations according to the scheduling strategies, thereby realizing multi-layer resource scheduling based on microservice management, virtual machine scheduling and physical machine expansion. The embodiment of the present application takes into account the use of green energy by the data center in the scheduling strategy, reduces the carbon emissions of the data center, ensures the efficient execution of tasks, and reduces the pollution of cloud computing to the environment. In the microservice management algorithm, the utilization rate of green energy is further improved.
[0121] See also Figure 2 , is a schematic diagram of the structure of a cloud computing resource scheduling system according to an embodiment of the present application. The cloud computing resource scheduling system 40 according to an embodiment of the present application includes:
[0122] Task acquisition module 41: used to acquire user requests and divide the user requests into interactive tasks and batch tasks;
[0123] Energy consumption calculation module 42: used to collect the load status data of the data center, and calculate the total energy consumption of the servers in the data center according to the load status data;
[0124] Scheduling strategy generation module 43: used to calculate interactive tasks and batch tasks based on the total energy consumption of the servers in the data center using a green perception algorithm to generate scheduling strategies for interactive tasks and batch tasks; wherein the green perception algorithm includes a Brownout control algorithm and a Deferring delayed execution algorithm, the Brownout control algorithm is used to detect whether there are deactivatable microservices in the current server, and to determine whether green energy can be used at the current moment, and to generate a scheduling strategy for interactive tasks; the Deferring delayed execution algorithm is used to determine whether to postpone the execution time of batch tasks according to the available time of green energy in the data center, and to generate a scheduling strategy for batch tasks;
[0125] Scheduling policy execution module 44: used to perform virtual machine migration and machine expansion operations on the data center using a virtual machine scheduling algorithm and a Hostscaling machine expansion algorithm based on the generated scheduling policy.
[0126] See also Figure 3 , is a schematic diagram of the terminal structure of an embodiment of the present application. The terminal 50 includes a processor 51 and a memory 52 coupled to the processor 51.
[0127] The memory 52 stores program instructions for implementing the above-mentioned cloud computing resource scheduling method.
[0128] The processor 51 is used to execute program instructions stored in the memory 52 to control cloud computing resource scheduling.
[0129] The processor 51 may also be referred to as a CPU (Central Processing Unit). The processor 51 may be an integrated circuit chip having the ability to process signals. The processor 51 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0130] See also Figure 4, which is a schematic diagram of the structure of the storage medium of the embodiment of the present application. The storage medium of the embodiment of the present application stores a program file 61 that can implement all the above methods, wherein the program file 61 can be stored in the above storage medium in the form of a software product, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or terminal devices such as a computer, a server, a mobile phone, and a tablet.
[0131] The above description of the disclosed embodiments enables professionals and technicians in the field to implement or use the present application. Various modifications to these embodiments will be apparent to professionals and technicians in the field, and the general principles defined in this application can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown in the present application, but will conform to the widest scope consistent with the principles and novel features disclosed in the present application.
Claims
1. A cloud computing resource scheduling method, characterized in that: include: Obtaining user requests, and dividing the user requests into interactive tasks and batch tasks; Collecting load status data of the data center, and calculating the total energy consumption of the servers in the data center according to the load status data; Based on the total energy consumption of the servers in the data center, a green perception algorithm is used to calculate the interactive tasks and batch tasks, and generate scheduling strategies for the interactive tasks and batch tasks; wherein the green perception algorithm includes a Brownout control algorithm and a Deferring delayed execution algorithm, the Brownout control algorithm is used to detect whether there are deactivatable microservices in the current server, and to determine whether green energy can be used at the current moment, and to generate a scheduling strategy for the interactive tasks; the Deferring delayed execution algorithm is used to determine whether to postpone the execution time of the batch tasks according to the available time of green energy in the data center, and to generate a scheduling strategy for the batch tasks; Based on the generated scheduling strategy, a virtual machine scheduling algorithm and a host scaling machine expansion algorithm are used to perform virtual machine migration and machine expansion operations on the data center; wherein: The green perception algorithm is used to calculate the interactive tasks and the batch processing tasks to generate the scheduling strategy of the interactive tasks and the batch processing tasks: For each time t, the resource utilization of server i is known Resource utilization maximum threshold TU up and the minimum threshold TU low , Calculate the number of overloaded servers in a data center if For interactive tasks, the Brownout control algorithm is executed; for batch tasks, the Deferring delayed execution algorithm is executed; Calculate the average resource utilization of the server cluster at time t if Then execute the virtual machine scheduling algorithm and host scaling machine expansion algorithm; If both of the above conditions are not met, the task will be executed directly; The execution process of the Brownout control algorithm is specifically as follows: For each server in the server list, the current resource utilization of server i is known Determine whether green energy R can be used at the current time t t If green energy cannot be used, the brownout control algorithm is triggered and the overload degree of the data center is calculated. Using dimmerθ t Calculate the expected utilization reduction of server i And according to the dimmer value θ t Select a set of microservices on server i and deactivate them, where n represents the number of servers in the data center; If green energy can be used, determine the available green energy R at the current time t t Is it less than the total energy consumption P? t If yes, the brownout control algorithm is triggered to calculate Where ∈ represents the ratio of the resource utilization of the batch task to the total resource utilization of the physical machine; according to θ t Search for a set of microservices and deactivate them; if not, utilize green energy to perform interactive tasks; The execution process of the Deferring delayed execution algorithm is specifically as follows: For all batch processing tasks, the following three situations are judged respectively: Determine whether the deadline of the batch task is at the beginning of the green energy availability Previously, if yes, it means that the batch task cannot be executed using green energy, then the batch task is executed directly at time t; otherwise, the Deferring delayed execution algorithm is used to delay the execution time of the batch task Then in time Update tasks in real time; Determine whether the start time of the batch task is within the time interval when green energy is available. If so, use green energy to execute the batch task; otherwise, use the Deferring delayed execution algorithm to delay the execution time of the batch task. and in time Update tasks in real time; Determine whether the start time of the batch task is within the available time of green energy Afterwards, if yes, it means there is no more available green energy, and the batch processing task is directly executed at time t.
2. The cloud computing resource scheduling method according to claim 1, characterized in that: The calculating the total energy consumption of the servers in the data center according to the load status data specifically includes: Calculate the server energy consumption of each physical machine: in, represents the server energy consumption of physical machine i, w i Indicates the number of virtual machines deployed on physical machine i, represents the energy consumption of physical machine i in idle state, represents the dynamic energy consumption of physical machine i under load, θ t represents the regulator value at time t, which represents the resource utilization percentage of the microservice, represents the sum of resource utilization of all microservices running on the jth virtual machine on physical machine i, The calculation formula is: Among them A j represents the number of microservices on virtual machine j, represents the resource utilization of the kth microservice on virtual machine j; Calculate the energy consumption of the cooling equipment of each physical machine based on the energy consumption of the server: Among them, CoP(T sup ) is the cooling efficiency, T sup is the temperature at which the cooling equipment cools; The total energy consumption of the servers in the data center at time t is: P t =d(t) ′ +c(d(t)′) in, represents the total energy consumption of all servers in the data center at time t, where n represents the number of servers in the data center, Represents the total energy consumption of all cooling equipment in the data center at time t.
3. The cloud computing resource scheduling method according to claim 2, characterized in that: Calculating the total energy consumption of the servers in the data center according to the load status data also includes: Calculate the workload of the data center; the workload calculation method is: Assume that there are M interactive tasks and N batch tasks in the data center. m (t) represents the workload of interactive task m at time t, u m represents the resources required by the interactive task m, a m (t)×u m represents the resource requested by interactive task m at time t, b n (t) represents the workload of interactive task n at time t, u n represents the resources required for interactive task n, b n (t)×u n represents the resources requested by interactive task n at time t. For batch tasks, the scheduler can choose to postpone their execution to the next time. Therefore, the actual resource requested by interactive task n at time t is b n (t) is: In the above formula, represents the proportion of interactive tasks that are postponed at time t-1, b n (t)′ represents the original workload of interactive task n at time t; The workload of the data center at time t is: d(t)=∑ m a m (t)×u m +∑ m b n (t)×u n 。 4. The cloud computing resource scheduling method according to claim 3, characterized in that: The virtual machine scheduling algorithm and the host scaling algorithm are used to perform virtual machine migration and machine expansion operations on the data center as follows: If the average utilization of the server cluster at time t Less than the resource utilization threshold TU low , the virtual machine scheduling algorithm is used to migrate the virtual machine, and the host scaling machine expansion algorithm is executed to adjust the number of physical machines. The execution process of the host scaling machine expansion algorithm specifically includes: Calculate the difference n between the predicted number of physical machines required and the number of physical machines actually used ′ , if n ′ > 0, indicating that the green energy at the current time t is sufficient, then n is added to the system ′ Servers; If n ′ <0, indicating that the total physical machine resources at the current time t exceed the resources requested by the user, then n is closed in the system ′ physical machine; If n ′ =0, indicating that the resources of the data center just meet the user's request, and the number of physical machines will not be adjusted.
5. A cloud computing resource scheduling system for the cloud computing resource scheduling method according to claim 1, characterized in that: include: Task acquisition module: used to acquire user requests and divide the user requests into interactive tasks and batch tasks; Energy consumption calculation module: used to collect the load status data of the data center and calculate the total energy consumption of the servers in the data center according to the load status data; Scheduling strategy generation module: used to calculate the interactive tasks and batch tasks based on the total energy consumption of the servers in the data center using a green perception algorithm to generate a scheduling strategy for the interactive tasks and batch tasks; wherein the green perception algorithm includes a Brownout control algorithm and a Deferring delayed execution algorithm, the Brownout control algorithm is used to detect whether there are deactivatable microservices in the current server, and to determine whether green energy can be used at the current moment, and to generate a scheduling strategy for the interactive tasks; the Deferring delayed execution algorithm is used to determine whether to postpone the execution time of the batch tasks according to the available time of green energy in the data center, and to generate a scheduling strategy for the batch tasks; Scheduling policy execution module: used to perform virtual machine migration and machine expansion operations on the data center based on the generated scheduling policy, using a virtual machine scheduling algorithm and a Hostscaling machine expansion algorithm.
6. A terminal, characterized in that: The terminal includes a processor and a memory coupled to the processor, wherein: The memory stores program instructions for implementing the cloud computing resource scheduling method according to any one of claims 1 to 4; The processor is used to execute the program instructions stored in the memory to control cloud computing resource scheduling.
7. A storage medium, characterized in that: Processor-executable program instructions are stored, and the program instructions are used to execute the cloud computing resource scheduling method described in any one of claims 1 to 4.
Citation Information
Patent Citations
Virtualization energy-saving system in Cloud computing
CN104657215A
Service quality assurance method for cloud computing server power consumption and resource competition cooperative control
CN108574600A