Energy consumption control method and device, server and electronic equipment
By setting a variety of energy consumption control modes and parameters on the server's BIOS interface, the complex problem of server energy consumption management in the existing technology is solved, and convenient energy consumption management and performance protection is achieved.
Patent Information
- Application Number
- CN202510160091.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-03-14
AI Technical Summary
The prior art has complex processes in server energy consumption management, which are inconvenient to operate, and cannot effectively control and optimize CPU energy consumption while ensuring server performance.
The management of CPU energy consumption is achieved by setting a variety of energy consumption control modes and their parameter values on the Basic Input and Output System (BIOS) interface and receiving and responding to preset operations.
It simplifies the energy consumption management process and achieves convenient operation. It can effectively reduce CPU energy consumption while ensuring server performance, extend the service life of the server, and reduce the operating costs of the data center.
Smart Images

Figure CN119621490A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of energy consumption control of servers, and more specifically, to an energy consumption control method, device, server, computer-readable storage medium, electronic device, and computer program product. Background Art
[0002] In traditional server energy consumption control methods, BIOS (Basic Input Output System, BIOS for short) settings or IPMI (Intelligent Platform Management Interface, IPMI for short) commands are usually used to directly operate the ME (Management Engine) registers. Although it can adjust the operating status of the CPU, it has limitations in practical applications. These methods often require restarting the server to take effect, or bring inconvenience when updating the firmware, and cannot effectively control and optimize the CPU energy consumption while ensuring the overall performance of the server. Given that the CPU is the main contributor to server energy consumption, accounting for about 50% of the total machine energy consumption, how to manage the CPU energy consumption and reduce energy consumption while ensuring server performance has become the key to optimizing server energy efficiency, extending equipment life, and reducing data center operating costs. Summary of the invention
[0003] The embodiments of the present application provide an energy consumption control method, device, server, computer-readable storage medium, electronic device and computer program product to at least solve the problem in the related art that the energy consumption management implementation process of the server is complicated and inconvenient to operate.
[0004] According to one embodiment of the present application, there is provided an energy consumption control method, comprising: receiving and responding to a preset operation acting on an interface of a basic input-output system, calling up energy consumption control parameters corresponding to a target energy consumption control mode, wherein the energy consumption control parameters include at least a preset energy consumption value; determining an energy consumption control value according to the preset energy consumption value and a maximum energy consumption value corresponding to the target energy consumption control mode, and controlling the operation of a central control unit at least according to the energy consumption control value, wherein the maximum energy consumption value is a maximum limit on the energy consumption of the central control unit.
[0005] In an exemplary embodiment, an energy consumption control value is determined based on the preset energy consumption value and the maximum energy consumption value corresponding to the target energy consumption control mode, including: when the target energy consumption control mode is one, a first energy consumption control value is determined based on the preset energy consumption value and the maximum energy consumption value corresponding to the target energy consumption control mode; when there are multiple target energy consumption control modes, a second energy consumption control value is determined based on the preset energy consumption values and the maximum energy consumption values corresponding to the multiple target energy consumption control modes.
[0006] In an exemplary embodiment, when the target energy consumption control mode is one, a first energy consumption control value is determined based on the preset energy consumption value and the maximum energy consumption value corresponding to the target energy consumption control mode, including: when the preset energy consumption value is less than the maximum energy consumption value, the preset energy consumption value is determined as the first energy consumption control value; when the preset energy consumption value is greater than or equal to the maximum energy consumption value, the maximum energy consumption value is determined as the first energy consumption control value.
[0007] In an exemplary embodiment, the target energy consumption control mode includes a first energy consumption control mode and a second energy consumption control mode, and the second energy consumption control value is determined according to the preset energy consumption values and the maximum energy consumption values corresponding to the multiple target energy consumption control modes, including: when the first preset energy consumption value and the second preset energy consumption value are both smaller than the maximum energy consumption value, comparing the first preset energy consumption value and the second preset energy consumption value, wherein the first energy consumption control mode has a first energy consumption control parameter, which at least includes the first preset energy consumption value, and the second energy consumption control mode has a second energy consumption control parameter, which at least includes the second preset energy consumption value; when the first preset energy consumption value is less than or equal to the second preset energy consumption value, both the first preset energy consumption value and the second preset energy consumption value are determined as the second energy consumption control value; when the first preset energy consumption value is greater than the second preset energy consumption value, the first preset energy consumption value is determined as the second energy consumption control value.
[0008] In an exemplary embodiment, the target energy consumption control mode includes a first energy consumption control mode and a second energy consumption control mode, and the second energy consumption control value is determined according to the preset energy consumption values and the maximum energy consumption values corresponding to the multiple target energy consumption control modes, and also includes: when the first preset energy consumption value is greater than or equal to the maximum energy consumption value, and / or when the second preset energy consumption value is greater than or equal to the maximum energy consumption value, the maximum energy consumption value is determined as the second energy consumption control value, wherein the first energy consumption control mode has a first energy consumption control parameter, and the first energy consumption control parameter includes at least the first preset energy consumption value, and the second energy consumption control mode has a second energy consumption control parameter, and the second energy consumption control parameter includes at least the second preset energy consumption value.
[0009] In an exemplary embodiment, the energy consumption control parameters also include a preset energy consumption time. After determining the energy consumption control value according to the preset energy consumption value and the maximum energy consumption value corresponding to the target energy consumption control mode, the method also includes: obtaining the maximum energy consumption time, wherein the maximum energy consumption time is the maximum limit of the energy consumption time of the central control unit; comparing the preset energy consumption time and the maximum energy consumption time, and when the preset energy consumption time is less than the maximum energy consumption time, determining the preset energy consumption time as the energy consumption control time; and when the preset energy consumption time is greater than or equal to the maximum energy consumption time, determining the maximum energy consumption time as the energy consumption control time.
[0010] In an exemplary embodiment, the central control unit includes a first central control unit and a second central control unit, and determining the first preset energy consumption value and the second preset energy consumption value as the second energy consumption control value includes: determining the first preset energy consumption value as the second energy consumption control value of the first central control unit; determining the second preset energy consumption value as the second energy consumption control value of the second central control unit; determining the first preset energy consumption value as the second energy consumption control value includes: determining the first preset energy consumption value as the second energy consumption control value of the first central control unit and the second central control unit; determining the maximum energy consumption value as the second energy consumption control value includes: determining the maximum energy consumption value as the second energy consumption control value of the first central control unit and the second central control unit.
[0011] In an exemplary embodiment, the target energy consumption control mode includes a first energy consumption control mode and a second energy consumption control mode, and a first control and a second control are provided on the interface of the basic input and output system, the first control corresponds to the first energy consumption control mode, and the second control corresponds to the second energy consumption control mode, and receiving and responding to a preset operation on the interface of the basic input and output system, and calling energy consumption control parameters corresponding to the target energy consumption control mode, including any one of the following: receiving and responding to a preset operation on the first control or the second control, and calling energy consumption control parameters corresponding to the first energy consumption control mode or energy consumption control parameters corresponding to the second energy consumption control mode; receiving and responding to a preset operation on the first control and the second control, and calling energy consumption control parameters corresponding to the first energy consumption control mode and energy consumption control parameters corresponding to the second energy consumption control mode.
[0012] In an exemplary embodiment, receiving and responding to a preset operation acting on an interface of a basic input / output system further includes: determining a startup phase of the basic input / output system when the server is powered on or restarted; and receiving and responding to the preset operation acting on the interface of the basic input / output system when the startup phase of the basic input / output system is an initialization phase.
[0013] In an exemplary embodiment, retrieving the energy consumption control parameter corresponding to the target energy consumption control mode includes: retrieving the energy consumption control parameter from the interface of the basic input and output system through the target function.
[0014] In an exemplary embodiment, after determining the energy consumption control value according to the preset energy consumption value and the maximum energy consumption value corresponding to the target energy consumption control mode, the method further includes: writing the energy consumption control value into a register of the central control unit.
[0015] In an exemplary embodiment, the method further includes: in the case where the preset operation acting on the interface of the basic input and output system is not received, controlling the operation of multiple central control units according to the maximum energy consumption value and the maximum energy consumption time, wherein the maximum energy consumption time is the maximum limit of the energy consumption time of the central control units.
[0016] In an exemplary embodiment, when the preset operation acting on the interface of the basic input and output system is not received, the method further includes: turning off the preset operation options of the plurality of energy consumption control modes; and controlling the server to boot into an operating system.
[0017] In an exemplary embodiment, controlling the operation of a central control unit at least according to the energy consumption control value includes: controlling the operation of a plurality of the central control units according to the energy consumption control value and the energy consumption control time.
[0018] In an exemplary embodiment, after controlling the server to boot into the operating system, the method also includes: obtaining the running time of the central control unit; when the running time is less than the maximum energy consumption time, controlling the central control unit to run according to the actual energy consumption value; when the running time is greater than or equal to the maximum energy consumption time, controlling the central control unit to run according to the energy consumption control value and energy consumption control time until the server is shut down.
[0019] According to another embodiment of the present application, an energy consumption control device is provided, including: a calling unit, used to receive and respond to a preset operation acting on an interface of a basic input / output system, and call energy consumption control parameters corresponding to a target energy consumption control mode, wherein the energy consumption control parameters include at least a preset energy consumption value; a first control unit, used to determine an energy consumption control value based on the preset energy consumption value and the maximum energy consumption value corresponding to the target energy consumption control mode, and control the operation of a central control unit at least based on the energy consumption control value, wherein the maximum energy consumption value is the maximum limit of the energy consumption of the central control unit.
[0020] According to another embodiment of the present application, a server is also provided, including: a basic input and output system, used to display multiple controls, one of the controls represents an identifier of an energy consumption control mode, each of the energy consumption control modes has energy consumption control parameters, and the energy consumption control parameters include at least preset energy consumption values; a central control unit, at least including a register, and the register is used to store the energy consumption control parameters; a power supply unit, used to supply power to each component in the server; a baseboard management controller, including one or more programs, which, when executed, implement any of the above-mentioned energy consumption control methods for the server.
[0021] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0022] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0023] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0024] Through the present application, by receiving and responding to the preset operation acting on the interface of the basic input and output system, the energy consumption control parameters corresponding to the effective target energy consumption control mode are retrieved, and then the second energy consumption control value is determined according to the size relationship between the preset energy consumption value and the maximum energy consumption value of all effective modes. Compared with the related art, which needs to be operated through a specific management interface and needs to update the firmware, the present application sets a variety of energy consumption control modes and their parameter values on the interface of the basic input and output system, and determines the energy consumption control mode and the corresponding parameters by receiving and responding to the preset operation, which is simpler and easier to operate, and manages energy consumption through a variety of energy consumption control modes, while achieving energy saving, increasing the service life of the server, and effectively protecting the energy consumption limit value of the server. Therefore, the problem that the energy consumption management implementation process of the server in the related art is complicated and inconvenient to operate can be solved, and the effect of convenient operation and effective reduction of server energy consumption can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a hardware structure block diagram of a server device of an energy consumption control method according to an embodiment of the present application;
[0026] Figure 2 is a flow chart of an energy consumption control method according to an embodiment of the present application;
[0027] Figure 3 is a schematic diagram of a BIOS setting interface according to an embodiment of the present application;
[0028] Figure 4 is a flowchart of a specific energy consumption control method according to an embodiment of the present application;
[0029] Figure 5 is a flowchart of an execution of a specific energy consumption control method according to an embodiment of the present application;
[0030] Figure 6 is an execution flow chart of another specific energy consumption control method according to an embodiment of the present application;
[0031] Figure 7 is a structural block diagram of an energy consumption control device according to an embodiment of the present application;
[0032] Figure 8 It is a structural block diagram of a server according to an embodiment of the present application.
[0033] The above drawings include the following reference numerals:
[0034] 102, processor; 104, memory; 106, transmission device; 108, input and output devices. DETAILED DESCRIPTION
[0035] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0036] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0037] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 1 is a hardware structure block diagram of a server device of an energy consumption control method according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0038] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the energy consumption control method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0039] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0040] In this embodiment, a method for controlling energy consumption is provided. Figure 2 is a flow chart of the energy consumption control method according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:
[0041] Step S102, receiving and responding to a preset operation on the interface of the basic input and output system, calling energy consumption control parameters corresponding to the target energy consumption control mode, wherein the energy consumption control parameters at least include a preset energy consumption value;
[0042] Specifically, a plurality of energy consumption control modes are set on the BIOS (Basic Input Output System, BIOS for short), and each energy consumption control mode can correspond to a control. The preset operation acts on the control, and the effective energy consumption control mode is the target energy consumption control mode, that is, the energy consumption control parameters corresponding to the mode are effective. Therefore, the energy consumption control parameters corresponding to the above-mentioned effective target energy consumption control mode are retrieved, and the energy consumption control parameters are stored in the storage location of the BIOS. The central control unit can be a CPU (Central Processing Unit, CPU for short), and there are generally multiple CPUs in the server. Since the energy consumption management of the CPU occupies about 50% of the entire server system, the energy consumption of a CPU is about 400w. On the premise of maintaining the CPU performance, reducing the power consumption of the CPU will greatly improve the energy consumption ratio of the server. Therefore, this application will focus on energy consumption control of the CPU in the server. Multiple energy consumption control modes are preset, and each energy consumption control mode is distinguished by the size of the preset energy consumption value. For example, the preset energy consumption value of the first preset energy consumption mode is less than the preset energy consumption value of the second preset energy consumption mode, and the preset energy consumption value of the second preset energy consumption mode is less than the preset energy consumption value of the third preset energy consumption mode, forming a stepped energy consumption management mode. In actual application, other parameters can also be preset, such as preset energy consumption time, etc. There is no requirement for the size of the preset energy consumption time between each mode. The preset energy consumption value is the energy consumption value of the CPU set in advance during operation, so that the CPU runs according to the preset energy consumption value under certain conditions. In order to save energy consumption during the operation of the server and keep the performance of the server from decreasing, the preset energy consumption value needs to be smaller. Therefore, the maximum energy consumption value of the CPU is also obtained, that is, the maximum energy consumption value of the CPU during actual operation, to ensure that the energy consumption value of the CPU during actual operation does not exceed the above maximum energy consumption value.
[0043] Step S104, determine the energy consumption control value according to the preset energy consumption value and the maximum energy consumption value corresponding to the target energy consumption control mode, and control the operation of the central control unit at least according to the energy consumption control value, wherein the maximum energy consumption value is the maximum limit of the energy consumption of the central control unit.
[0044] Specifically, it is necessary to compare the preset energy consumption value corresponding to the effective energy consumption control mode with the maximum energy consumption value to ensure that the energy consumption control value cannot exceed the maximum energy consumption value, and finally determine the final first energy consumption control value based on the comparison result to control the operating state of the CPU.
[0045] Through the above steps, the energy consumption control parameters corresponding to the effective target energy consumption control mode are retrieved by receiving and responding to the preset operation acting on the interface of the basic input and output system, and then the second energy consumption control value is determined according to the size relationship between the preset energy consumption value and the maximum energy consumption value of all effective modes. Compared with the related art, which needs to be operated through a specific management interface and needs to update the firmware, the present application sets a variety of energy consumption control modes and their parameter values on the interface of the basic input and output system, and determines the energy consumption control mode and the corresponding parameters by receiving and responding to the preset operation, which is simpler and easier to operate, and manages energy consumption through a variety of energy consumption control modes, while achieving energy saving, increasing the service life of the server, and effectively protecting the energy consumption limit value of the server. Therefore, the problem that the energy consumption management implementation process of the server is complicated and inconvenient to operate in the related art can be solved, and the effect of convenient operation and effective reduction of server energy consumption can be achieved.
[0046] The execution subject of the above steps may be a server, specifically a BMC (Baseboard Management Controller, BMC for short) in the server, but is not limited thereto.
[0047] In some optional implementations, the above step S104 can be implemented by the following steps: Step S1041: When the above target energy consumption control mode is one, determine the first energy consumption control value according to the above preset energy consumption value corresponding to the above target energy consumption control mode and the size of the above maximum energy consumption value; Step S1042: When the above target energy consumption control mode is multiple, determine the second energy consumption control value according to the above preset energy consumption value corresponding to the multiple target energy consumption control modes and the size of the above maximum energy consumption value. In different situations, this method determines the first energy consumption control value or the second energy consumption control value respectively by the relationship between the preset energy consumption value corresponding to the effective energy consumption control mode and the maximum energy consumption value of the CPU, so that reasonable control of CPU energy consumption can be achieved in different situations, which not only protects the hardware, but also optimizes resource utilization, and effectively balances the energy saving and performance requirements of the server.
[0048] Specifically, when only one energy consumption control mode is in effect, it is necessary to compare the preset energy consumption value corresponding to the effective energy consumption control mode with the maximum energy consumption value, and finally determine the final first energy consumption control value based on the comparison result. In actual application, when multiple energy consumption control modes are in effect, it is necessary not only to determine the final second energy consumption control value based on the preset energy consumption value and the maximum energy consumption value corresponding to the effective energy consumption control mode, but also to determine the final second energy consumption control value based on the size between multiple effective energy consumption control modes, to ensure that the energy consumption of the CPU is maintained within the optimal control range while satisfying all mode constraints. Implementing multi-level energy consumption management of multiple central control units of a server can maintain the optimal balance of the CPU operating status under complex and changeable operating conditions, improve the energy efficiency ratio of the server, ensure the stability and reliability of the system, and reduce operation and maintenance costs and energy consumption.
[0049] In some optional implementations, step S1041 can be implemented by the following steps: Step S1043: when the preset energy consumption value is less than the maximum energy consumption value, the preset energy consumption value is determined as the first energy consumption control value; Step S1044: when the preset energy consumption value is greater than or equal to the maximum energy consumption value, the maximum energy consumption value is determined as the first energy consumption control value. The method determines the first energy consumption control value through the above steps, so that the energy consumption value of the central control unit does not exceed the maximum energy consumption value, which not only meets the energy saving requirements, but also makes full use of the performance potential of the CPU, while avoiding excessive use of hardware and extending the service life of the hardware.
[0050] In the specific implementation process, when the preset energy consumption value is less than the maximum energy consumption value, the preset energy consumption value is determined as the first energy consumption control value. That is to say, the CPU will be allowed to operate within a capacity range lower than its maximum energy consumption; when the preset energy consumption value is greater than or equal to the maximum energy consumption value, the maximum energy consumption value is determined as the first energy consumption control value. This shows that when a user or system attempts to set an energy consumption value that exceeds the actual capacity of the CPU, it will be automatically limited to the maximum safe energy consumption level of the CPU, effectively protecting the CPU from the risk of overload and overheating, and ensuring the stable operation and data security of the server. Therefore, the above steps make intelligent decisions by comparing the preset energy consumption value with the maximum energy consumption value and select the most appropriate energy consumption control value. When the preset value is reasonable, the system will operate according to the preset value to achieve the energy saving goal; when the preset value is too high, the system will automatically adjust to the maximum safe energy consumption level to ensure a balance between performance and safety. This automatic adjustment capability reduces the need for manual intervention and improves the automatic management level and resource utilization efficiency of the server. In actual operation, the workload of the server will change continuously. By dynamically adjusting the first energy consumption control value, the system can effectively reduce energy consumption without affecting server performance.
[0051] In order to achieve energy consumption management when multiple energy consumption control modes are in effect, in some optional implementations, the above-mentioned target energy consumption control mode includes a first energy consumption control mode and a second energy consumption control mode, and the second energy consumption control value is determined according to the above-mentioned preset energy consumption values corresponding to the multiple above-mentioned target energy consumption control modes and the above-mentioned maximum energy consumption values. The above-mentioned step S1042 can be implemented by the following steps: Step S1045: When the first preset energy consumption value and the second preset energy consumption value are both smaller than the above-mentioned maximum energy consumption value, compare the sizes of the first preset energy consumption value and the second preset energy consumption value, wherein the above-mentioned first energy consumption control mode The formula has a first energy consumption control parameter, and the first energy consumption control parameter at least includes the first preset energy consumption value, and the second energy consumption control mode has a second energy consumption control parameter, and the second energy consumption control parameter at least includes the second preset energy consumption value; step S1046: when the first preset energy consumption value is less than or equal to the second preset energy consumption value, the first preset energy consumption value and the second preset energy consumption value are both determined as the second energy consumption control value; step S1047: when the first preset energy consumption value is greater than the second preset energy consumption value, the first preset energy consumption value is determined as the second energy consumption control value. Through the above steps, when multiple energy consumption control modes are effective, the method first determines whether the "step-by-step" energy consumption management conditions are met, and then determines the second energy consumption control value, ensuring that under different operating conditions and business requirements, both resources can be effectively utilized and energy conservation can be achieved, and hardware security can be protected, so as to achieve the optimal balance between performance and efficiency.
[0052] Specifically, the above steps are mainly divided into two categories: (1) When both preset energy consumption values are less than the maximum energy consumption value, the two preset values are first compared. If the first preset energy consumption value is less than the second preset value, in this case, both preset values are determined as the second energy consumption control value, and step-by-step control is achieved through the two energy consumption control values, so that the first energy consumption control mode mainly achieves the purpose of energy saving, and the second energy consumption control mode maintains a certain balance between performance and energy consumption, maintains sufficient performance margin, and ensures the stable operation of the system. However, when the first preset energy consumption value is greater than or equal to the second preset energy consumption value, and both values are within the maximum energy consumption value range, only the first preset value is determined as the second energy consumption control value. Because this situation does not meet the step-by-step energy consumption control mode, it is sufficient to control only according to the larger preset energy consumption value of the two. This situation achieves maximum efficiency without exceeding the hardware limitation.
[0053] In some optional embodiments, the above-mentioned step S1042 can be implemented by the following steps: Step S1048: When the first preset energy consumption value is greater than or equal to the above-mentioned maximum energy consumption value, and / or when the second preset energy consumption value is greater than or equal to the above-mentioned maximum energy consumption value, the above-mentioned maximum energy consumption value is determined as the above-mentioned second energy consumption control value, wherein the above-mentioned first energy consumption control mode has a first energy consumption control parameter, and the above-mentioned first energy consumption control parameter at least includes the above-mentioned first preset energy consumption value, and the above-mentioned second energy consumption control mode has a second energy consumption control parameter, and the above-mentioned second energy consumption control parameter at least includes the above-mentioned second preset energy consumption value.
[0054] Specifically, when any one or two preset energy consumption values are greater than or equal to the maximum energy consumption value, the maximum energy consumption value will be automatically determined as the second energy consumption control value. This mechanism ensures that the CPU operation does not exceed its physical limit, effectively protects the hardware, avoids the risk of overheating and overload, and ensures the safe and stable operation of the server. At the same time, even under high load or abnormal conditions, the system can maintain basic operating capabilities by using the maximum safe energy consumption value.
[0055] The intelligent comparison and adjustment mechanism in the above steps is not only applicable to a single CPU, but also to a server system with multiple CPUs. This means that the server can optimize the energy consumption control strategy of each CPU according to the overall load and configuration, thereby improving energy efficiency and reducing power consumption overall, which has significant economic and environmental benefits for energy conservation and emission reduction in large-scale data centers.
[0056] In some optional implementations, the energy consumption control parameter further includes a preset energy consumption time, and the maximum control parameter further includes a maximum energy consumption time. After the step S104, the method further includes: step S105: obtaining the maximum energy consumption time, wherein the maximum energy consumption time is the maximum limit of the energy consumption time of the central control unit; step S106: comparing the preset energy consumption time and the maximum energy consumption time, and when the preset energy consumption time is less than the maximum energy consumption time, determining the preset energy consumption time as the energy consumption control time; step S107: when the preset energy consumption time is greater than or equal to the maximum energy consumption time, determining the maximum energy consumption time as the energy consumption control time. This method ensures that the operation of the central processing unit (CPU) is not only controlled in terms of energy consumption value, but also complies with the set limit in terms of time, so as to achieve a more refined energy consumption management effect and further save energy consumption.
[0057] In the specific implementation process, the above steps also introduce two parameters: preset energy consumption time and maximum energy consumption time. The preset energy consumption time is the energy consumption control time threshold set by the user or the system, while the maximum energy consumption time reflects the maximum time limit that the CPU can safely run under a specific energy consumption value. By comparing these two time parameters, the system can more accurately control the CPU's running time in a high energy consumption state, avoiding the damage that may be caused to the hardware by long-term high energy consumption operation. When the preset energy consumption time is less than the maximum energy consumption time, the preset energy consumption time is determined as the energy consumption control time. This means that the CPU will follow the time limit set by the user or the system to ensure that it will not run in a high energy consumption state for more than the preset time, thereby achieving the dual goals of hardware protection and energy saving while meeting business needs. When the preset energy consumption time is greater than or equal to the maximum energy consumption time, the maximum energy consumption time is determined as the energy consumption control time. This means that the system will force the CPU to comply with the hardware's safe running time limit. Even if the user or the system sets a longer running time, the CPU will not be allowed to run beyond the safe range in a high energy consumption state, effectively avoiding the risk of hardware overheating or overload, and ensuring the long-term stable operation of the server. In addition, regardless of whether one or multiple energy consumption control modes are in effect, the setting of the preset energy consumption time follows the above setting steps, that is, there is no need to compare the preset energy consumption time corresponding to the effective energy consumption control mode like determining the preset energy consumption value, but only needs to compare the preset energy consumption time with the maximum energy consumption time to determine it.
[0058] In order to realize the energy consumption management of multiple CPU systems, in some optional implementations, the central control unit includes a first central control unit and a second central control unit, and step S1046 can be realized by the following steps: determining the first preset energy consumption value as the second energy consumption control value of the first central control unit; determining the second preset energy consumption value as the second energy consumption control value of the second central control unit; step S1047 can be realized by the following steps: determining the first preset energy consumption value as the second energy consumption control value of the first central control unit and the second central control unit; step S1048 can be realized by the following steps: determining the maximum energy consumption value as the second energy consumption control value of the first central control unit and the second central control unit. Through the above steps, the method enables each central control unit to be controlled by a group of effective energy consumption control modes, and formulates different energy consumption control strategies for different central control units when multiple modes are effective, so that the overall performance of the server is maintained by the central control unit with a high preset energy consumption value, and the overall energy consumption of the server is saved by the central control unit with a low preset energy consumption value, so as to achieve the purpose of energy saving and consumption reduction while ensuring the overall performance of the server.
[0059] Specifically, when both preset energy consumption values are determined as the second energy consumption control value, a preset energy consumption value is assigned to each central control unit. In actual application, the first preset energy consumption value can also be determined as the second energy consumption control value of the second central control unit; the second preset energy consumption value is determined as the second energy consumption control value of the first central control unit, and it is only necessary to ensure that the first preset energy consumption value is less than the second preset energy consumption value. When the first preset energy consumption value is determined as the second energy consumption control value, the first central control unit and the second central control unit both adopt the first preset energy consumption value; when the maximum energy consumption value is determined as the second energy consumption control value, the first central control unit and the second central control unit both adopt the maximum energy consumption value. The above steps ensure that in a multi-CPU server, the operation of each CPU neither consumes excessive energy nor sacrifices performance due to energy consumption restrictions. This dynamic balance has a significant effect on improving the energy efficiency ratio of the server and extending the service life of the hardware.
[0060] In some specific implementations, the target energy consumption control mode includes a first energy consumption control mode and a second energy consumption control mode, the interface of the basic input and output system is provided with a first control and a second control, the first control corresponds to the first energy consumption control mode, and the second control corresponds to the second energy consumption control mode, and the step S102 includes any one of the following steps: step S1021: receiving and responding to a preset operation on the first control or the second control, calling the energy consumption control parameter corresponding to the first energy consumption control mode or the energy consumption control parameter corresponding to the second energy consumption control mode; step S1022: receiving and responding to a preset operation on the first control and the second control, calling the energy consumption control parameter corresponding to the first energy consumption control mode and the energy consumption control parameter corresponding to the second energy consumption control mode. The method judges and determines under what circumstances only one or more energy consumption control modes are effective, and under what circumstances all modes are ineffective through the above steps. This method provides flexibility and accuracy of energy consumption control, and ensures that the server system can reasonably adjust the energy consumption control strategy according to actual needs and environmental conditions.
[0061] Specifically, when the first energy consumption control mode is effective and the second energy consumption control mode is not effective, the system will only enable the first energy consumption control mode. On the contrary, if the first mode is not effective and the second mode is effective, the system will only enable the second mode. This means that the system can independently enable an energy consumption control mode according to the specific needs of the user to achieve a specific performance and energy consumption balance point, such as giving priority to energy saving or ensuring stable performance. In the case where the first and second energy consumption control modes are effective at the same time, the system will identify and apply these two modes at the same time. If the preset operation of the first and second energy consumption control modes is not received, it means that the first and second energy consumption control modes are not effective, and the system will determine that all energy consumption control modes are not effective. In this state, the server will run under the default maximum energy consumption control strategy, which may focus more on performance rather than energy consumption restrictions, and is suitable for business scenarios that require maximum performance. By judging whether the first and second energy consumption control modes are effective, this technical solution realizes the intelligent identification and dynamic adjustment of the energy consumption control strategy in the server system, provides user-friendly customization options, and also enhances the system's fault prevention capabilities and hardware protection mechanisms, providing strong technical support for efficient operation and energy saving and emission reduction of the server.
[0062] In order to realize intelligent identification of multiple energy consumption control modes and determination of maximum control parameters, the above step S102 can be realized by the following steps: Step S1023: when the server is powered on or restarted, determine the startup phase of the basic input and output system; Step S1024: when the above startup phase of the basic input and output system is the initialization phase, receive and respond to the above preset operation acting on the interface of the above basic input and output system. The method provides operating conditions for receiving and responding to the preset operation through the above steps.
[0063] During the specific implementation process, when the server is powered on or restarted, the startup phase of the BIOS (Basic Input Output System, BIOS for short) is first determined. This phase identification is the starting point of the energy consumption control process, ensuring that the energy consumption control strategy can be executed at the critical time point of BIOS initialization. After confirming that the BIOS is in the initialization phase, the user's preset operation is received, and in response to the above preset operation, the corresponding parameters of multiple energy consumption control modes are read from the BIOS. At the same time, the system obtains the control parameters of the CPU under overclocking, that is, the maximum control parameters, which include but are not limited to the maximum frequency and voltage of the CPU. These parameters are crucial to determining the actual maximum energy consumption level of the CPU, because the maximum control parameters in the overclocking state are often higher than the default settings. Based on the read overclocking control parameters, the system calculates and determines the maximum control parameters of the CPU. This parameter reflects the upper limit of the energy consumption that the CPU can safely operate under the current hardware configuration, and is the benchmark point for setting the energy consumption control mode. After obtaining the maximum control parameters, the system can intelligently decide whether to apply energy consumption control and how to adjust the CPU's operating status based on the effective energy consumption control mode and the actual energy consumption upper limit that the CPU can support, so as to avoid exceeding the maximum control parameters and ensure the stability and security of the hardware.
[0064] In some optional implementations, the above step S102 can also be implemented by the following steps: calling the above energy consumption control parameters from the interface of the basic input and output system through the target function. The method obtains the energy consumption control parameters from the BIOS setting interface through the target function, so that the server system can automatically detect and apply the energy consumption control strategy, reduce the need for manual intervention, and improve the response speed and management efficiency of the system.
[0065] In the specific implementation process, the energy control parameters corresponding to the various energy control modes are displayed on the BIOS interface. Therefore, it is necessary to obtain the preset energy control parameters from the BIOS through the target function. The target function needs to access the BIOS setup interface through a system call. This may also involve parsing the configuration structure, searching for specific configuration items, or reading specific register locations. Obtaining energy control parameters from the BIOS setup interface through the target function enables the server system to automatically detect and apply energy control strategies, reducing the need for manual intervention and improving the system's response speed and management efficiency.
[0066] In order to store the energy consumption control value and control the operation of the central control unit according to the energy consumption control value, after the above step S104, the above method further includes the following steps: writing the above energy consumption control value into the register of the above central control unit. The method writes the above energy consumption control value into a specific register for storage to achieve accurate control of energy consumption.
[0067] Specifically, after determining the first energy consumption control value and the second energy consumption control value, the control is achieved by directly writing into a specific register of the CPU (such as an MSR register), and the position and offset value of the register can be set according to the specific situation. This write operation ensures that the CPU can comply with the set energy consumption limit during operation, thereby achieving effective management of the energy consumption of a single CPU. The write operation requires precise selection of registers in the CPU, which are directly related to the energy consumption management mechanism. For example, for an Intel CPU, it may be necessary to write registers such as MSR_PERF_CTL or MSR_PKG_POWER_LIMIT in the MSR to achieve energy consumption control. By directly writing the first and second energy consumption control values into the registers of the CPU, the technical solution can achieve instant and precise control of CPU energy consumption, whether in a single CPU configuration or in a complex scenario of multiple CPUs or multiple modes. This not only helps to improve the energy efficiency ratio of the server, ensuring that energy consumption is reduced while meeting performance requirements, but also effectively prevents CPU overheating or overload, extends the service life of hardware, and reduces maintenance costs.
[0068] In some optional implementations, the method further includes the following steps: Step S108: in the case where the preset operation acting on the interface of the basic input and output system is not received, the operation of the plurality of central control units is controlled according to the maximum energy consumption value and the maximum energy consumption time, wherein the maximum energy consumption time is the maximum limit of the energy consumption time of the central control unit. In the above case, the method performs energy consumption control according to the maximum control parameter, so that when all energy consumption control modes are not effective, the CPU can be operated according to the maximum control parameter. The technical solution can maximize the computing power of the server without sacrificing performance.
[0069] In the specific implementation process, when the above-mentioned preset operation acting on the above-mentioned target control is not received, that is, when the user or system management policy does not activate any energy consumption control mode, it will operate according to the maximum control parameters of the central control unit (CPU). This strategy ensures that the CPU can exert its maximum performance potential while remaining within the boundaries of hardware safe operation in scenarios without specific energy consumption limit requirements. Maximum control parameter determination: The system first reads and confirms the maximum control parameters of the CPU. These parameters usually include the maximum frequency, maximum voltage, maximum power, etc. of the CPU, which define the upper limit of the performance that the CPU can safely operate when not under energy consumption control. After confirming that all energy consumption control modes are ineffective, the system will adjust its operating strategy to allow the CPU to operate according to the maximum control parameters. This means that the CPU will no longer be subject to any preset energy consumption restrictions and can automatically adjust to the maximum performance state according to system requirements and load conditions.
[0070] In order to make the server run without energy consumption restriction, after the above step S108, the above method further includes the following steps: step S109: closing the preset operation options of the above energy consumption control modes; step S110: controlling the server to start and enter the operating system. Through the above steps, the method closes the preset operation options of the preset energy consumption value and the preset energy consumption time in the above energy consumption control modes, so that the server automatically runs without energy consumption restriction.
[0071] Specifically, in the case where the above-mentioned preset operation acting on the above-mentioned target control is not received, a shutdown instruction is sent to the energy consumption control option in the BIOS, which usually involves modifying a specific configuration item or register setting and setting the effective state flag to "off" or "disabled". The options of the preset energy consumption value and the preset energy consumption time also need to be set to invalid or default values to ensure that they do not affect the operation of the CPU. After executing the shutdown instruction, the system needs to update the energy consumption control option in the BIOS to ensure that all settings reflect the state after the shutdown instruction. After completing all settings to shut down the energy consumption control mode, the server will complete the startup process and enter the operating system. At this time, the CPU operation under the operating system will no longer be restricted by the preset energy consumption control mode in the BIOS, but will run within its maximum control parameter range to provide the highest performance. Although the energy consumption control mode is turned off, the system still needs to monitor the operating status of the CPU, including temperature, voltage, and power, to prevent overheating or overload. When the system is in a state without energy consumption control, it may be necessary to notify the system administrator or user of this state through the system log or user interface so that they can adjust the server's operating mode according to actual needs. Through the above steps, the server can start and enter the operating system without power consumption control, thereby providing maximum performance when necessary.
[0072] In some optional implementations, the above step S104 can be implemented by the following steps: controlling the operation of the above central control units according to the above energy consumption control value and energy consumption control time. The method controls the operation of the central control unit by presetting the control value and energy consumption control time, and achieves the purpose of saving energy consumption by limiting the energy consumption value and energy consumption time.
[0073] During the specific implementation process, the server reads the first energy consumption control value and the first energy consumption control time from the BIOS settings during startup or restart. Similarly, the second energy consumption control value and the second energy consumption control time are read. The second control parameter is usually set to a higher value as a "fuse point" for CPU energy consumption. By controlling the CPU operation based on at least the first and second energy consumption control values and their corresponding times, it is possible to effectively cope with the energy consumption management challenges of the server under different load and environmental conditions, and provide strong support for energy efficiency optimization and hardware protection of the data center. This multi-level control mechanism not only enhances the flexibility of the system, but also ensures that the best energy consumption control effect can be achieved in various scenarios.
[0074] When the server is powered on or restarted, the entire server system begins hardware self-checking and initialization. During the initialization process, the BIOS reads the energy control settings stored therein, including the first energy control value and the second energy control value mentioned above, as well as corresponding control time and other parameters. These settings may have been changed by the user or system administrator before the last shutdown or restart of the server. Based on the read settings, the BIOS configures the basic operating environment of the system, including setting the initial frequency, voltage, and power consumption limit of the CPU, to ensure that the server follows the pre-set energy control strategy at startup. After completing the hardware initialization and configuration loading, the server starts and enters the operating system, and the CPU starts running according to the configuration parameters.
[0075] In some optional implementations, after controlling the server to boot into the operating system, the method further includes step S112: obtaining the running time of the central control unit; step S113: when the running time is less than the maximum energy consumption time, controlling the central control unit to run according to the actual energy consumption value; step S114: when the running time is greater than or equal to the maximum energy consumption time, controlling the central control unit to run according to the energy consumption control value and the energy consumption control time until the server is shut down. This method can intelligently adjust the energy consumption of the server by combining the dynamic control strategy of the running time and the energy consumption threshold, ensuring that while meeting business needs, hardware resources are effectively managed to extend the service life of the server and CPU.
[0076] Specifically, after the server is successfully started and enters the operating system, the system begins to implement a dynamic energy consumption control strategy based on the running time and energy consumption threshold. This strategy aims to balance server performance and energy consumption, ensuring that the power consumption of the CPU is effectively managed while meeting business needs. The running time of each CPU can be obtained periodically. When the running time is less than the set maximum energy consumption time, the CPU will run according to the actual energy consumption value, that is, it will not be restricted by the first or second energy consumption control value. This allows the CPU to run at the actual required power consumption level in the initial startup or low-load scenario to maximize performance and response speed. Once the CPU running time reaches or exceeds the maximum energy consumption time, the system will automatically switch to the first or second energy consumption control mode and run according to the preset first energy consumption control value and time, or the second control value and time. This switch ensures that the server can automatically adjust the power consumption of the CPU after reaching a certain running time to prevent excessive energy consumption and potential overheating risks. If the running time triggers the first control mode, the system will ensure that the power consumption of the CPU does not exceed the first energy consumption control value, and this state will last for at least the first energy consumption control time. For example, the system may control the CPU energy consumption by reducing the CPU frequency, reducing the number of active cores, or limiting the maximum power consumption. If the runtime triggers the second control mode, the system will ensure that the CPU power consumption does not exceed the second energy consumption control value and lasts for at least the second energy consumption control time. The second control mode is usually a stricter fuse mechanism, which is used to provide additional protection when the first control mode cannot effectively manage energy consumption. Once the server enters the first or second energy consumption control mode, this control mechanism will continue to run until the server is actively shut down or restarted.
[0077] Specifically, users can flexibly and intuitively control and adjust the processor's energy consumption in the BIOS setup interface, providing users with a more convenient and sophisticated means of energy consumption management, ensuring that the server achieves energy efficiency optimization while meeting performance requirements. In the specific implementation process, the above preset operations can include other operations that are easy to implement in addition to single-click, double-click, single-click and long-press, etc.
[0078] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the relevant technology, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), including a number of instructions to enable a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the above methods of each embodiment of the present application.
[0079] In this embodiment, a schematic diagram of a BIOS setting interface is also provided, such as Figure 3 As shown, the BIOS setting interface includes two controls, a first energy consumption control mode and a second energy consumption control mode. When a preset operation is received, the energy consumption control parameters corresponding to the first energy consumption control mode and / or the second energy consumption control mode are respectively called up. The energy consumption control parameters corresponding to the first energy consumption control mode include a preset energy consumption value a and a preset energy consumption time b, and the energy consumption control parameters corresponding to the second energy consumption control mode include a preset energy consumption value c and a preset energy consumption time d.
[0080] In this embodiment, a specific energy consumption control method is also provided, such as Figure 4 As shown, the following steps are included:
[0081] Step S1: Power on the server or restart the server;
[0082] Step S2: BIOS (Basic Input Output System, BIOS for short) in PEI (Pre-EFI Initialization, PEI for short) stage and DXE (Driver Execution Environment, DXE for short);
[0083] Step S3: Obtain whether the setting value of energy consumption control 1 is effective. If yes, execute step S4; if no, execute step S9;
[0084] Step S4: Obtaining the energy consumption setting value of energy consumption control 1;
[0085] Step S5: Obtaining the time setting value of energy consumption control 1;
[0086] Step S6: updating the acquired setting value of energy consumption control 1 to the energy consumption control variable through the MSR instruction;
[0087] Step S7: obtaining the maximum energy consumption setting value supported by the current CPU (Central Processing Unit, CPU for short);
[0088] Step S8: Determine whether the energy consumption setting value of energy consumption 1 is greater than the maximum energy consumption value supported by the CPU. If yes, execute step S14; if no, execute step S15;
[0089] Step S9: Obtain whether the setting value of energy consumption control 2 is effective, if yes, execute step S10, if not, execute step S25;
[0090] Step S10: Obtaining the energy consumption setting value of energy consumption control 2;
[0091] Step S11: Obtaining the time setting value of energy consumption control 2;
[0092] Step S12: updating the acquired setting value of energy consumption control 2 to the energy consumption control variable through the MSR instruction;
[0093] Step S13: Obtain the maximum energy consumption setting value supported by the current CPU;
[0094] Step S14: determine whether the energy consumption setting value of energy consumption 2 is greater than the maximum energy consumption value supported by the CPU, if yes, execute step S15, if no, execute step S16;
[0095] Step S15: updating the MSR and the setting values of energy consumption control 1 and energy consumption control 2 according to the maximum energy consumption setting value supported by the CPU;
[0096] Step S16: Determine whether the energy consumption value of energy consumption control 1 is greater than the energy consumption value of energy consumption control 2. If yes, execute step S17; if no, execute step S18;
[0097] Step S17: the energy consumption values of energy consumption control 1 and energy consumption control 2 are set according to energy consumption control 1 and updated to the MSR register, and step S19 is executed;
[0098] Step S18: the energy consumption values of the energy consumption control 1 and the energy consumption control 2 are updated to the MSR (Model Specific Register, MSR for short) register according to the Setup setting of the BIOS, and step S19 is executed;
[0099] Step S19: Determine whether the time setting values of energy consumption control 1 and energy consumption control 2 are greater than 480s (maximum energy consumption time). If yes, execute step S20; if no, execute step S21;
[0100] Step S20: The time setting of energy consumption control 1 and energy consumption control 2 is set to 480s;
[0101] Step S21: The server starts and enters the operating system;
[0102] Step S22: whether the CPU runs for more than 480 seconds according to the energy consumption setting value under the system, if yes, execute step S23, if no, execute step S24;
[0103] Step S23: the CPU runs according to the energy consumption setting value under the system until it shuts down;
[0104] Step S24: the CPU operates according to the actual energy consumption value under the system;
[0105] Step S25: Turn off the energy consumption setting value option and the energy consumption time setting option of energy consumption control 1 and energy consumption control 2, and the server starts to enter the operating system.
[0106] In this embodiment, a specific execution flow chart of the energy consumption control method is also provided. Figure 5 As shown in the figure, the above step S1 is executed by the server, and steps S2 to S20 involve BIOS. This embodiment also provides another specific execution flow chart of the energy consumption control method, such as Figure 6 As shown, corresponding to step S20 to step S25, an operating system OS (Operating System, OS for short) is involved.
[0107] In this embodiment, an energy consumption control device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0108] Figure 7 is a structural block diagram of an energy consumption control device according to an embodiment of the present application, such as Figure 7 As shown, the device comprises:
[0109] The retrieving unit 10 is used to receive and respond to a preset operation on the interface of the basic input and output system, and retrieve energy consumption control parameters corresponding to the target energy consumption control mode, wherein the energy consumption control parameters at least include a preset energy consumption value;
[0110] Specifically, a plurality of energy consumption control modes are set on the BIOS (Basic Input Output System, BIOS for short), and each energy consumption control mode can correspond to a control. The preset operation acts on the control, and the effective energy consumption control mode is the target energy consumption control mode, that is, the energy consumption control parameters corresponding to the mode are effective. Therefore, the energy consumption control parameters corresponding to the above-mentioned effective target energy consumption control mode are retrieved, and the energy consumption control parameters are stored in the storage location of the BIOS. The central control unit can be a CPU (Central Processing Unit, CPU for short), and there are generally multiple CPUs in the server. Since the energy consumption management of the CPU occupies about 50% of the entire server system, the energy consumption of a CPU is about 400w. On the premise of maintaining the CPU performance, reducing the power consumption of the CPU will greatly improve the energy consumption ratio of the server. Therefore, this application will focus on energy consumption control of the CPU in the server. Multiple energy consumption control modes are preset, and each energy consumption control mode is distinguished by the size of the preset energy consumption value. For example, the preset energy consumption value of the first preset energy consumption mode is less than the preset energy consumption value of the second preset energy consumption mode, and the preset energy consumption value of the second preset energy consumption mode is less than the preset energy consumption value of the third preset energy consumption mode, forming a stepped energy consumption management mode. In actual application, other parameters can also be preset, such as preset energy consumption time, etc. There is no requirement for the size of the preset energy consumption time between each mode. The preset energy consumption value is the energy consumption value of the CPU set in advance during operation, so that the CPU runs according to the preset energy consumption value under certain conditions. In order to save energy consumption during the operation of the server and keep the performance of the server from decreasing, the preset energy consumption value needs to be smaller. Therefore, the maximum energy consumption value of the CPU is also obtained, that is, the maximum energy consumption value of the CPU during actual operation, to ensure that the energy consumption value of the CPU during actual operation does not exceed the above maximum energy consumption value.
[0111] The first control unit 20 is used to determine the energy consumption control value according to the above-mentioned preset energy consumption value and the maximum energy consumption value corresponding to the above-mentioned target energy consumption control mode, and control the operation of the central control unit at least according to the above-mentioned energy consumption control value, wherein the above-mentioned maximum energy consumption value is the maximum limit of the energy consumption of the above-mentioned central control unit.
[0112] Specifically, it is necessary to compare the preset energy consumption value corresponding to the effective energy consumption control mode with the maximum energy consumption value to ensure that the energy consumption control value cannot exceed the maximum energy consumption value, and finally determine the final first energy consumption control value based on the comparison result to control the operating state of the CPU.
[0113] Through the above steps, the energy consumption control parameters corresponding to the effective target energy consumption control mode are retrieved by receiving and responding to the preset operation acting on the interface of the basic input and output system, and then the second energy consumption control value is determined according to the size relationship between the preset energy consumption value and the maximum energy consumption value of all effective modes. Compared with the related art, which needs to be operated through a specific management interface and needs to update the firmware, the present application sets a variety of energy consumption control modes and their parameter values on the interface of the basic input and output system, and determines the energy consumption control mode and the corresponding parameters by receiving and responding to the preset operation, which is simpler and easier to operate, and manages energy consumption through a variety of energy consumption control modes, while achieving energy saving, increasing the service life of the server, and effectively protecting the energy consumption limit value of the server. Therefore, the problem that the energy consumption management implementation process of the server is complicated and inconvenient to operate in the related art can be solved, and the effect of convenient operation and effective reduction of server energy consumption can be achieved.
[0114] In some optional implementations, the first control unit includes a first determination module and a second determination module, the first determination module is used to determine the first energy consumption control value according to the preset energy consumption value and the maximum energy consumption value corresponding to the target energy consumption control mode when the target energy consumption control mode is one; the second determination module is used to determine the second energy consumption control value according to the preset energy consumption value and the maximum energy consumption value corresponding to the multiple target energy consumption control modes and the preset energy consumption value corresponding to different target energy consumption control modes when the target energy consumption control mode is multiple. The device determines the first energy consumption control value or the second energy consumption control value respectively under different circumstances by the relationship between the preset energy consumption value corresponding to the effective energy consumption control mode and the maximum energy consumption value of the CPU, so that reasonable control of CPU energy consumption can be achieved under different circumstances, which not only protects the hardware, but also optimizes resource utilization, and effectively balances the energy saving and performance requirements of the server.
[0115] Specifically, when only one energy consumption control mode is in effect, it is necessary to compare the preset energy consumption value corresponding to the effective energy consumption control mode with the maximum energy consumption value, and finally determine the final first energy consumption control value based on the comparison result. When multiple energy consumption control modes are in effect, it is necessary not only to determine the final second energy consumption control value based on the preset energy consumption value corresponding to the effective energy consumption control mode and the maximum energy consumption value, but also to determine the final second energy consumption control value based on the size between multiple effective energy consumption control modes, to ensure that the energy consumption of the CPU is maintained within the optimal control range while satisfying all mode constraints. Implementing multi-level energy consumption management of multiple central control units of a server can maintain the optimal balance of the CPU operating status under complex and changeable operating conditions, improve the energy efficiency ratio of the server, ensure the stability and reliability of the system, and reduce operation and maintenance costs and energy consumption.
[0116] In some optional implementations, the first determination module includes a first determination submodule and a second determination submodule: the first determination submodule is used to determine the preset energy consumption value as the first energy consumption control value when the preset energy consumption value is less than the maximum energy consumption value; the second determination submodule is used to determine the maximum energy consumption value as the first energy consumption control value when the preset energy consumption value is greater than or equal to the maximum energy consumption value. The device determines the first energy consumption control value through the above steps, so that the energy consumption value of the central control unit can be ensured not to exceed the maximum energy consumption value, which not only meets the energy saving requirements, but also makes full use of the performance potential of the CPU, while avoiding excessive use of hardware and extending the service life of the hardware.
[0117] In the specific implementation process, when the preset energy consumption value is less than the maximum energy consumption value, the preset energy consumption value is determined as the first energy consumption control value. That is to say, the CPU will be allowed to operate within a capacity range lower than its maximum energy consumption; when the preset energy consumption value is greater than or equal to the maximum energy consumption value, the maximum energy consumption value is determined as the first energy consumption control value. This shows that when a user or system attempts to set an energy consumption value that exceeds the actual capacity of the CPU, it will be automatically limited to the maximum safe energy consumption level of the CPU, effectively protecting the CPU from the risk of overload and overheating, and ensuring the stable operation and data security of the server. Therefore, the above steps make intelligent decisions by comparing the preset energy consumption value with the maximum energy consumption value and select the most appropriate energy consumption control value. When the preset value is reasonable, the system will operate according to the preset value to achieve the energy saving goal; when the preset value is too high, the system will automatically adjust to the maximum safe energy consumption level to ensure a balance between performance and safety. This automatic adjustment capability reduces the need for manual intervention and improves the automatic management level and resource utilization efficiency of the server. In actual operation, the workload of the server will change continuously. By dynamically adjusting the first energy consumption control value, the system can effectively reduce energy consumption without affecting server performance.
[0118] In order to achieve energy consumption management when multiple energy consumption control modes are in effect, in some optional implementations, the above-mentioned target energy consumption control mode includes a first energy consumption control mode and a second energy consumption control mode, and the second energy consumption control value is determined according to the above-mentioned preset energy consumption values corresponding to the multiple above-mentioned target energy consumption control modes and the above-mentioned maximum energy consumption values. The second determination module includes a first comparison submodule, a third determination submodule, and a fourth determination submodule. The first comparison submodule is used to compare the first preset energy consumption value and the second preset energy consumption value when both the first preset energy consumption value and the second preset energy consumption value are smaller than the above-mentioned maximum energy consumption value, wherein the above-mentioned first comparison submodule The first energy consumption control mode has a first energy consumption control parameter, and the first energy consumption control parameter at least includes the first preset energy consumption value; the second energy consumption control mode has a second energy consumption control parameter, and the second energy consumption control parameter at least includes the second preset energy consumption value; the third determination submodule is used to determine the first preset energy consumption value and the second preset energy consumption value as the second energy consumption control value when the first preset energy consumption value is less than or equal to the second preset energy consumption value; the fourth determination submodule is used to determine the first preset energy consumption value as the second energy consumption control value when the first preset energy consumption value is greater than the second preset energy consumption value. Through the above steps, when multiple energy consumption control modes are effective, the device first determines whether the "step-by-step" energy consumption management conditions are met, and then determines the second energy consumption control value, ensuring that under different operating conditions and business requirements, it can not only effectively utilize resources and save energy, but also protect hardware security, and achieve the optimal balance between performance and efficiency.
[0119] Specifically, the above steps are mainly divided into two categories: (1) When both preset energy consumption values are less than the maximum energy consumption value, the two preset values are first compared. If the first preset energy consumption value is less than the second preset value, in this case, both preset values are determined as the second energy consumption control value, and step-by-step control is achieved through the two energy consumption control values, so that the first energy consumption control mode mainly achieves the purpose of energy saving, and the second energy consumption control mode maintains a certain balance between performance and energy consumption, maintains sufficient performance margin, and ensures the stable operation of the system. However, when the first preset energy consumption value is greater than or equal to the second preset energy consumption value, and both values are within the maximum energy consumption value range, only the first preset value is determined as the second energy consumption control value. Because this situation does not meet the step-by-step energy consumption control mode, it is sufficient to control only according to the larger preset energy consumption value of the two. This situation achieves maximum efficiency without exceeding the hardware limitation.
[0120] The above-mentioned second determination module also includes a fifth determination submodule, which is used to determine the above-mentioned maximum energy consumption value as the above-mentioned second energy consumption control value when the above-mentioned first preset energy consumption value is greater than or equal to the above-mentioned maximum energy consumption value, and / or when the above-mentioned second preset energy consumption value is greater than or equal to the above-mentioned maximum energy consumption value, wherein the above-mentioned first energy consumption control mode has a first energy consumption control parameter, and the above-mentioned first energy consumption control parameter at least includes the above-mentioned first preset energy consumption value, and the above-mentioned second energy consumption control mode has a second energy consumption control parameter, and the above-mentioned second energy consumption control parameter at least includes the above-mentioned second preset energy consumption value.
[0121] Specifically, when any one or two preset energy consumption values are greater than or equal to the maximum energy consumption value, the maximum energy consumption value will be automatically determined as the second energy consumption control value. This mechanism ensures that the CPU operation does not exceed its physical limit, effectively protects the hardware, avoids the risk of overheating and overload, and ensures the safe and stable operation of the server. At the same time, even under high load or abnormal conditions, the system can maintain basic operating capabilities by using the maximum safe energy consumption value.
[0122] The intelligent comparison and adjustment mechanism in the above steps is not only applicable to a single CPU, but also to a server system with multiple CPUs. This means that the server can optimize the energy consumption control strategy of each CPU according to the overall load and configuration, thereby improving energy efficiency and reducing power consumption overall, which has significant economic and environmental benefits for energy conservation and emission reduction in large-scale data centers.
[0123] In some optional implementations, the energy consumption control parameter further includes a preset energy consumption time, the maximum control parameter further includes a maximum energy consumption time, and the device further includes a first acquisition unit, a first determination unit, and a second determination unit. The first acquisition unit is used to acquire the maximum energy consumption time, wherein the maximum energy consumption time is the maximum limit of the energy consumption time of the central control unit; the first determination unit is used to compare the preset energy consumption time and the maximum energy consumption time, and when the preset energy consumption time is less than the maximum energy consumption time, the preset energy consumption time is determined as the energy consumption control time; the second determination unit is used to determine the maximum energy consumption time as the energy consumption control time when the preset energy consumption time is greater than or equal to the maximum energy consumption time. The device ensures that the operation of the central processing unit (CPU) is not only controlled in terms of energy consumption value, but also complies with the set limit in terms of time, so as to achieve a more refined energy consumption management effect and further save energy consumption.
[0124] In the specific implementation process, the above steps also introduce two parameters: preset energy consumption time and maximum energy consumption time. The preset energy consumption time is the energy consumption control time threshold set by the user or the system, while the maximum energy consumption time reflects the maximum time limit that the CPU can safely run under a specific energy consumption value. By comparing these two time parameters, the system can more accurately control the CPU's running time in a high energy consumption state, avoiding the damage that may be caused to the hardware by long-term high energy consumption operation. When the preset energy consumption time is less than the maximum energy consumption time, the preset energy consumption time is determined as the energy consumption control time. This means that the CPU will follow the time limit set by the user or the system to ensure that it will not run in a high energy consumption state for more than the preset time, thereby achieving the dual goals of hardware protection and energy saving while meeting business needs. When the preset energy consumption time is greater than or equal to the maximum energy consumption time, the maximum energy consumption time is determined as the energy consumption control time. This means that the system will force the CPU to comply with the hardware's safe running time limit. Even if the user or the system sets a longer running time, the CPU will not be allowed to run beyond the safe range in a high energy consumption state, effectively avoiding the risk of hardware overheating or overload, and ensuring the long-term stable operation of the server. In addition, regardless of whether one or multiple energy consumption control modes are in effect, the setting of the preset energy consumption time follows the above setting steps, that is, there is no need to compare the preset energy consumption time corresponding to the effective energy consumption control mode like determining the preset energy consumption value, but only needs to compare the preset energy consumption time with the maximum energy consumption time to determine it.
[0125] In order to realize the energy consumption management of multiple CPU systems, in some optional implementations, the central control unit includes a first central control unit and a second central control unit, the third determination submodule includes a sixth determination submodule, which is used to determine the first preset energy consumption value as the second energy consumption control value of the first central control unit; the second preset energy consumption value is determined as the second energy consumption control value of the second central control unit; the fourth determination submodule includes a seventh determination submodule, which is used to determine the first preset energy consumption value as the second energy consumption control value of the first central control unit and the second central control unit; the fifth determination submodule includes an eighth determination submodule, which is used to determine the maximum energy consumption value as the second energy consumption control value of the first central control unit and the second central control unit. Through the above steps, the device enables each central control unit to be controlled by a group of effective energy consumption control modes, and formulates different energy consumption control strategies for different central control units when multiple modes are effective, so that the overall performance of the server is maintained by the central control unit with a high preset energy consumption value, and the overall energy consumption of the server is saved by the central control unit with a low preset energy consumption value, while ensuring the overall performance of the server, achieving the purpose of energy saving and consumption reduction.
[0126] Specifically, when both preset energy consumption values are determined as the second energy consumption control value, a preset energy consumption value is assigned to each central control unit. In actual application, the first preset energy consumption value can also be determined as the second energy consumption control value of the second central control unit; the second preset energy consumption value is determined as the second energy consumption control value of the first central control unit, and it is only necessary to ensure that the first preset energy consumption value is less than the second preset energy consumption value. When the first preset energy consumption value is determined as the second energy consumption control value, the first central control unit and the second central control unit both adopt the first preset energy consumption value; when the maximum energy consumption value is determined as the second energy consumption control value, the first central control unit and the second central control unit both adopt the maximum energy consumption value. The above steps ensure that in a multi-CPU server, the operation of each CPU neither consumes excessive energy nor sacrifices performance due to energy consumption restrictions. This dynamic balance has a significant effect on improving the energy efficiency ratio of the server and extending the service life of the hardware.
[0127] In some specific implementations, the target energy consumption control mode includes a first energy consumption control mode and a second energy consumption control mode, the interface of the basic input and output system is provided with a first control and a second control, the first control corresponds to the first energy consumption control mode, and the second control corresponds to the second energy consumption control mode, the calling unit includes a first calling module and a second calling module, the first calling module is used to receive and respond to a preset operation on one of the controls on the interface of the basic input and output system, and call the energy consumption control parameters corresponding to the first energy consumption control mode or the energy consumption control parameters corresponding to the second energy consumption control mode; the second calling module is used to receive and respond to the preset operation on the two controls on the interface of the basic input and output system, and call the energy consumption control parameters corresponding to the first energy consumption control mode and the energy consumption control parameters corresponding to the second energy consumption control mode. The device judges and determines under what circumstances only one or more energy consumption control modes are effective, and under what circumstances all modes are not effective through the above steps. This method provides flexibility and accuracy of energy consumption control, and ensures that the server system can reasonably adjust the energy consumption control strategy according to actual needs and environmental conditions.
[0128] Specifically, when the first energy consumption control mode is effective and the second energy consumption control mode is not effective, the system will only enable the first energy consumption control mode. On the contrary, if the first mode is not effective and the second mode is effective, the system will only enable the second mode. This means that the system can independently enable an energy consumption control mode according to the specific needs of the user to achieve a specific performance and energy consumption balance point, such as giving priority to energy saving or ensuring stable performance. In the case where the first and second energy consumption control modes are effective at the same time, the system will identify and apply these two modes at the same time. If the preset operation of the first and second energy consumption control modes is not received, it means that the first and second energy consumption control modes are not effective, and the system will determine that all energy consumption control modes are not effective. In this state, the server will run under the default maximum energy consumption control strategy, which may focus more on performance rather than energy consumption restrictions, and is suitable for business scenarios that require maximum performance. By judging whether the first and second energy consumption control modes are effective, this technical solution realizes the intelligent identification and dynamic adjustment of the energy consumption control strategy in the server system, provides user-friendly customization options, and also enhances the system's fault prevention capabilities and hardware protection mechanisms, providing strong technical support for the efficient operation and energy saving and emission reduction of the server.
[0129] In order to realize intelligent identification of multiple energy consumption control modes and determination of maximum control parameters, the calling unit further includes a judgment module and a response module. The judgment module is used to judge the startup phase of the basic input and output system when the server is powered on or restarted; the response module is used to receive and respond to the preset operation on the interface of the basic input and output system when the startup phase of the basic input and output system is the initialization phase. The device provides operating conditions for receiving and responding to the preset operation through the above steps.
[0130] During the specific implementation process, when the server is powered on or restarted, the startup phase of the BIOS (Basic Input Output System, BIOS for short) is first determined. This phase identification is the starting point of the energy consumption control process, ensuring that the energy consumption control strategy can be executed at the critical time point of BIOS initialization. After confirming that the BIOS is in the initialization phase, the user's preset operation is received, and in response to the above preset operation, the corresponding parameters of multiple energy consumption control modes are read from the BIOS. At the same time, the system obtains the control parameters of the CPU under overclocking, that is, the maximum control parameters, which include but are not limited to the maximum frequency and voltage of the CPU. These parameters are crucial to determining the actual maximum energy consumption level of the CPU, because the maximum control parameters in the overclocking state are often higher than the default settings. Based on the read overclocking control parameters, the system calculates and determines the maximum control parameters of the CPU. This parameter reflects the upper limit of the energy consumption that the CPU can safely operate under the current hardware configuration, and is the benchmark point for setting the energy consumption control mode. After obtaining the maximum control parameters, the system can intelligently decide whether to apply energy consumption control and how to adjust the CPU's operating status based on the effective energy consumption control mode and the actual energy consumption upper limit that the CPU can support, so as to avoid exceeding the maximum control parameters and ensure the stability and security of the hardware.
[0131] In some optional implementations, the retrieval unit further includes a third retrieval module, which is used to retrieve the energy consumption control parameters from the interface of the basic input and output system through the target function. The device obtains the energy consumption control parameters from the BIOS setup interface through the target function, so that the server system can automatically detect and apply the energy consumption control strategy, reduce the need for manual intervention, and improve the response speed and management efficiency of the system.
[0132] In the specific implementation process, the energy control parameters corresponding to the various energy control modes are displayed on the BIOS interface. Therefore, it is necessary to obtain the preset energy control parameters from the BIOS through the target function. The target function needs to access the BIOS setup interface through a system call. This may also involve parsing the configuration structure, searching for specific configuration items, or reading specific register locations. Obtaining energy control parameters from the BIOS setup interface through the target function enables the server system to automatically detect and apply energy control strategies, reducing the need for manual intervention and improving the system's response speed and management efficiency.
[0133] In order to store the energy consumption control value and control the operation of the central control unit according to the energy consumption control value, after the above step S104, the above device further includes a writing unit for writing the above energy consumption control value into the register of the above central control unit. The device writes the above energy consumption control value into a specific register for storage to achieve accurate control of energy consumption.
[0134] Specifically, after determining the first energy consumption control value and the second energy consumption control value, the control is achieved by directly writing into a specific register of the CPU (such as an MSR register), and the position and offset value of the register can be set according to the specific situation. This write operation ensures that the CPU can comply with the set energy consumption limit during operation, thereby achieving effective management of the energy consumption of a single CPU. The write operation requires precise selection of registers in the CPU, which are directly related to the energy consumption management mechanism. For example, for an Intel CPU, it may be necessary to write registers such as MSR_PERF_CTL or MSR_PKG_POWER_LIMIT in the MSR to achieve energy consumption control. By directly writing the first and second energy consumption control values into the registers of the CPU, the technical solution can achieve instant and precise control of CPU energy consumption, whether in a single CPU configuration or in a complex scenario of multiple CPUs or multiple modes. This not only helps to improve the energy efficiency ratio of the server, ensuring that energy consumption is reduced while meeting performance requirements, but also effectively prevents CPU overheating or overload, extends the service life of hardware, and reduces maintenance costs.
[0135] In some optional embodiments, the device further includes a second control unit, which is used to control the operation of the plurality of central control units according to the maximum energy consumption value and the maximum energy consumption time when the preset operation acting on the interface of the basic input and output system is not received, wherein the maximum energy consumption time is the maximum limit of the energy consumption time of the central control unit. The device performs energy consumption control according to the maximum control parameter under the above circumstances, so that it can operate according to the maximum control parameter of the CPU when all energy consumption control modes are not effective. The technical solution can maximize the computing power of the server without sacrificing performance.
[0136] In the specific implementation process, when the above-mentioned preset operation acting on the above-mentioned target control is not received, that is, when the user or system management policy does not activate any energy consumption control mode, it will operate according to the maximum control parameters of the central control unit (CPU). This strategy ensures that the CPU can exert its maximum performance potential while remaining within the boundaries of hardware safe operation in scenarios without specific energy consumption limit requirements. Maximum control parameter determination: The system first reads and confirms the maximum control parameters of the CPU. These parameters usually include the maximum frequency, maximum voltage, maximum power, etc. of the CPU, which define the upper limit of the performance that the CPU can safely operate when not under energy consumption control. After confirming that all energy consumption control modes are ineffective, the system will adjust its operating strategy to allow the CPU to operate according to the maximum control parameters. This means that the CPU will no longer be subject to any preset energy consumption restrictions and can automatically adjust to the maximum performance state according to system requirements and load conditions.
[0137] In order to make the server run without energy consumption restriction, the above device further includes a shut down unit and a third control unit, wherein the shut down unit is used to shut down the preset operation options of the above energy consumption control modes; and the third control unit is used to control the server to start and enter the operating system. The device shuts down the preset operation options of the preset energy consumption value and the preset energy consumption time in the above energy consumption control modes through the above steps, so that the server automatically runs without energy consumption restriction.
[0138] Specifically, in the case where the above-mentioned preset operation acting on the above-mentioned target control is not received, a shutdown instruction is sent to the energy consumption control option in the BIOS, which usually involves modifying a specific configuration item or register setting and setting the effective state flag to "off" or "disabled". The options of the preset energy consumption value and the preset energy consumption time also need to be set to invalid or default values to ensure that they do not affect the operation of the CPU. After executing the shutdown instruction, the system needs to update the energy consumption control option in the BIOS to ensure that all settings reflect the state after the shutdown instruction. After completing all settings to shut down the energy consumption control mode, the server will complete the startup process and enter the operating system. At this time, the CPU operation under the operating system will no longer be restricted by the preset energy consumption control mode in the BIOS, but will run within its maximum control parameter range to provide the highest performance. Although the energy consumption control mode is turned off, the system still needs to monitor the operating status of the CPU, including temperature, voltage, and power, to prevent overheating or overload. When the system is in a state without energy consumption control, it may be necessary to notify the system administrator or user of this state through the system log or user interface so that they can adjust the server's operating mode according to actual needs. Through the above steps, the server can start and enter the operating system without power consumption control, thereby providing maximum performance when necessary.
[0139] In some optional embodiments, the first control unit includes a control module for controlling the operation of the plurality of central control units according to the energy consumption control value and the energy consumption control time. The device controls the operation of the central control unit by presetting the control value and the energy consumption control time, and achieves the purpose of saving energy consumption by limiting the energy consumption value and the energy consumption time.
[0140] During the specific implementation process, the server reads the first energy consumption control value and the first energy consumption control time from the BIOS settings during startup or restart. Similarly, the second energy consumption control value and the second energy consumption control time are read. The second control parameter is usually set to a higher value as a "fuse point" for CPU energy consumption. By controlling the CPU operation based on at least the first and second energy consumption control values and their corresponding times, it is possible to effectively cope with the energy consumption management challenges of the server under different load and environmental conditions, and provide strong support for energy efficiency optimization and hardware protection of the data center. This multi-level control mechanism not only enhances the flexibility of the system, but also ensures that the best energy consumption control effect can be achieved in various scenarios.
[0141] When the server is powered on or restarted, the entire server system begins hardware self-checking and initialization. During the initialization process, the BIOS reads the energy control settings stored therein, including the first energy control value and the second energy control value mentioned above, as well as corresponding control time and other parameters. These settings may have been changed by the user or system administrator before the last shutdown or restart of the server. Based on the read settings, the BIOS configures the basic operating environment of the system, including setting the initial frequency, voltage, and power consumption limit of the CPU, to ensure that the server follows the pre-set energy control strategy at startup. After completing the hardware initialization and configuration loading, the server starts and enters the operating system, and the CPU starts running according to the configuration parameters.
[0142] In some optional implementations, after controlling the server to boot into the operating system, the device further includes a second acquisition unit, a fifth control unit, and a sixth control unit, wherein the second acquisition unit is used to acquire the running time of the central control unit; the fifth control unit is used to control the central control unit to run according to the actual energy consumption value when the running time is less than the maximum energy consumption time; the sixth control unit is used to control the central control unit to run according to the energy consumption control value and the energy consumption control time when the running time is greater than or equal to the maximum energy consumption time, until the server is shut down. The device can intelligently adjust the energy consumption of the server by combining the dynamic control strategy of the running time and the energy consumption threshold, ensuring that the hardware resources are effectively managed while meeting the business needs, and extending the service life of the server and CPU.
[0143] Specifically, after the server is successfully started and enters the operating system, the system begins to implement a dynamic energy consumption control strategy based on the running time and energy consumption threshold. This strategy aims to balance server performance and energy consumption, ensuring that the power consumption of the CPU is effectively managed while meeting business needs. The running time of each CPU can be obtained periodically. When the running time is less than the set maximum energy consumption time, the CPU will run according to the actual energy consumption value, that is, it will not be restricted by the first or second energy consumption control value. This allows the CPU to run at the actual required power consumption level in the initial startup or low-load scenario to maximize performance and response speed. Once the CPU running time reaches or exceeds the maximum energy consumption time, the system will automatically switch to the first or second energy consumption control mode and run according to the preset first energy consumption control value and time, or the second control value and time. This switch ensures that the server can automatically adjust the power consumption of the CPU after reaching a certain running time to prevent excessive energy consumption and potential overheating risks. If the running time triggers the first control mode, the system will ensure that the power consumption of the CPU does not exceed the first energy consumption control value, and this state will last for at least the first energy consumption control time. For example, the system may control the CPU energy consumption by reducing the CPU frequency, reducing the number of active cores, or limiting the maximum power consumption. If the runtime triggers the second control mode, the system will ensure that the CPU power consumption does not exceed the second energy consumption control value and lasts for at least the second energy consumption control time. The second control mode is usually a stricter fuse mechanism, which is used to provide additional protection when the first control mode cannot effectively manage energy consumption. Once the server enters the first or second energy consumption control mode, this control mechanism will continue to run until the server is actively shut down or restarted.
[0144] Specifically, users can flexibly and intuitively control and adjust the processor's energy consumption in the BIOS setup interface, providing users with a more convenient and sophisticated means of energy consumption management, ensuring that the server achieves energy efficiency optimization while meeting performance requirements. In the specific implementation process, the above preset operations can include other operations that are easy to implement in addition to single-click, double-click, single-click and long-press, etc.
[0145] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0146] The embodiment of the present application also provides a server, such as Figure 8 As shown, including the server motherboard, including:
[0147] A basic input and output system (BIOS), configured to display a plurality of controls, wherein each of the controls indicates an identification of an energy consumption control mode, each of the energy consumption control modes having energy consumption control parameters, and the energy consumption control parameters at least including a preset energy consumption value;
[0148] The central control unit (CPU0 and CPU1) includes at least registers, wherein the registers are used to store energy consumption control parameters;
[0149] Power supply units (PSU1 and PSU2) for supplying power to the components in the above servers;
[0150] A baseboard management controller (BMC) includes one or more programs, and when the one or more programs are executed, any one of the energy consumption control devices of the server is implemented.
[0151] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0152] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0153] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0154] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0155] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0156] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0157] The embodiments of the present application also provide a computer program, which includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in any one of the above method embodiments.
[0158] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0159] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0160] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. An energy consumption control method, characterized in that: include: Receiving and responding to a preset operation on the interface of the basic input and output system, calling up energy consumption control parameters corresponding to the target energy consumption control mode, wherein the energy consumption control parameters at least include a preset energy consumption value; The energy consumption control value is determined according to the preset energy consumption value and the maximum energy consumption value corresponding to the target energy consumption control mode, and the operation of the central control unit is controlled at least according to the energy consumption control value, wherein the maximum energy consumption value is the maximum limit of the energy consumption of the central control unit.
2. The method according to claim 1, characterized in that Determining the energy consumption control value according to the preset energy consumption value and the maximum energy consumption value corresponding to the target energy consumption control mode includes: In the case where the target energy consumption control mode is one, determining a first energy consumption control value according to the preset energy consumption value corresponding to the target energy consumption control mode and the maximum energy consumption value; In the case that there are multiple target energy consumption control modes, the second energy consumption control value is determined according to the preset energy consumption values corresponding to the multiple target energy consumption control modes and the maximum energy consumption values.
3. The method according to claim 2, characterized in that In the case that the target energy consumption control mode is one, determining the first energy consumption control value according to the preset energy consumption value corresponding to the target energy consumption control mode and the maximum energy consumption value includes: When the preset energy consumption value is less than the maximum energy consumption value, determining the preset energy consumption value as the first energy consumption control value; When the preset energy consumption value is greater than or equal to the maximum energy consumption value, the maximum energy consumption value is determined as the first energy consumption control value.
4. The method according to claim 2, characterized in that: The target energy consumption control mode includes a first energy consumption control mode and a second energy consumption control mode, and the second energy consumption control value is determined according to the preset energy consumption values and the maximum energy consumption values corresponding to the plurality of target energy consumption control modes, including: When both the first preset energy consumption value and the second preset energy consumption value are smaller than the maximum energy consumption value, comparing the first preset energy consumption value and the second preset energy consumption value, wherein the first energy consumption control mode has a first energy consumption control parameter, the first energy consumption control parameter at least includes the first preset energy consumption value, and the second energy consumption control mode has a second energy consumption control parameter, the second energy consumption control parameter at least includes the second preset energy consumption value; When the first preset energy consumption value is less than or equal to the second preset energy consumption value, both the first preset energy consumption value and the second preset energy consumption value are determined as the second energy consumption control value; When the first preset energy consumption value is greater than the second preset energy consumption value, the first preset energy consumption value is determined as the second energy consumption control value.
5. The method according to claim 2, characterized in that: The target energy consumption control mode includes a first energy consumption control mode and a second energy consumption control mode, and the second energy consumption control value is determined according to the preset energy consumption values and the maximum energy consumption values corresponding to the plurality of target energy consumption control modes, and further includes: When the first preset energy consumption value is greater than or equal to the maximum energy consumption value, and / or when the second preset energy consumption value is greater than or equal to the maximum energy consumption value, the maximum energy consumption value is determined as the second energy consumption control value, wherein the first energy consumption control mode has a first energy consumption control parameter, which includes at least the first preset energy consumption value, and the second energy consumption control mode has a second energy consumption control parameter, which includes at least the second preset energy consumption value.
6. The method according to claim 1, characterized in that The energy consumption control parameter also includes a preset energy consumption time. After determining the energy consumption control value according to the preset energy consumption value and the maximum energy consumption value corresponding to the target energy consumption control mode, the method further includes: Acquire a maximum energy consumption time, wherein the maximum energy consumption time is a maximum limit of the energy consumption time of the central control unit; Compare the preset energy consumption time with the maximum energy consumption time, and when the preset energy consumption time is less than the maximum energy consumption time, determine the preset energy consumption time as the energy consumption control time; When the preset energy consumption time is greater than or equal to the maximum energy consumption time, the maximum energy consumption time is determined as the energy consumption control time.
7. The method according to claim 4, characterized in that The central control unit includes a first central control unit and a second central control unit, Determining both the first preset energy consumption value and the second preset energy consumption value as the second energy consumption control value, including: determining the first preset energy consumption value as the second energy consumption control value of the first central control unit; determining the second preset energy consumption value as the second energy consumption control value of the second central control unit; Determining the first preset energy consumption value as the second energy consumption control value includes: determining the first preset energy consumption value as the second energy consumption control value of the first central control unit and the second central control unit; Determining the maximum energy consumption value as the second energy consumption control value includes: determining the maximum energy consumption value as the second energy consumption control value of the first central control unit and the second central control unit.
8. The method according to claim 1, characterized in that The target energy consumption control mode includes a first energy consumption control mode and a second energy consumption control mode. The interface of the basic input and output system is provided with a first control and a second control. The first control corresponds to the first energy consumption control mode, and the second control corresponds to the second energy consumption control mode. Receiving and responding to a preset operation on the interface of the basic input and output system, and calling energy consumption control parameters corresponding to the target energy consumption control mode include any one of the following: Receiving and responding to a preset operation on the first control or the second control, retrieving an energy consumption control parameter corresponding to the first energy consumption control mode or an energy consumption control parameter corresponding to the second energy consumption control mode; Receiving and responding to preset operations acting on the first control and the second control, energy consumption control parameters corresponding to the first energy consumption control mode and energy consumption control parameters corresponding to the second energy consumption control mode are retrieved.
9. The method according to claim 1, characterized in that: Receiving and responding to a preset operation acting on an interface of a basic input and output system, further comprising: When the server is powered on or restarted, determine the startup phase of the basic input and output system; In a case where the startup phase of the basic input / output system is an initialization phase, the preset operation acting on the interface of the basic input / output system is received and responded to.
10. The method according to claim 1, characterized in that Retrieve the energy consumption control parameters corresponding to the target energy consumption control mode, including: The energy consumption control parameter is retrieved from the interface of the basic input and output system through the objective function.
11. The method according to claim 1, characterized in that: After determining the energy consumption control value according to the preset energy consumption value and the maximum energy consumption value corresponding to the target energy consumption control mode, the method further includes: The energy consumption control value is written into the register of the central control unit.
12. The method according to claim 1, characterized in that The method further comprises: When the preset operation acting on the interface of the basic input and output system is not received, the operation of multiple central control units is controlled according to the maximum energy consumption value and the maximum energy consumption time, wherein the maximum energy consumption time is the maximum limit of the energy consumption time of the central control unit.
13. The method according to claim 12, characterized in that In the case where the preset operation acting on the interface of the basic input and output system is not received, the method further includes: Turn off the preset operation options of the multiple energy consumption control modes; The control server boots into the operating system.
14. The method according to claim 4, characterized in that Controlling the operation of the central control unit at least according to the energy consumption control value includes: The operation of the plurality of central control units is controlled according to the energy consumption control value and the energy consumption control time.
15. The method according to claim 14, characterized in that Controlling the operation of the plurality of central control units according to the energy consumption control value and the energy consumption control time includes: Obtaining the operating time of the central control unit; When the operating time is less than the maximum energy consumption time, controlling the central control unit to operate according to the actual energy consumption value; When the running time is greater than or equal to the maximum energy consumption time, the central control unit is controlled to run according to the energy consumption control value and the energy consumption control time until the server is shut down.
16. An energy consumption control device, characterized in that: include: A calling unit, configured to receive and respond to a preset operation on the interface of the basic input and output system, and call an energy consumption control parameter corresponding to the target energy consumption control mode, wherein the energy consumption control parameter at least includes a preset energy consumption value; The first control unit is used to determine the energy consumption control value according to the preset energy consumption value and the maximum energy consumption value corresponding to the target energy consumption control mode, and control the operation of the central control unit at least according to the energy consumption control value, wherein the maximum energy consumption value is the maximum limit of the energy consumption of the central control unit.
17. A server, characterized in that: include: A basic input-output system, used for displaying a plurality of controls, wherein one of the controls represents an identification of an energy consumption control mode, each of the energy consumption control modes has energy consumption control parameters, and the energy consumption control parameters at least include a preset energy consumption value; A central control unit, comprising at least a register, wherein the register is used to store energy consumption control parameters; A power supply unit, used to supply power to various components in the server; A baseboard management controller comprises one or more programs, wherein the one or more programs implement the energy consumption control method according to any one of claims 1 to 15 when executed.
18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 15 when executed by a processor.
19. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 15 are implemented.
20. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 15 are implemented.
Citation Information
Patent Citations
Power consumption control method and device, electronic equipment and a readable storage medium
CN113625862A
CPU power consumption adjusting method and system, electronic equipment and storage medium
CN116185163A
Server operation parameter adjusting method, device and system and storage medium
CN117421186A
Energy-consumption optimization method, system and apparatus, and storage medium
WO2024002026A1
Cited By
Energy consumption control method and apparatus, and server and electronic device
WO2026170815A1