CN112379970A - Load control method and device, computer equipment and storage medium - Google Patents
Load control method and device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN112379970A CN112379970A CN202011286212.2A CN202011286212A CN112379970A CN 112379970 A CN112379970 A CN 112379970A CN 202011286212 A CN202011286212 A CN 202011286212A CN 112379970 A CN112379970 A CN 112379970A
- Authority
- CN
- China
- Prior art keywords
- server
- virtual machine
- component
- utilization rate
- utilization
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 54
- 238000005265 energy consumption Methods 0.000 claims abstract description 88
- 230000009467 reduction Effects 0.000 claims abstract description 56
- 238000012216 screening Methods 0.000 claims abstract description 25
- 230000004913 activation Effects 0.000 claims abstract description 9
- 238000001994 activation Methods 0.000 claims abstract description 9
- 230000001174 ascending effect Effects 0.000 claims description 36
- 238000004364 calculation method Methods 0.000 claims description 30
- 238000004422 calculation algorithm Methods 0.000 claims description 16
- 238000004590 computer program Methods 0.000 claims description 9
- 238000009825 accumulation Methods 0.000 claims description 3
- 238000012913 prioritisation Methods 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 13
- 230000005012 migration Effects 0.000 description 7
- 238000013508 migration Methods 0.000 description 7
- 230000000694 effects Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 5
- 230000008859 change Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 4
- 238000005457 optimization Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- NAWXUBYGYWOOIX-SFHVURJKSA-N (2s)-2-[[4-[2-(2,4-diaminoquinazolin-6-yl)ethyl]benzoyl]amino]-4-methylidenepentanedioic acid Chemical compound C1=CC2=NC(N)=NC(N)=C2C=C1CCC1=CC=C(C(=O)N[C@@H](CC(=C)C(O)=O)C(O)=O)C=C1 NAWXUBYGYWOOIX-SFHVURJKSA-N 0.000 description 2
- 230000006835 compression Effects 0.000 description 2
- 238000007906 compression Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000012163 sequencing technique Methods 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000015556 catabolic process Effects 0.000 description 1
- 238000001816 cooling Methods 0.000 description 1
- 238000006731 degradation reaction Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/32—Means for saving power
- G06F1/3203—Power management, i.e. event-based initiation of a power-saving mode
- G06F1/3234—Power saving characterised by the action undertaken
- G06F1/3287—Power saving characterised by the action undertaken by switching off individual functional units in the computer system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/32—Means for saving power
- G06F1/3203—Power management, i.e. event-based initiation of a power-saving mode
- G06F1/3234—Power saving characterised by the action undertaken
- G06F1/329—Power saving characterised by the action undertaken by task scheduling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/485—Task life-cycle, e.g. stopping, restarting, resuming execution
- G06F9/4856—Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/4557—Distribution of virtual machine instances; Migration and load balancing
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- Power Sources (AREA)
Abstract
The embodiment of the application belongs to the field of cloud computing, and relates to a load control method, which comprises the steps of collecting server state information, wherein the server state information at least comprises server starting number and server overload number; calculating overload proportion data based on the number of server activations and the number of server overloads; calculating control adjustment parameters based on the overload ratio data; calculating the server reduction utilization rate of the overload server based on the control and regulation parameters and the server energy consumption model; calculating a virtual machine reduced utilization rate of a virtual machine in an overload server based on the server reduced utilization rate; screening the overload server based on an application component selection strategy and the virtual machine reduced utilization rate to obtain a component to be closed; and closing the to-be-closed component of the overload server. The application also provides a load control device, a computer device and a storage medium. The method and the device adopt the closing component for selectively and dynamically adjusting the microservice to reduce the consumption of the energy consumption of the server.
Description
Technical Field
The present application relates to the field of cloud computing, and in particular, to a load control method and apparatus, a computer device, and a storage medium.
Background
With the development of the information technology industry, the cloud computing technology is used as an important component of the information technology, and is widely applied to various fields in life due to the price mode of the cloud computing technology which is paid on the spot, the low operation cost, the high expansibility and the easy accessibility. In a real-world scenario, cloud computing data centers often suffer from a transient increase in load due to an increase in the number of sudden requests, which may lead to an overload in the usage of server resources and a performance degradation. The high energy consumption of the cloud computing data center also becomes a constraint restricting the cloud computing development, and the existing energy-saving technology is difficult to generate effective effect when the data center is in an overall overload state.
The problem of high energy consumption of the cloud server has become one of the key issues to be considered by cloud server providers. Currently, the existing methods for reducing energy consumption of cloud data centers include virtual machine migration (VM coherence) and Dynamic Voltage Frequency Scaling (DVFS).
(1) Virtual machine migration (VM consistency): to minimize energy consumption by distributing the task load among fewer machines and shutting down unused machines. By using the method, the cloud computing server can cause the virtual machines working on the underutilized servers to be migrated to other servers, and the spare servers enter a low-energy consumption mode or are shut down.
(2) Dynamic voltage frequency adjustment (DVFS): this technique focuses on a tradeoff between computing performance and server energy consumption. That is, the DVFS technique reduces the frequency and voltage for the purpose of reducing power consumption when the processor is lightly loaded, and uses the maximum frequency and voltage when the processor is heavily loaded. Current DVFS-based work is primarily directed to controlling the kernel using thread migration and active cooling to maximize overall energy efficiency and to coordinate CPU and memory to find the optimal frequency.
Disclosure of Invention
An object of the embodiments of the present application is to provide a load control method, an apparatus, a computer device, and a storage medium, so as to solve at least the problems that the conventional load control method is not intelligent and cannot utilize a server to the maximum.
In order to solve the foregoing technical problem, an embodiment of the present application provides a load control method, which adopts the following technical solutions:
collecting server state information, wherein the server state information at least comprises server starting number and server overload number;
calculating overload proportion data based on the number of server activations and the number of server overloads;
calculating control adjustment parameters based on the overload ratio data;
calculating the server reduction utilization rate of the overload server based on the control and regulation parameters and the server energy consumption model;
calculating a virtual machine reduced utilization rate of a virtual machine in an overload server based on the server reduced utilization rate;
screening the overload server based on an application component selection strategy and the virtual machine reduced utilization rate to obtain a component to be closed;
and closing the to-be-closed component of the overload server.
Further, the step of calculating the virtual machine utilization reduction rate of the virtual machine in the overloaded server based on the server utilization reduction rate specifically includes:
creating a non-opening component list in a virtual machine in an overload server;
calculating the virtual machine utilization rate of the virtual machine based on the virtual machine utilization rate model;
acquiring the utilization rate of the virtual machine and the synchronous ratio of the reduced utilization rate of the server;
and calculating a synchronization difference value of the utilization rate of the virtual machine based on the synchronization ratio, and taking the synchronization difference value as the utilization rate reduction of the virtual machine.
Further, the screening operation is performed based on a minimum utilization component priority algorithm, and the screening operation is performed on the overload server based on an application component selection strategy and a virtual machine utilization variable, so as to obtain a component to be closed, and the method specifically includes the steps of:
acquiring the component utilization rate of a non-starting component of the virtual machine, and performing ascending arrangement to obtain an ascending component list;
and calculating the non-starting assembly meeting the reduction of the utilization rate of the virtual machine based on the sequence accumulation of the ascending assembly list to obtain the assembly to be closed.
Further, the step of calculating the non-starting component meeting the reduction utilization rate of the virtual machine based on the sequence of the ascending component list to obtain the component to be closed specifically includes:
if the accumulatively calculated utilization rate of the current non-starting component exceeds the reduced utilization rate of the virtual machine, taking the current non-starting component as a cut-to position;
and in the ascending component list, all the non-starting components before the position are taken as the components to be closed.
In order to solve the above technical problem, an embodiment of the present application further provides a load control device, which adopts the following technical solutions:
the server state information acquisition module is used for acquiring server state information, and the server state information at least comprises server starting number and server overload number;
the overload ratio calculation module is used for calculating overload ratio data based on the server starting number and the server overload number;
the adjusting parameter calculating module is used for calculating and controlling adjusting parameters based on the overload ratio data;
the server utilization reduction calculation module is used for calculating the server utilization reduction of the overload server based on the control and regulation parameters and the server energy consumption model;
the virtual machine utilization reduction calculation module is used for calculating the virtual machine utilization reduction of the virtual machine in the overload server based on the server utilization reduction;
the screening operation module is used for screening the overload server based on the application component selection strategy and the virtual machine reduced utilization rate to obtain a component to be closed;
and the component closing module is used for closing the components to be closed of the overload server.
Further, the virtual machine utilization reduction calculation module includes:
the component list creating unit is used for creating a non-opening component list in a virtual machine in an overload server;
a virtual machine utilization calculation unit for calculating a virtual machine utilization of the virtual machine based on the virtual machine utilization model;
the synchronization ratio acquisition unit is used for acquiring the utilization rate of the virtual machine and the synchronization ratio of the utilization rate reduction of the server;
and the synchronization difference value calculating unit is used for calculating the synchronization difference value of the utilization rate of the virtual machine based on the synchronization ratio value and taking the synchronization difference value as the reduced utilization rate of the virtual machine.
Further, the screening operation module includes:
the utilization rate sequencing unit is used for acquiring the component utilization rate of the non-starting component of the virtual machine, and performing ascending sequencing to obtain an ascending component list;
and the to-be-closed component obtaining unit is used for accumulatively calculating the non-starting component meeting the reduction utilization rate of the virtual machine based on the sequence of the ascending component list to obtain the to-be-closed component.
Further, the to-be-closed component acquiring unit includes:
the system comprises an interception position obtaining subunit, a storage unit and a control unit, wherein the interception position obtaining subunit is used for taking a current non-starting assembly as an interception position if the utilization rate of the current non-starting assembly calculated in an accumulated mode exceeds the reduction utilization rate of the virtual machine;
and the to-be-closed component output subunit is used for taking all the non-starting components before the position as the to-be-closed components in the ascending component list.
In order to solve the above technical problem, an embodiment of the present application further provides a computer device, which adopts the following technical solutions:
the computer device comprises a memory in which a computer program is stored and a processor which, when executing the computer program, implements the steps of the load control method as defined in any one of the above.
In order to solve the above technical problem, an embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solutions:
the computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the load control method according to any one of the preceding claims.
Compared with the prior art, the embodiment of the application mainly has the following beneficial effects:
the application provides a load control method, which comprises the following steps: collecting server state information, wherein the server state information at least comprises server starting number and server overload number; calculating overload proportion data based on the number of server activations and the number of server overloads; calculating control adjustment parameters based on the overload ratio data; calculating the server reduction utilization rate of the overload server based on the control and regulation parameters and the server energy consumption model; calculating a virtual machine reduced utilization rate of a virtual machine in an overload server based on the server reduced utilization rate; screening the overload server based on an application component selection strategy and the virtual machine reduced utilization rate to obtain a component to be closed; and closing the to-be-closed component of the overload server. Acquiring control and regulation parameters based on the starting number of the servers and the overload number of the servers in the collected server state information, visually reflecting the relation between the number of the overloaded servers and the number of the whole servers through the control and regulation parameters, calculating the utilization reduction rate of the servers and the utilization reduction rate of the virtual machines in the overloaded servers by combining the control and regulation parameters and a server energy consumption model, searching components meeting the utilization constraint condition based on the utilization reduction rate of the virtual machines and an application component selection strategy, finding other components connected with the components, and finally closing the found components. The closing state of the application component can be selectively and dynamically adjusted, the energy consumption of the cloud server is reduced, and the utilization rate of the server is improved.
Drawings
In order to more clearly illustrate the solution of the present application, the drawings needed for describing the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is an exemplary model architecture diagram to which the present application may be applied;
FIG. 3 is a flow diagram of one embodiment of a load control method according to the present application;
FIG. 4 is a flowchart of one embodiment of step S5 of FIG. 3;
FIG. 5 is a flowchart of one embodiment of step S6 of FIG. 3;
FIG. 6 is a flowchart of one embodiment of step S602 in FIG. 5;
FIG. 7 is a schematic diagram of the structure of one embodiment of a load control device according to the present application;
FIG. 8 is a block diagram illustrating an embodiment of a derating calculation module of the virtual machine of FIG. 7;
FIG. 9 is a schematic structural diagram of one embodiment of the screening operations module of FIG. 7;
FIG. 10 is a schematic structural diagram of one embodiment of a module acquiring unit to be closed shown in FIG. 9;
FIG. 11 is a schematic block diagram of one embodiment of a computer device according to the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "including" and "having," and any variations thereof, in the description and claims of this application and the description of the above figures are intended to cover non-exclusive inclusions. The terms "first," "second," and the like in the description and claims of this application or in the above-described drawings are used for distinguishing between different objects and not for describing a particular order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
Example one
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various communication client applications installed thereon, such as a web browser application, a shopping application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, mpeg compression standard Audio Layer 3), MP4 players (Moving Picture Experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that the load control method provided in the embodiments of the present application is generally executed by a server/terminal device, and accordingly, the load control apparatus is generally disposed in the server/terminal device.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, the model architecture includes a user, an application, and a cloud server provider.
The user is a user who submits a task processing request to the cloud data center. The user entity is defined to include the user ID and the requested application or service information. The user is charged for the service.
In the model provided by the embodiments of the present application, an application is composed of many components, or microservices, which are labeled as mandatory and optional components.
The optional components are always in a running state when the system runs, such as key components in the system, such as a database; the selectable components may be dynamically set to an on or off state.
It should be understood that these components in FIG. 2 have parameters such as utilization and discounts. Wherein the utilization represents a server utilization that may be reduced after the component is turned off, and the discount represents a fee returned to the user. The opening and closing of the optional components are determined by a controller, and the controller selects a strategy to make a decision according to the system state and the component attributes. Since components can also be interconnected, this means that they can communicate with each other and there is a data dependency between them. I.e. it is to be understood that if a component is turned off, all its connected optional components will also be set to the off state. For example, in FIG. 1, if Com3 in application 1 is closed, Com2 should also be closed; in application 2, if Com1 is closed, Com3 should also be closed. In application n, if Com4 is closed, Com3 should also be closed, but Com2 is still working because Com1 is connected to Com3, but Com1 is optional and therefore not closed.
The cloud service provider provides resources to meet service requirements, and the server runs a group of virtual machines to run application programs.
With continued reference to FIG. 3, a flow diagram of one embodiment of a method of load control according to the present application is shown. The load control method comprises the following steps:
step S1, collecting server status information, where the server status information at least includes the number of server enablers and the number of server overloads.
In this embodiment, the electronic device (e.g., the server/terminal device shown in fig. 1) on which the load control method operates may receive the request for the server status information via a wired connection or a wireless connection. It should be noted that the wireless connection means may include, but is not limited to, a 3G/4G connection, a WiFi connection, a bluetooth connection, a WiMAX connection, a Zigbee connection, a uwb (ultra wideband) connection, and other wireless connection means now known or developed in the future.
In this embodiment, the number of server enabled servers and the number of server overloaded servers refer to the number of servers in the current state, i.e. the number of server enabled servers M, which are calculated after a preset time interval t elapses, and the number of servers in the current state, i.e. the number of server overloaded servers n, which are calculatedt。
In step S2, overload proportion data is calculated based on the number of server activations and the number of server overloads.
In this embodiment, the overload ratio data refers to a ratio of the number of overloaded servers to the number of overall servers, i.e. the number of server enabled M and the number of server overloaded ntAnd the ratio can be used for reflecting the overload degree of the energy consumption of the server.
Specifically, the server starting number M and the server overload number n are calculatedtRatio of byAnd calculating overload ratio data.
And step S3, calculating control adjustment parameters based on the overload ratio data.
In the present embodiment, the adjustment parameter is a control parameter for determining the adjustment degree of the power consumption of the server at the preset time t.
In particular, overload duty dataIs assigned to the tuning parameter thetatBased on the adjustment parameter thetatIt can be understood that if all servers are in an overload state at the preset time t, the adjustment parameter is 1.0, that is, the controller will manage the components on all servers; whereas if no server is overloaded and application component policing is not triggered at time t, the value of the tuning parameter is 0.0. It will be appreciated that the value of the tuning parameter will be dependent on the number of server activations M and the number of server overloads ntThe ratio changes as it changes and the higher this ratio is, the closer the value of the adjustment parameter is to 1.
And step S4, calculating the server utilization reduction rate of the overloaded server based on the control and regulation parameters and the server energy consumption model.
In this embodiment, the server derating utilization is the amount of utilization on the server that is expected to need to be derated; the utilization rate indicates a server utilization rate that can be reduced after a component on the server is shut down.
In this embodiment, the present embodiment expresses the optimization objective in terms of energy consumption to minimize the total energy consumption of the server as follows:
wherein,represents the total energy consumption of a single server and M represents the total number of servers.
For example, in practical applications, the present embodiment writes out the total energy consumption of the server in the form of an expression as shown below:
wherein,representing power consumption when the host is in an idle state,representing the energy consumption of the server in a load state; it can be understood that the energy consumption of the server in the idle state is constant, while the energy consumption in the load state is linear to the total CPU utilization of all virtual machines on the server, i.e. if no virtual machine is hosted on the server, the server can be shut down to save energy consumption; VMi,jRepresenting the jth virtual machine running on the ith server, ωiRepresenting the number of virtual machines allocated to the ith server.
Further, u (VM) in the present embodimenti,j) Expressed as:
wherein u (VM)i,j) Representing the utilization rate of the virtual machine, which is the sum of the utilization rates of all the applications in the jth virtual machine; in the above formula, c represents the number of the component, AjRepresents the total number of all components; it can be appreciated that since the CPU occupies a significant portion of the energy consumption of the server, the present embodiment achieves energy savings by optimizing CPU utilization.
Further, the parameter θ is adjustedtThe calculation formula of (a) is as follows:
wherein n istRepresents the number of hosts in an overload state during the time interval t; m represents the total number of virtual machines.
the HMP represents a host power model for calculating expected utilization reduction, and can be obtained by providing data from a hardware manufacturer, which is not limited herein.
In particular, the parameter θ is adjustedtCan calculate the expected reduced energy consumption of the serverAnd expected reduced utilizationIn particular, the energy consumption model can be based on a serverAnd calculating the energy consumption of the server under different utilization rate levels, and further calculating the utilization rate change by utilizing the change of the energy consumption of the server. For example, in the server energy consumption model, assuming that a server with a utilization of 100% is 247 watts and a server with a utilization of 80% is 211 watts, if a reduction in power from 247 to 211 watts is required, the expected reduction in utilization is 20% to 100% -80%.
Step S5, calculating a virtual machine under-utilization of the virtual machines in the overloaded server based on the server under-utilization.
In this embodiment, the virtual machine reduced utilization is the size of the utilization that the virtual machine expects to need to be reduced.
Specifically, in this embodiment, an empty non-open component list is created in a virtual machine in an overload server, the virtual machine utilization rate of the virtual machine is calculated based on a virtual machine utilization rate model, and then a synchronization difference value of the virtual machine utilization rate, that is, the virtual machine reduced utilization rate, is further calculated by obtaining a synchronization ratio of the virtual machine utilization rate and the server reduced utilization rate, so that a component to be closed or opened is accurately obtained according to the virtual machine reduced utilization rate, thereby selectively and dynamically adjusting the open and close components of the micro service to reduce the consumption of the server energy consumption.
And step S6, screening the overload server based on the application component selection strategy and the virtual machine reduced utilization rate to obtain a component to be closed.
In this embodiment, the application component selection policy is responsible for finding a set of components that satisfy the utilization constraint and finding other components associated with them and setting them to the off state.
In this embodiment, the component to be shut down is a less-utilized component.
Specifically, in this embodiment, the utilization rate of the virtual machine may be reduced to perform numerical value sorting, and then, the component with a lower utilization rate and meeting the constraint condition is screened out as the component to be closed by combining the constraint condition of the application component selection policy rate, so as to accurately obtain the component to be closed, thereby implementing selective dynamic adjustment of the component to close the microservice to reduce the consumption of the server energy consumption.
And step S7, closing the to-be-closed component of the overload server.
Specifically, the components to be closed of the overloaded server are closed so as to accurately close the components to be closed, and therefore selective dynamic adjustment of the components for closing the microservices is achieved to reduce the consumption of the energy consumption of the server.
It should be noted that, if the server does not exceed the energy consumption threshold, the optional components that have been set to be turned off may be turned on based on the load control method of the present application, and then a conventional virtual machine migration algorithm may be applied to optimize the location allocation of the virtual machine, so as to implement selective dynamic adjustment of the components that are turned on or turned off for the microservice, thereby reducing the energy consumption of the server.
The application provides a load control method, which comprises the following steps: collecting server state information, wherein the server state information at least comprises server starting number and server overload number; calculating overload proportion data based on the number of server activations and the number of server overloads; calculating control adjustment parameters based on the overload ratio data; calculating the server reduction utilization rate of the overload server based on the control and regulation parameters and the server energy consumption model; calculating a virtual machine reduced utilization rate of a virtual machine in an overload server based on the server reduced utilization rate; screening the overload server based on an application component selection strategy and the virtual machine reduced utilization rate to obtain a component to be closed; and closing the to-be-closed component of the overload server. Acquiring control and regulation parameters based on the starting number of the servers and the overload number of the servers in the collected server state information, visually reflecting the relation between the number of the overloaded servers and the number of the whole servers through the control and regulation parameters, calculating the utilization reduction rate of the servers and the utilization reduction rate of the virtual machines in the overloaded servers by combining the control and regulation parameters and a server energy consumption model, searching components meeting the utilization constraint condition based on the utilization reduction rate of the virtual machines and an application component selection strategy, finding other components connected with the components, and finally closing the found components. The closing state of the application component can be selectively and dynamically adjusted, the energy consumption of the cloud server is reduced, and the utilization rate of the server is improved.
With continued reference to fig. 4, a flowchart for implementing step S5 in fig. 3 is shown, and for convenience of explanation, only the parts relevant to the present application are shown.
In some optional implementations of the first embodiment of the present application, the step S5 specifically includes: step S501 to step S504.
Step S501, a non-opening component list is created in a virtual machine in an overload server;
step S502, calculating the virtual machine utilization rate of the virtual machine based on the virtual machine utilization rate model;
step S503, obtaining the utilization rate of the virtual machine and the synchronization ratio of the reduced utilization rate of the server;
step S504, calculating a synchronization difference value of the virtual machine utilization rate based on the synchronization ratio, and taking the synchronization difference value as the virtual machine reduced utilization rate.
In this embodiment, the list of non-open components is a list created for an empty non-open component, and is denoted as dcli,j,t。
In this embodiment, the virtual machine utilization model is as follows:
wherein N represents the total number of the virtual machines, M represents the total number of the servers, and u represents the utilization rate of the virtual machines; equation (1) represents the total number of virtual machines w assigned to a serveriEqual to the sum of the virtual machines; equation (7) represents that all virtual machine utilization cannot exceed the sum of its server available utilization.
In this embodiment, the synchronization ratio is the utilization of the virtual machine and the serverDecrease ratio between utilization, note
In this embodiment, the synchronization difference is calculated based on the virtual machine utilization model in combination with the synchronization ratio, and can be used to represent the utilization rate that the virtual machine is expected to need to reduce, that is, the virtual machine reduces the utilization rate.
It can be understood that, in this embodiment, the server energy consumption and the virtual machine energy consumption can be calculated by the server energy consumption model, i.e., through the above equations (1) to (6); or the specific energy consumption can be obtained by measuring through hardware equipment such as an electric meter and the like.
Specifically, the embodiment first passes through the pair of the servers hiVirtual machine VM ofjAn empty non-open component in (1) creates a list, i.e. the non-open component list dcli,j,tAnd initializing to store the components in the closed state at the time t through the non-open component list; then, the utilization rate of the virtual machine is calculated based on the utilization rate model of the virtual machine, and the ratio of the utilization rate of the virtual machine to the expected reduced utilization rate, namely the synchronization ratio, is combinedTo further calculate a synchronization difference value that can be used to indicate the amount of utilization that the virtual machine is expected to require to be reduced, and to treat the synchronization difference value as the virtual machine reduced utilization.
With continuing reference to fig. 5, a flowchart of an implementation of step S6 in fig. 3 is shown, and for ease of illustration, only the portions relevant to the present application are shown.
In some optional implementations of the first embodiment of the present application, the step S6 specifically includes: step S601 and step S602.
Step S601, acquiring the component utilization rate of the non-starting component of the virtual machine, and performing ascending arrangement to obtain an ascending component list.
Step S602, calculating the non-starting component meeting the reduction utilization rate of the virtual machine based on the sequence accumulation of the ascending component list to obtain the component to be closed.
In this embodiment, in order to achieve a better utilization reduction effect, the embodiment selects a component with the lowest utilization from the components by using a minimum utilization component priority algorithm (LUFCS) to accurately acquire a component to be shut down that needs to be shut down and has a lower utilization.
In particular, since LUFCS assumes that the less-utilized components are relatively unimportant to the user, the cloud service provider may shut down some of the less-utilized components to meet the demand for reduced utilization; this embodiment selects the least-utilized component from among the components based on the LUFCS, and performs this operation until the sum of the utilization of the entire component satisfies the expected utilization criterion urVMi,jI.e. the input of LUFCS is the expected configuration utilization urVMi,jThe output of which is a list dcl of components set to the closed statei,j,tSpecifically, the component utilization rate of the non-startup component of the virtual machine is obtained, the obtained component utilization rates are sorted from small to large, and the sorted list is used as an ascending component list and is recorded as ocli,j,tIt is understood that the front-most component of the list is the least utilized component; further, since there may actually be connection relationships between components, for a connected component, the LUFCS treats them as an integral component and uses the sum of their utilization rates for sorting; while this measure reduces the priority of shutting down those low-utilization components, the possibility of shutting down multiple components simultaneously due to the interconnection between the components is effectively avoided; thus, the present embodiment provides for initializing a data set StStoring the relation between the components to be set as closed; then, whether the average utilization factor parameter of the first component is larger than u is judgedrVMi,jIf it is greater than urVMi,jUnder the condition, the component and the connected components are all put into a closed state; in turn, these already closed components are written into the ascending component list ocli,j,tAnd the components are combinedThe connection relation of (A) writes the data set StIn (1).
Further, the present embodiment can calculate the discount total d (VMi, j) of the components that have been shut down by repeating the above operations until the utilization criterion that needs to be lowered is reached.
The present embodiment expresses the optimization objective in terms of discount as minimizing the total discount, i.e. reducing the cost returned to the user:
where D represents the total discount in a single server and M represents the total number of servers. Combining equations (7) through (9) enables a balance between total energy consumption and discount.
Further, in order to measure the performance of the load control method of the present application, the embodiment provides an algorithm metric index EffpaSpecifically, the following formula (10) is shown below:
wherein E ispaEnergy consumption of the present application load control method adopted, EbIs the reference algorithm energy consumption, DpaThe discount total amount is provided in advance by the load control method; it will be appreciated that if the load control method of the present application is more energy efficient than the baseline algorithm, thenWill be between 0 and 1; dpaWill represent a discount offered ratio, with a value between 0 and 1; therefore, when EffpaLower, indicating lower energy consumption and lower total discount offered; where α represents the weight of the discount, generally its value is 1; it will be appreciated that if the cloud server operator is more focused on discounts, its value will be greater than 1, if the cloud server operator is more focused on discountsSave power, then its value will be set to less than 1.
With continuing reference to fig. 6, a flowchart of an implementation of step S602 in fig. 5 is shown, and for ease of illustration, only the portions relevant to the present application are shown.
In some optional implementation manners of the first embodiment of the present application, the step S602 specifically includes: step S6021 and step S6022.
In step S6021, if the cumulatively calculated utilization rate of the current non-boot component exceeds the reduced utilization rate of the virtual machine, the current non-boot component is taken as the cut-to position.
In step S6022, all the non-activated components up to the position are regarded as the components to be turned off in the ascending component list.
In this embodiment, the cut-to location is the first component that has a utilization that is greater than the component that has a reduced utilization of the virtual machine.
Specifically, if the cumulatively calculated utilization of the current non-enabled component exceeds the virtual machine reduced utilization, which may be understood as the first component found by the LUFCS does not meet the expected reduced utilization, the LUFCS in this embodiment will find a position p in the selectable components, i.e., the sum of all combined utilization parameters before the position p-1 is less than urVMi,jAnd the component at position p is the first component with utilization rate greater than u, i.e. the truncated position; furthermore, to select u with a utilization factor parameter only closest to the otherrVMi,jIn this embodiment, in the ascending component list, all the non-activated components up to the position are used as the components to be closed, and specifically, all the components in the sub-list selected in the previous step may be written into the ascending component list ocl by using the LUFCSi,j,tAnd writes the connection relationship of these components into the data set StPerforming the following steps; then, other interconnected components are found by the LUFCS and written into the ascending component list ocli,j,tPerforming the following steps; further, it may also be possible to calculate the discount total d (VMi, j) for those components that have been turned off.
In summary, the present application provides a load control method,the method comprises the following steps: collecting server state information, wherein the server state information at least comprises server starting number and server overload number; calculating overload proportion data based on the number of server activations and the number of server overloads; calculating control adjustment parameters based on the overload ratio data; calculating the server reduction utilization rate of the overload server based on the control and regulation parameters and the server energy consumption model; calculating a virtual machine reduced utilization rate of a virtual machine in an overload server based on the server reduced utilization rate; screening the overload server based on an application component selection strategy and the virtual machine reduced utilization rate to obtain a component to be closed; and closing the to-be-closed component of the overload server. Acquiring control and regulation parameters based on the starting number of the servers and the overload number of the servers in the acquired server state information, wherein the relation between the number of the overloaded servers and the number of the whole servers can be intuitively reflected through the control and regulation parameters; further, the utilization rate of the server is calculated by controlling the adjusting parameters and the server energy consumption model; then, by including the server hiVirtual machine VM ofjAn empty non-open component in (1) creates a list, i.e. the non-open component list dcli,j,tInitializing, and calculating the virtual machine reduced utilization rate which can be used for representing the size of the utilization rate which is expected to be reduced by the virtual machine according to the utilization rate of the virtual machine and the expected reduced utilization rate based on the utilization rate model of the virtual machine; further, in order to achieve a better utilization rate reduction effect, a component with the lowest utilization rate is selected from the components by adopting a component priority with the lowest selection utilization rate (LUFCS) algorithm, so that the component to be closed with the lower utilization rate and needing to be closed is accurately obtained, other components related to the component are found, and finally the obtained components are closed; finally, when the server does not exceed the energy consumption threshold, the optional components that have been set to off may be turned on based on the load control method of the present application, and then a conventional virtual machine migration algorithm may be applied in optimizing the location allocation of the virtual machine. The on-off state of the application component can be selectively and dynamically adjusted, the energy consumption of the cloud server is reduced, and the service is improvedUtilization of the device.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the computer program is executed. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Access Memory (RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
Example two
With further reference to fig. 7, as an implementation of the method shown in fig. 3, the present application provides an embodiment of a load control device, which corresponds to the embodiment of the method shown in fig. 3, and which can be applied to various electronic devices.
As shown in fig. 7, the load control apparatus 700 according to this embodiment includes a status information collecting module 701, an overload duty ratio calculating module 702, an adjustment parameter calculating module 703, a server utilization reduction calculating module 704, a virtual machine utilization reduction calculating module 705, a screening operation module 706, and a component shutdown module 707. Wherein:
a status information collecting module 701, configured to collect server status information, where the server status information at least includes a server starting number and a server overload number;
in this embodiment, the number of server enabled servers and the number of server overloaded servers refer to the number of servers in the current state, i.e. the number of server enabled servers M, which are calculated after a preset time interval t elapses, and the number of servers in the current state, i.e. the number of server overloaded servers n, which are calculatedt。
An overload duty calculation module 702 for calculating overload duty data based on the number of server activations and the number of server overloads;
in this embodiment, the overload ratio data refers to a ratio of the number of overloaded servers to the number of overall servers, i.e. the number of server enabled M and the number of server overloaded ntAnd the ratio can be used for reflecting the overload degree of the energy consumption of the server.
Specifically, the server starting number M and the server overload number n are calculatedtRatio of byAnd calculating overload ratio data.
An adjusting parameter calculating module 703, configured to calculate a control adjusting parameter based on the overload duty ratio data;
in the present embodiment, the adjustment parameter is a control parameter for determining the adjustment degree of the power consumption of the server at the preset time t.
In particular, overload duty dataIs assigned to the tuning parameter thetatBased on the adjustment parameter thetatIt can be understood that if all servers are in an overload state at the preset time t, the adjustment parameter is 1.0, that is, the controller will manage the components on all servers; whereas if no server is overloaded and application component policing is not triggered at time t, the value of the tuning parameter is 0.0. It will be appreciated that adjusting the values of the parameters will be enabled with the computing serverNumber M and server overload number ntThe ratio changes as it changes and the higher this ratio is, the closer the value of the adjustment parameter is to 1.
A server derating utilization calculation module 704, configured to calculate a server derating utilization of the overloaded server based on the control adjustment parameter and the server energy consumption model;
in this embodiment, the server derating utilization is the amount of utilization on the server that is expected to need to be derated; the utilization rate indicates a server utilization rate that can be reduced after a component on the server is shut down.
In this embodiment, the present embodiment expresses the optimization objective in terms of energy consumption to minimize the total energy consumption of the server as follows:
wherein,represents the total energy consumption of a single server and M represents the total number of servers.
For example, in practical applications, the present embodiment writes out the total energy consumption of the server in the form of an expression as shown below:
wherein,representing power consumption when the host is in an idle state,representing the energy consumption of the server in a load state; it will be appreciated that the energy consumption of the server in the idle state is constant, while the energy consumption in the load state is linearly related to the total CPU utilization of all virtual machines on the serverThat is, if no virtual machine is hosted on the server, the server may be shut down to save energy consumption; VMi,jRepresenting the jth virtual machine running on the ith server, ωiRepresenting the number of virtual machines allocated to the ith server.
Further, u (VM) in the present embodimenti,j) Expressed as:
wherein u (VM)i,j) Representing the utilization rate of the virtual machine, which is the sum of the utilization rates of all the applications in the jth virtual machine; in the above formula, c represents the number of the component, AjRepresents the total number of all components; it can be appreciated that since the CPU occupies a significant portion of the energy consumption of the server, the present embodiment achieves energy savings by optimizing CPU utilization.
Further, the parameter θ is adjustedtThe calculation formula of (a) is as follows:
wherein n istRepresents the number of hosts in an overload state during the time interval t; m represents the total number of virtual machines.
Further, the method can be used for preparing a novel materialExpected reduced utilization of groundThe calculation formula of (a) is as follows:
the HMP represents a host power model for calculating expected utilization reduction, and can be obtained by providing data from a hardware manufacturer, which is not limited herein.
In particular, the parameter θ is adjustedtCan calculate the expected reduced energy consumption of the serverAnd expected reduced utilizationSpecifically, the energy consumption of the server at different utilization levels can be calculated according to the energy consumption model of the server, and then the change of the utilization is calculated by utilizing the change of the energy consumption of the server. For example, in the server energy consumption model, assuming that a server with a utilization of 100% is 247 watts and a server with a utilization of 80% is 211 watts, if a reduction in power from 247 to 211 watts is required, the expected reduction in utilization is 20% to 100% -80%.
A virtual machine utilization reduction calculation module 705, configured to calculate a virtual machine utilization reduction of a virtual machine in the overloaded server based on the server utilization reduction;
in this embodiment, the virtual machine reduced utilization is the size of the utilization that the virtual machine expects to need to be reduced.
Specifically, in this embodiment, an empty non-open component list is created in a virtual machine in an overload server, the virtual machine utilization rate of the virtual machine is calculated based on a virtual machine utilization rate model, and then a synchronization difference value of the virtual machine utilization rate, that is, the virtual machine reduced utilization rate, is further calculated by obtaining a synchronization ratio of the virtual machine utilization rate and the server reduced utilization rate, so that a component to be closed or opened is accurately obtained according to the virtual machine reduced utilization rate, thereby selectively and dynamically adjusting the open and close components of the micro service to reduce the consumption of the server energy consumption.
A screening operation module 706, configured to perform screening operation on the overload server based on an application component selection policy and the virtual machine reduced utilization rate, so as to obtain a component to be closed;
in this embodiment, the application component selection policy is responsible for finding a set of components that satisfy the utilization constraint and finding other components associated with them and setting them to the off state.
In this embodiment, the component to be shut down is a less-utilized component.
Specifically, in this embodiment, the utilization rate of the virtual machine may be reduced to perform numerical value sorting, and then, the component with a lower utilization rate and meeting the constraint condition is screened out as the component to be closed by combining the constraint condition of the application component selection policy rate, so as to accurately obtain the component to be closed, thereby implementing selective dynamic adjustment of the component to close the microservice to reduce the consumption of the server energy consumption.
A component shutdown module 707, configured to shutdown the to-be-shutdown component of the overloaded server.
Specifically, the components to be closed of the overloaded server are closed so as to accurately close the components to be closed, and therefore selective dynamic adjustment of the components for closing the microservices is achieved to reduce the consumption of the energy consumption of the server.
It should be noted that, if the server does not exceed the energy consumption threshold, the optional components that have been set to be turned off may be turned on based on the load control apparatus of the present application, and then a conventional virtual machine migration algorithm may be applied to optimize the location allocation of the virtual machine, so as to implement selective dynamic adjustment of the components that are turned on or off for the microservice, thereby reducing the energy consumption of the server.
The application provides a load control device, control adjusting parameters are obtained based on the starting number of servers and the overload number of the servers in collected server state information, the relation between the number of overloaded servers and the number of overall servers can be visually reflected through the control adjusting parameters, the control adjusting parameters and a server energy consumption model are combined to calculate the utilization rate of the servers and the utilization rate of virtual machines in the overloaded servers, then components meeting utilization rate constraint conditions are searched for based on the utilization rate of the virtual machines and application component selection strategies, other components related to the components are found, and finally the searched components are closed. The closing state of the application component can be selectively and dynamically adjusted, the energy consumption of the cloud server is reduced, and the utilization rate of the server is improved.
Continuing to refer to fig. 8, a schematic structural diagram of the virtual machine utilization reduction calculation module 705 provided in the second embodiment of the present application is shown, and for convenience of description, only the portions related to the present application are shown.
In some optional implementations of the second embodiment of the present application, as shown in fig. 7, the virtual machine utilization reduction calculation module 705 includes: a component list creation unit 801, a virtual machine utilization calculation unit 802, a synchronization ratio acquisition unit 803, and a synchronization difference value calculation unit 804. Wherein:
a component list creating unit 801 configured to create a non-open component list in a virtual machine in an overloaded server;
a virtual machine utilization calculation unit 802, configured to calculate a virtual machine utilization of the virtual machine based on the virtual machine utilization model;
a synchronization ratio obtaining unit 803, configured to obtain a synchronization ratio of a virtual machine utilization rate and a server reduced utilization rate;
and a synchronization difference calculation unit 804, configured to calculate a synchronization difference of the virtual machine utilization rate based on the synchronization ratio, and use the synchronization difference as the virtual machine reduced utilization rate.
In this embodiment, the list of non-open components is a list created for an empty non-open component, and is denoted as dcli,j,t。
In this embodiment, the virtual machine utilization model is as follows:
wherein N represents the total number of the virtual machines, M represents the total number of the servers, and u represents the utilization rate of the virtual machines; equation (1) represents the total number of virtual machines w assigned to a serveriEqual to the sum of the virtual machines; equation (7) represents that all virtual machine utilization cannot exceed the sum of its server available utilization.
In this embodiment, the synchronization ratio is the ratio between the virtual machine utilization and the server reduction utilization, and is recorded as
It can be understood that, in this embodiment, the server energy consumption and the virtual machine energy consumption can be calculated by the server energy consumption model, i.e., through the above equations (1) to (6); or the specific energy consumption can be obtained by measuring through hardware equipment such as an electric meter and the like.
In this embodiment, the synchronization difference is calculated based on the virtual machine utilization model in combination with the synchronization ratio, and can be used to represent the utilization rate that the virtual machine is expected to need to reduce, that is, the virtual machine reduces the utilization rate.
Specifically, the embodiment first passes through the pair of the servers hiVirtual machine VM ofjAn empty non-open component in (1) creates a list, i.e. the non-open component list dcli,j,tAnd initializing to store the components in the closed state at the time t through the non-open component list; then, the utilization rate of the virtual machine is calculated based on the utilization rate model of the virtual machine, and the ratio of the utilization rate of the virtual machine to the expected reduced utilization rate, namely the synchronization ratio, is combinedTo further calculate a synchronization difference value that can be used to indicate the amount of utilization that the virtual machine is expected to require to be reduced, and to treat the synchronization difference value as the virtual machine reduced utilization.
With continuing reference to fig. 9, a schematic structural diagram of the screening operation module 706 provided in the second embodiment of the present application is shown, and for convenience of illustration, only the relevant portions of the present application are shown.
In some optional implementations of the second embodiment of the present application, as shown in fig. 7, the screening operation module 706 includes: a utilization rate sorting unit 901 and a to-be-closed component acquiring unit 902. Wherein:
a utilization rate sorting unit 901, configured to obtain component utilization rates of non-startup components of the virtual machine, and perform ascending sorting to obtain an ascending component list;
and a to-be-closed component obtaining unit 902, configured to cumulatively calculate, based on the sequence of the ascending component list, a non-startup component that meets the requirement of reducing the utilization rate of the virtual machine, to obtain a to-be-closed component.
In this embodiment, in order to achieve a better utilization reduction effect, the embodiment selects a component with the lowest utilization from the components by using a minimum utilization component priority algorithm (LUFCS) to accurately acquire a component to be shut down that needs to be shut down and has a lower utilization.
In particular, since LUFCS assumes that the less-utilized components are relatively unimportant to the user, the cloud service provider may shut down some of the less-utilized components to meet the demand for reduced utilization; this embodiment selects the least-utilized component from among the components based on the LUFCS, and performs this operation until the sum of the utilization of the entire component satisfies the expected utilization criterion urVMi,jI.e. the input of LUFCS is the expected configuration utilization urVMi,jThe output of which is a list dcl of components set to the closed statei,j,tSpecifically, the component utilization rate of the non-startup component of the virtual machine may be obtained, and then the obtained component utilization rate is changed from small to largeAnd (3) sorting, wherein the sorted list is used as an ascending component list and is marked as ocli,j,tIt is understood that the front-most component of the list is the least utilized component; further, since there may actually be connection relationships between components, for a connected component, the LUFCS treats them as an integral component and uses the sum of their utilization rates for sorting; while this measure reduces the priority of shutting down those low-utilization components, the possibility of shutting down multiple components simultaneously due to the interconnection between the components is effectively avoided; thus, the present embodiment provides for initializing a data set StStoring the relation between the components to be set as closed; then, whether the average utilization factor parameter of the first component is larger than u is judgedrVMi,jIf it is greater than urVMi,jUnder the condition, the component and the connected components are all put into a closed state; in turn, these already closed components are written into the ascending component list ocli,j,tAnd writes the connection relationship of these components into the data set StIn (1).
Further, the present embodiment can calculate the discount total d (VMi, j) of the components that have been shut down by repeating the above operations until the utilization criterion that needs to be lowered is reached.
The present embodiment expresses the optimization objective in terms of discount as minimizing the total discount, i.e. reducing the cost returned to the user:
where D represents the total discount in a single server and M represents the total number of servers. Combining equations (7) through (9) enables a balance between total energy consumption and discount.
Further, in order to measure the performance of the load control method used by the load control device of the present application, the present embodiment provides an algorithm metric EffpaSpecifically, the following formula (10) is shown below:
wherein E ispaEnergy consumption of the load control method employed in the load control device of the present application, EbIs the reference algorithm energy consumption, DpaThe discount total amount is provided in advance by the load control method used by the load control device; it will be appreciated that if the load control method used with the load control device of the present application is more energy efficient than the baseline algorithm, thenWill be between 0 and 1; dpaWill represent a discount offered ratio, with a value between 0 and 1; therefore, when EffpaLower, indicating lower energy consumption and lower total discount offered; where α represents the weight of the discount, generally its value is 1; it will be appreciated that if the cloud server operator is more focused on discounts, its value will be greater than 1, and if the cloud server operator is more focused on energy savings, its value will be set to less than 1.
With continuing reference to fig. 10, a schematic structural diagram of a to-be-closed component obtaining unit 902 provided in embodiment two of the present application is shown, and for convenience of description, only the portions relevant to the present application are shown.
In some optional implementations of the second embodiment of the present application, as shown in fig. 9, the to-be-closed component obtaining unit 902 includes: a position acquisition subunit 1001 and a to-be-closed component output subunit 1002. Wherein:
the system comprises an interception position obtaining subunit, a storage unit and a control unit, wherein the interception position obtaining subunit is used for taking a current non-starting assembly as an interception position if the utilization rate of the current non-starting assembly calculated in an accumulated mode exceeds the reduction utilization rate of the virtual machine;
and the to-be-closed component output subunit is used for taking all the non-starting components before the position as the to-be-closed components in the ascending component list.
In this embodiment, the cut-to location is the first component that has a utilization that is greater than the component that has a reduced utilization of the virtual machine.
Specifically, if the cumulatively calculated utilization of the current non-enabled component exceeds the virtual machine reduced utilization, which may be understood as the first component found by the LUFCS does not meet the expected reduced utilization, the LUFCS in this embodiment will find a position p in the selectable components, i.e., the sum of all combined utilization parameters before the position p-1 is less than urVMi,jAnd the component at position p is the first component with utilization rate greater than u, i.e. the truncated position; furthermore, to select u with a utilization factor parameter only closest to the otherrVMi,jIn this embodiment, in the ascending component list, all the non-activated components up to the position are used as the components to be closed, and specifically, all the components in the sub-list selected in the previous step may be written into the ascending component list ocl by using the LUFCSi,j,tAnd writes the connection relationship of these components into the data set StPerforming the following steps; then, other interconnected components are found by the LUFCS and written into the ascending component list ocli,j,tPerforming the following steps; further, it may also be possible to calculate the discount total d (VMi, j) for those components that have been turned off.
In summary, the present application provides a load control device, including: the server state information acquisition module is used for acquiring server state information, and the server state information at least comprises server starting number and server overload number; the overload ratio calculation module is used for calculating overload ratio data based on the server starting number and the server overload number; the adjusting parameter calculating module is used for calculating and controlling adjusting parameters based on the overload ratio data; the server utilization reduction calculation module is used for calculating the server utilization reduction of the overload server based on the control and regulation parameters and the server energy consumption model; the virtual machine utilization reduction calculation module is used for calculating the virtual machine utilization reduction of the virtual machine in the overload server based on the server utilization reduction; a screening operation module for screening the overload server based on the application component selection strategy and the virtual machine utilization rate reductionObtaining a component to be closed; and the component closing module is used for closing the components to be closed of the overload server. Acquiring control and regulation parameters based on the starting number of the servers and the overload number of the servers in the acquired server state information, wherein the relation between the number of the overloaded servers and the number of the whole servers can be intuitively reflected through the control and regulation parameters; further, the utilization rate of the server is calculated by controlling the adjusting parameters and the server energy consumption model; then, by including the server hiVirtual machine VM ofjAn empty non-open component in (1) creates a list, i.e. the non-open component list dcli,j,tInitializing, and calculating the virtual machine reduced utilization rate which can be used for representing the size of the utilization rate which is expected to be reduced by the virtual machine according to the utilization rate of the virtual machine and the expected reduced utilization rate based on the utilization rate model of the virtual machine; further, in order to achieve a better utilization rate reduction effect, a component with the lowest utilization rate is selected from the components by adopting a component priority with the lowest selection utilization rate (LUFCS) algorithm, so that the component to be closed with the lower utilization rate and needing to be closed is accurately obtained, other components related to the component are found, and finally the obtained components are closed; finally, when the server does not exceed the energy consumption threshold, the optional components that have been set to off may be turned on based on the load control method of the present application, and then a conventional virtual machine migration algorithm may be applied in optimizing the location allocation of the virtual machine. The opening or closing state of the application component can be selectively and dynamically adjusted, the energy consumption of the cloud server is reduced, and the utilization rate of the server is improved.
In order to solve the technical problem, an embodiment of the present application further provides a computer device. Referring to fig. 11, fig. 11 is a block diagram of a basic structure of a computer device according to the present embodiment.
The computer device 11 includes a memory 111, a processor 112, and a network interface 113 communicatively connected to each other via a system bus. It is noted that only a computer device 11 having components 111 and 113 is shown, but it is understood that not all of the illustrated components are required and that more or fewer components may alternatively be implemented. As will be understood by those skilled in the art, the computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The computer equipment can carry out man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel or voice control equipment and the like.
The memory 111 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the storage 111 may be an internal storage unit of the computer device 11, such as a hard disk or a memory of the computer device 11. In other embodiments, the memory 111 may also be an external storage device of the computer device 11, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the computer device 11. Of course, the memory 111 may also include both internal and external storage devices of the computer device 11. In this embodiment, the memory 111 is generally used for storing an operating system installed in the computer device 11 and various types of application software, such as program codes of a load control method. Further, the memory 111 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 112 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 112 is typically used to control the overall operation of the computer device 11. In this embodiment, the processor 112 is configured to execute the program code stored in the memory 111 or process data, for example, execute the program code of the load control method.
The network interface 113 may include a wireless network interface or a wired network interface, and the network interface 113 is generally used to establish a communication connection between the computer device 11 and other electronic devices.
The present application further provides another embodiment, which is to provide a computer-readable storage medium storing a load control program, which is executable by at least one processor to cause the at least one processor to perform the steps of the load control method as described above.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
It is to be understood that the above-described embodiments are merely illustrative of some, but not restrictive, of the broad invention, and that the appended drawings illustrate preferred embodiments of the invention and do not limit the scope of the invention. This application is capable of embodiments in many different forms and is provided for the purpose of enabling a thorough understanding of the disclosure of the application. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to one skilled in the art that the present application may be practiced without modification or with equivalents of some of the features described in the foregoing embodiments. All equivalent structures made by using the contents of the specification and the drawings of the present application are directly or indirectly applied to other related technical fields and are within the protection scope of the present application.
Claims (10)
1. A load control method, comprising the steps of:
collecting server state information, wherein the server state information at least comprises server starting number and server overload number;
calculating overload duty ratio data based on the number of server activations and the number of server overloads;
calculating a control adjustment parameter based on the overload proportion data;
calculating the server reduction utilization rate of the overload server based on the control and regulation parameters and the server energy consumption model;
calculating a virtual machine under-utilization of a virtual machine in the overloaded server based on the server under-utilization;
screening the overload server based on an application component selection strategy and the virtual machine reduced utilization rate to obtain a component to be closed;
shutting down the to-be-shut-down component of the overloaded server.
2. The load control method according to claim 1, wherein the step of calculating the virtual machine under-utilization rate of the virtual machine in the overloaded server based on the server under-utilization rate specifically includes:
creating a list of non-open components in a virtual machine in the overloaded server;
calculating the virtual machine utilization rate of the virtual machine based on a virtual machine utilization rate model;
acquiring the utilization rate of the virtual machine and the synchronization ratio of the reduced utilization rate of the server;
and calculating a synchronization difference value of the utilization rate of the virtual machine based on the synchronization ratio, and taking the synchronization difference value as the reduced utilization rate of the virtual machine.
3. The load control method according to claim 1, wherein the screening operation is performed based on a minimum utilization component prioritization algorithm, and the step of performing the screening operation on the overload server based on the application component selection policy and the virtual machine utilization variable to obtain the component to be closed specifically includes:
acquiring the component utilization rate of the non-starting component of the virtual machine, and performing ascending arrangement to obtain an ascending component list;
and calculating the non-starting assembly meeting the reduction utilization rate of the virtual machine based on the sequence accumulation of the ascending assembly list to obtain the assembly to be closed.
4. The load control method according to claim 3, wherein the step of calculating the non-startup component that satisfies the reduced utilization rate of the virtual machine based on the order of the ascending component list to obtain the component to be shut down specifically includes:
if the utilization rate of the current non-starting assembly calculated in an accumulated mode exceeds the reduced utilization rate of the virtual machine, taking the current non-starting assembly as a cut-off position;
and in the ascending component list, all non-starting components before the position are taken as the components to be closed.
5. A load control device, comprising:
the system comprises a state information acquisition module, a state information acquisition module and a state information acquisition module, wherein the state information acquisition module is used for acquiring server state information, and the server state information at least comprises server starting number and server overload number;
the overload ratio calculation module is used for calculating overload ratio data based on the server starting number and the server overload number;
the adjusting parameter calculating module is used for calculating and controlling adjusting parameters based on the overload ratio data;
the server utilization reduction calculation module is used for calculating the server utilization reduction of the overload server based on the control and regulation parameters and the server energy consumption model;
a virtual machine reduced utilization calculation module, configured to calculate a virtual machine reduced utilization of a virtual machine in the overloaded server based on the server reduced utilization;
the screening operation module is used for screening the overload server based on an application component selection strategy and the virtual machine reduced utilization rate to obtain a component to be closed;
and the component closing module is used for closing the components to be closed of the overload server.
6. The load control device according to claim 5, wherein the virtual machine under-utilization calculation module comprises:
the component list creating unit is used for creating a non-opening component list in a virtual machine in the overload server;
a virtual machine utilization calculation unit for calculating a virtual machine utilization of the virtual machine based on a virtual machine utilization model;
a synchronization ratio obtaining unit, configured to obtain a synchronization ratio of the utilization rate of the virtual machine and the reduced utilization rate of the server;
and the synchronization difference value calculating unit is used for calculating the synchronization difference value of the utilization rate of the virtual machine based on the synchronization ratio value and taking the synchronization difference value as the reduced utilization rate of the virtual machine.
7. The load control device of claim 5, wherein the screening operation module comprises:
the utilization rate sorting unit is used for acquiring the component utilization rate of the non-starting component of the virtual machine, and performing ascending sorting to obtain an ascending component list;
and the to-be-closed component obtaining unit is used for accumulatively calculating the non-starting component meeting the reduction utilization rate of the virtual machine based on the sequence of the ascending component list to obtain the to-be-closed component.
8. The load control device according to claim 7, wherein the to-be-closed component acquiring unit comprises:
an intercept position obtaining subunit, configured to take the current non-starting component as an intercept position if the accumulatively calculated utilization rate of the current non-starting component exceeds the reduced utilization rate of the virtual machine;
and the to-be-closed component output subunit is used for taking all the non-starting components before the cut-to-position as the to-be-closed components in the ascending component list.
9. A computer arrangement, characterized in that the computer arrangement comprises a memory in which a computer program is stored and a processor which, when executing the computer program, carries out the steps of the load control method according to any one of claims 1 to 4.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the load control method according to any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011286212.2A CN112379970A (en) | 2020-11-17 | 2020-11-17 | Load control method and device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011286212.2A CN112379970A (en) | 2020-11-17 | 2020-11-17 | Load control method and device, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112379970A true CN112379970A (en) | 2021-02-19 |
Family
ID=74585757
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011286212.2A Pending CN112379970A (en) | 2020-11-17 | 2020-11-17 | Load control method and device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112379970A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116032672A (en) * | 2023-01-07 | 2023-04-28 | 东莞恒泰数字技术有限公司 | Dynamic low-energy-consumption control method and device based on intelligent router |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150039764A1 (en) * | 2013-07-31 | 2015-02-05 | Anton Beloglazov | System, Method and Computer Program Product for Energy-Efficient and Service Level Agreement (SLA)-Based Management of Data Centers for Cloud Computing |
CN109213595A (en) * | 2017-07-07 | 2019-01-15 | 中兴通讯股份有限公司 | Load equilibration scheduling method, device and computer readable storage medium |
-
2020
- 2020-11-17 CN CN202011286212.2A patent/CN112379970A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150039764A1 (en) * | 2013-07-31 | 2015-02-05 | Anton Beloglazov | System, Method and Computer Program Product for Energy-Efficient and Service Level Agreement (SLA)-Based Management of Data Centers for Cloud Computing |
CN109213595A (en) * | 2017-07-07 | 2019-01-15 | 中兴通讯股份有限公司 | Load equilibration scheduling method, device and computer readable storage medium |
Non-Patent Citations (1)
Title |
---|
闫成雨;李志华;喻新荣;: "基于自适应过载阈值选择的虚拟机动态整合方法", 计算机应用, no. 10, 10 October 2016 (2016-10-10) * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116032672A (en) * | 2023-01-07 | 2023-04-28 | 东莞恒泰数字技术有限公司 | Dynamic low-energy-consumption control method and device based on intelligent router |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Xu et al. | A balanced virtual machine scheduling method for energy-performance trade-offs in cyber-physical cloud systems | |
Yadav et al. | Managing overloaded hosts for energy-efficiency in cloud data centers | |
Mazzucco et al. | Maximizing cloud providers' revenues via energy aware allocation policies | |
CN104007806B (en) | Control method, device and the equipment of a kind of cpu frequency in Android system | |
Arshad et al. | Utilizing power consumption and SLA violations using dynamic VM consolidation in cloud data centers | |
AU2007213901B2 (en) | Application software initiated speedup | |
US8635625B2 (en) | Power-aware workload allocation in performance-managed computing environments | |
US20160018877A1 (en) | Reducing power consumption in a server cluster | |
CN110545246A (en) | Token bucket-based current limiting method and device | |
Wen et al. | Energy and cost aware scheduling with batch processing for instance-intensive IoT workflows in clouds | |
EP2721461A2 (en) | Power and load management based on contextual information | |
CN113672383A (en) | Cloud computing resource scheduling method, system, terminal and storage medium | |
CN106125888B (en) | The efficient power-economizing method of the utilization of resources in cloud data center based on virtual machine (vm) migration | |
US9395785B2 (en) | Method and device for controlling terminal and terminal thereof | |
US8140873B2 (en) | User imposed power constraints on web server based on user preferences | |
Jiang et al. | Adaptive thresholds determination for saving cloud energy using three-way decisions | |
CN101819459B (en) | Heterogeneous object memory system-based power consumption control method | |
Zhang et al. | Minimizing energy consumption scheduling algorithm of workflows with cost budget constraint on heterogeneous cloud computing systems | |
Chen et al. | An adaption scheduling based on dynamic weighted random forests for load demand forecasting | |
Li et al. | CSL-driven and energy-efficient resource scheduling in cloud data center | |
CN112379970A (en) | Load control method and device, computer equipment and storage medium | |
CN114490089A (en) | Cloud computing resource automatic adjusting method and device, computer equipment and storage medium | |
WO2022104500A9 (en) | Load control method and apparatus, computer device, and storage medium | |
CN107197013B (en) | Energy-saving system for enhancing cloud computing environment | |
CN113204429A (en) | Resource scheduling method and system of data center, scheduling equipment and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |