CN113568805A - Real-time adjustment method and device for power consumption of server and electronic equipment - Google Patents

Real-time adjustment method and device for power consumption of server and electronic equipment Download PDF

Info

Publication number
CN113568805A
CN113568805A CN202110655343.1A CN202110655343A CN113568805A CN 113568805 A CN113568805 A CN 113568805A CN 202110655343 A CN202110655343 A CN 202110655343A CN 113568805 A CN113568805 A CN 113568805A
Authority
CN
China
Prior art keywords
fan
power consumption
rotating speed
server
current
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110655343.1A
Other languages
Chinese (zh)
Other versions
CN113568805B (en
Inventor
钟杨帆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Innovation Co
Original Assignee
Alibaba Singapore Holdings Pte Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Singapore Holdings Pte Ltd filed Critical Alibaba Singapore Holdings Pte Ltd
Priority to CN202110655343.1A priority Critical patent/CN113568805B/en
Priority claimed from CN202110655343.1A external-priority patent/CN113568805B/en
Publication of CN113568805A publication Critical patent/CN113568805A/en
Application granted granted Critical
Publication of CN113568805B publication Critical patent/CN113568805B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/16Constructional details or arrangements
    • G06F1/20Cooling means
    • G06F1/206Cooling means comprising thermal management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3058Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3058Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations
    • G06F11/3062Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations where the monitored property is the power consumption
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Human Computer Interaction (AREA)
  • Cooling Or The Like Of Electrical Apparatus (AREA)

Abstract

The application provides a method and a device for adjusting power consumption of a server in real time and electronic equipment. The method executes the following steps in the process of running the server: on the basis of the current fan rotating speed, adjusting the fan rotating speed in the current adjusting direction according to a preset step length; wherein, the current adjusting direction is to increase the rotating speed of the fan or decrease the rotating speed of the fan; comparing the power consumption data of the server before and after the adjustment of the rotating speed of the fan; if the power consumption data after the adjustment of the rotating speed of the fan is smaller than the power consumption data before the adjustment, setting the rotating speed of the fan after the adjustment as the current rotating speed of the fan, and returning to the step of adjusting the rotating speed of the fan in the current adjusting direction by a preset step length; and if the power consumption data after the adjustment of the rotating speed of the fan is larger than the power consumption data before the adjustment, setting the rotating speed of the fan after the adjustment as the current rotating speed, updating the current adjustment direction to be the direction opposite to the original current adjustment direction, and then returning to the step of adjusting the rotating speed of the fan in the current adjustment direction by a preset step length.

Description

Real-time adjustment method and device for power consumption of server and electronic equipment
Technical Field
The application relates to the technical field of computers, in particular to a method, a device and electronic equipment for adjusting power consumption of a server in real time.
Background
With the continuous development of computer technology, the size of servers is continuously expanding to deal with various types of services. In the computer field, servers are configured with a variety of server hardware devices that vary significantly in specification, performance, lifetime, age, and requirements for the operating environment of the hardware devices. The running power consumption of the server is affected by various factors such as the ambient temperature, the equipment load, the configuration and the like. Therefore, the power consumption of its operation is also different.
In the prior art, in order to achieve optimal configuration of power consumption of a server, power consumption of different server models in environments with different environmental temperatures, different loads and different configurations needs to be manually tested, and then rotation speed points of cooling fans with relatively high energy consumption corresponding to the server under different environmental temperatures and different loads are obtained. However, because the operating load, configuration and external environment temperature of the server are constantly in a changing state, the above method for determining the optimal energy consumption of the server by adopting a manual test has a huge test workload, and in the actual operation process, in order to adjust the energy consumption of the server to the expected low power consumption process in real time, the operating load, configuration and temperature change of the server need to be monitored in real time, the calculation amount of the server is increased invisibly, and the operation difficulty is high.
Therefore, how to implement real-time adjustment of server power consumption becomes an urgent problem to be solved by those skilled in the art.
Disclosure of Invention
The application provides a real-time adjustment method for power consumption of a server, which aims to solve the problems in the prior art. The application also provides a device for adjusting the power consumption of the server in real time, electronic equipment and a computer storage medium.
The method for adjusting the power consumption of the server in real time comprises the following steps: during the operation of the server, executing the following steps of adjusting fans for cooling the server:
on the basis of the current fan rotating speed, adjusting the fan rotating speed in the current adjusting direction according to a preset step length; wherein the current adjustment direction is to increase the rotation speed of the fan or decrease the rotation speed of the fan;
comparing the power consumption data of the server before and after the adjustment of the fan rotating speed;
if the power consumption data after the adjustment of the fan rotating speed is smaller than the power consumption data before the adjustment, setting the adjusted fan rotating speed as the current fan rotating speed, and returning to the step of adjusting the fan rotating speed in the current adjusting direction by the preset step length;
and if the power consumption data after the adjustment of the rotating speed of the fan is larger than the power consumption data before the adjustment, setting the rotating speed of the fan after the adjustment as the current rotating speed, updating the current adjustment direction to be the direction opposite to the original current adjustment direction, and then returning to the step of adjusting the rotating speed of the fan in the current adjustment direction by the preset step length.
Optionally, before the step of adjusting the fan rotation speed in the current adjustment direction by the predetermined step size, the method further includes:
obtaining the temperature of each device of the server;
judging whether the temperature of each device of the server is within a preset temperature range or not;
if the judgment result is negative, adjusting the rotating speed of the fan for cooling the server through a preset temperature adjusting scheme until the temperature of each device meets a preset temperature range;
if the judgment result is yes, the step of adjusting the rotating speed of the fan to the current adjusting direction by the preset step length is carried out.
Optionally, the temperature of each device of the server is obtained by a temperature sensor built in each device.
Optionally, the adjusting the rotation speed of the fan to the current adjustment direction by the predetermined step length includes:
this step is performed at preset time intervals.
Optionally, the method further includes:
when the server is started, obtaining a first rotating speed of the fan capable of meeting the starting requirement of the server according to the operating environment temperature of the server;
initializing the first rotating speed as the current fan rotating speed.
Optionally, the obtaining, according to the operating environment temperature of the server, the first rotation speed of the fan that can meet the starting requirement of the server includes:
obtaining a second rotating speed which can enable the fan to be started normally;
obtaining a third rotating speed of the fan capable of meeting the operation requirement of the server according to the operation environment temperature of the server;
and selecting the higher one of the second rotating speed and the third rotating speed as the first rotating speed of the fan capable of meeting the starting requirement of the server.
Optionally, the power consumption data of the server is a sum of operating power consumptions of the devices of the server.
Optionally, the method further includes: and adjusting the preset step length according to a preset step length adjusting strategy.
This application provides a real-time adjusting device of server consumption simultaneously, the device is applied to the server operation in-process, includes:
the first rotating speed adjusting unit is used for adjusting the rotating speed of the fan to the current adjusting direction according to a preset step length on the basis of the current rotating speed of the fan; wherein the current adjustment direction is to increase the rotation speed of the fan or decrease the rotation speed of the fan;
the power consumption data comparison unit is used for comparing the power consumption data of the server before and after the fan rotating speed is adjusted;
a second rotation speed adjusting unit, configured to set the adjusted fan rotation speed as the current fan rotation speed if the power consumption data after the fan rotation speed adjustment is smaller than the power consumption data before the adjustment, and return to the step of adjusting the fan rotation speed in the current adjustment direction by the predetermined step length;
and a third rotating speed adjusting unit, configured to set the adjusted rotating speed of the fan as the current rotating speed if the power consumption data after the adjustment of the rotating speed of the fan is greater than the power consumption data before the adjustment, update the current adjustment direction to a direction opposite to the original current adjustment direction, and then return to the step of adjusting the rotating speed of the fan in the current adjustment direction by the predetermined step length.
Optionally, the apparatus further comprises:
the temperature acquisition unit is used for acquiring the temperature of each device of the server;
the temperature judging unit is used for judging whether the temperature of each device of the server is within a preset temperature range or not;
the temperature adjusting unit is used for adjusting the rotating speed of a fan for cooling the server through a preset temperature adjusting scheme when the temperature of each device of the server is not within a preset temperature range until the temperature of each device meets the preset temperature range;
and the skipping unit is used for entering the step of adjusting the rotating speed of the fan to the current adjusting direction by the preset step length when the temperature of each device of the server is within the preset temperature range.
Optionally, the temperature of each device of the server is obtained by a temperature sensor built in each device.
Optionally, the adjusting the rotation speed of the fan to the current adjustment direction by the predetermined step length includes:
this step is performed at preset time intervals.
Optionally, the apparatus further comprises:
the rotating speed initialization unit is used for obtaining a first rotating speed of the fan capable of meeting the starting requirement of the server according to the operating environment temperature of the server when the server is started; initializing the first rotating speed as the current fan rotating speed.
Optionally, the obtaining, according to the operating environment temperature of the server, the first rotation speed of the fan that can meet the starting requirement of the server includes:
obtaining a second rotating speed which can enable the fan to be started normally;
obtaining a third rotating speed of the fan capable of meeting the operation requirement of the server according to the operation environment temperature of the server;
and selecting the higher one of the second rotating speed and the third rotating speed as the first rotating speed of the fan capable of meeting the starting requirement of the server.
Optionally, the power consumption data of the server is a sum of operating power consumptions of the devices of the server.
This application provides an electronic equipment simultaneously, electronic equipment is applied to the server operation in-process, includes:
a processor; and
a memory for storing a program for implementing the method for adjusting the power consumption of the server, the apparatus executing the following steps after running the program by the processor:
on the basis of the current fan rotating speed, adjusting the fan rotating speed in the current adjusting direction according to a preset step length; wherein the current adjustment direction is to increase the rotation speed of the fan or decrease the rotation speed of the fan; comparing the power consumption data of the server before and after the adjustment of the fan rotating speed; if the power consumption data after the adjustment of the fan rotating speed is smaller than the power consumption data before the adjustment, setting the adjusted fan rotating speed as the current fan rotating speed, and returning to the step of adjusting the fan rotating speed in the current adjusting direction by the preset step length; and if the power consumption data after the adjustment of the rotating speed of the fan is larger than the power consumption data before the adjustment, setting the rotating speed of the fan after the adjustment as the current rotating speed, updating the current adjustment direction to be the direction opposite to the original current adjustment direction, and then returning to the step of adjusting the rotating speed of the fan in the current adjustment direction by the preset step length.
The present application also provides a computer storage medium, which is applied in a server operation process, and the computer storage medium stores a computer program, and when the program is executed, the computer program performs the following steps:
on the basis of the current fan rotating speed, adjusting the fan rotating speed in the current adjusting direction according to a preset step length; wherein the current adjustment direction is to increase the rotation speed of the fan or decrease the rotation speed of the fan; comparing the power consumption data of the server before and after the adjustment of the fan rotating speed; if the power consumption data after the adjustment of the fan rotating speed is smaller than the power consumption data before the adjustment, setting the adjusted fan rotating speed as the current fan rotating speed, and returning to the step of adjusting the fan rotating speed in the current adjusting direction by the preset step length; and if the power consumption data after the adjustment of the rotating speed of the fan is larger than the power consumption data before the adjustment, setting the rotating speed of the fan after the adjustment as the current rotating speed, updating the current adjustment direction to be the direction opposite to the original current adjustment direction, and then returning to the step of adjusting the rotating speed of the fan in the current adjustment direction by the preset step length.
The application also provides a real-time adjustment method for the power consumption of the server, which executes the following steps of adjusting the cooling fan of the server:
step 1, starting a server system;
step 2, judging whether the operating temperature of each electronic device of the server is lower than a preset temperature in real time;
if the judgment result of judging whether the operating temperature of each electronic device of the server is lower than the preset temperature is negative, further executing the step 3;
if the judgment result of judging whether the operating temperature of each electronic device of the server is lower than the preset temperature is yes, executing the step 4;
step 3, adjusting the rotating speed of the cooling fan through a control algorithm built in the server until the operating temperature of each electronic device in the server is within a preset temperature range;
step 4, acquiring the current rotating speed S1 of the cooling fan and the current average power consumption W1 of the server system;
step 5, increasing the rotation speed of the cooling fan by a preset step S1, wherein the rotation speed of the cooling fan after the increase is set to be S2, and S2 is S1+ the preset step;
step 6, recording average power consumption data W2 of the system after the rotating speed of the cooling fan is increased;
step 7, judging whether the power consumption data W2 after the rotating speed of the cooling fan is increased is smaller than the power consumption data W1 before the rotating speed of the cooling fan is increased;
if the power consumption data W2 after the rotating speed of the cooling fan is increased is less than the power consumption data W1 before the rotating speed of the cooling fan is increased, executing the step 8;
if the power consumption data W2 after the rotating speed of the cooling fan is increased is larger than the power consumption data W1 before the rotating speed of the cooling fan is increased, executing the step 9;
step 8, recording the current fan speed S1 being S2, the current average power consumption W1 being W2, and returning to execute step 5;
step 9, recording the current fan speed S1 as S2, and the current average power consumption W1 as W2;
step 10, reducing the rotation speed of the cooling fan by a predetermined step S1, wherein the reduced rotation speed of the cooling fan is set to S3, and S3 is S1-the predetermined step;
step 11, recording the average power consumption W3 of the system after the rotating speed of the cooling fan is reduced;
step 12, judging whether the power consumption data W3 after the rotating speed of the cooling fan is reduced is smaller than the power consumption data W1 before the rotating speed is reduced;
if the power consumption data W3 after the cooling fan speed is reduced is less than the power consumption data W1 before the cooling fan speed is reduced, executing the step 13;
if the power consumption data W3 after the cooling fan speed is reduced is larger than the power consumption data W1 before the cooling fan speed is reduced, executing the step 14;
step S13, adjusting the current fan speed S1 to S3, and the current average power consumption W1 to W3, and returning to step 10;
and step S14, adjusting the current fan speed S1 to S3, and the current average power consumption W1 to W3, and returning to step S4.
The application also provides a real-time adjustment method for the power consumption of the server, which executes the following steps of adjusting the cooling fan of the server:
step 1, starting a server system;
step 2, judging whether the operating temperature of each electronic device of the server is lower than a preset temperature in real time;
if the judgment result of judging whether the operating temperature of each electronic device of the server is lower than the preset temperature is negative, further executing the step 3;
if the judgment result of judging whether the operating temperature of each electronic device of the server is lower than the preset temperature is yes, executing the step 4;
step 3, adjusting the rotating speed of the cooling fan through a PID control algorithm or other control algorithms built in the server until the operating temperature of each electronic device in the server is within a preset temperature range;
step 4, acquiring the current rotating speed S1 of the cooling fan and the current average power consumption W1 of the server system;
step 5, reducing the rotation speed of the cooling fan by a preset step S1, wherein the rotation speed of the cooling fan after being reduced is set to be S2, and S2 is S1-the preset step;
step 6, recording average power consumption data W2 of the system after the rotating speed of the cooling fan is reduced;
step 7, judging whether the power consumption data W2 after the rotating speed of the cooling fan is reduced is smaller than the power consumption data W1 before the rotating speed is reduced;
if the power consumption data W2 after the cooling fan speed is reduced is less than the power consumption data W1 before the cooling fan speed is reduced, executing the step 8;
if the power consumption data W2 after the cooling fan speed is reduced is larger than the power consumption data W1 before the cooling fan speed is reduced, executing the step 9;
step 8, recording the current fan speed S1 being S2, the current average power consumption W1 being W2, and returning to execute step 5;
step 9, recording the current fan speed S1 as S2, and the current average power consumption W1 as W2;
step 10, increasing the rotation speed S1 of the cooling fan by a predetermined step, wherein the increased rotation speed of the cooling fan is set to S3, and S3 is S1+ the predetermined step;
step 11, recording the average power consumption W3 of the system after the rotating speed of the cooling fan is increased;
step 12, judging whether the power consumption data W3 after the rotating speed of the cooling fan is increased is smaller than the power consumption data W1 before the rotating speed of the cooling fan is increased;
if the power consumption data W3 after the rotating speed of the cooling fan is increased is less than the power consumption data W1 before the rotating speed of the cooling fan is increased, executing the step 13;
if the power consumption data W3 after the rotating speed of the cooling fan is increased is larger than the power consumption data W1 before the rotating speed of the cooling fan is increased, executing the step 14;
step S13, adjusting the current fan speed S1 to S3, and the current average power consumption W1 to W3, and returning to step 10;
and step S14, adjusting the current fan speed S1 to S3, and the current average power consumption W1 to W3, and returning to step S4.
Compared with the prior art, the method has the following advantages:
according to the implementation adjustment method for the power consumption of the server, the following steps of adjusting a fan for cooling the server are executed in the running process of the server: on the basis of the current fan rotating speed, adjusting the fan rotating speed in the current adjusting direction according to a preset step length; wherein the current adjustment direction is to increase the rotation speed of the fan or decrease the rotation speed of the fan; comparing the power consumption data of the server before and after the adjustment of the fan rotating speed; if the power consumption data after the adjustment of the fan rotating speed is smaller than the power consumption data before the adjustment, setting the adjusted fan rotating speed as the current fan rotating speed, and returning to the step of adjusting the fan rotating speed in the current adjusting direction by the preset step length; and if the power consumption data after the adjustment of the rotating speed of the fan is larger than the power consumption data before the adjustment, setting the rotating speed of the fan after the adjustment as the current rotating speed, updating the current adjustment direction to be the direction opposite to the original current adjustment direction, and then returning to the step of adjusting the rotating speed of the fan in the current adjustment direction by the preset step length. According to the method, the power consumption of the server is optimized and adjusted in real time by the ideas of rotating speed control and power consumption optimization, the rotating speed adjusting strategy of the fan is utilized, and the power consumption data before and after the rotating speed of the cooling fan of the server is adjusted are combined, so that the power consumption of the server can be kept at a better level all the time.
Drawings
FIG. 1 is a schematic diagram illustrating changes in power consumption of a server according to the present application;
fig. 2 is a flowchart of a method for adjusting server power consumption in real time according to a first embodiment of the present application;
fig. 3 is a schematic diagram of voltage equivalence in a PWM pulse width modulation process according to a first embodiment of the present application;
fig. 4 is a schematic view of an interaction structure of a BMC subsystem according to a first embodiment of the present application;
fig. 5a is a schematic diagram illustrating a first distribution of power consumption of a server when power consumption data after adjustment of a fan speed is smaller than the adjusted fan speed according to a first embodiment of the present application;
FIG. 5b is a diagram illustrating a second distribution of server power consumption according to the first embodiment of the present application;
fig. 5c is a schematic diagram of a third distribution of power consumption of a server according to the first embodiment of the present application;
fig. 6a is a flowchart of a method for adjusting power consumption of a server according to a second embodiment of the present application;
fig. 6b is a flowchart of a method for adjusting the power consumption of a server according to a second embodiment of the present application;
fig. 7 is a schematic structural diagram of a device for adjusting server power consumption in real time according to a third embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of embodiments in many different forms than those described herein and is therefore not limited to the specific embodiments disclosed below.
The application provides a method, a device and an electronic device for adjusting server power consumption in real time, and also provides a computer storage medium. Details are described in the following examples one by one.
In order to facilitate understanding of the method for adjusting the power consumption of the server in real time provided by the present application, a power consumption change rule of the server is introduced first.
During the operation of the server, various cooling fans are needed to dissipate heat from the server to ensure the normal operation of the server. For example: the server is integrally provided with a main cooling fan, and some processing chips with larger power consumption are provided with special cooling fans. The heat dissipation provided by these cooling fans is required to ensure that the server is in a normal operating state during operation, and above all, to ensure that the various electronic devices in the server are always operating within an allowable temperature range.
Since the cooling fan is an energy consuming element, the normal operation of the cooling fan can affect the overall power consumption of the server. Therefore, the overall power consumption of the server should be the sum of the cooling fan power consumption and the power consumption of the other various electronic devices in the server. During the operation of the server, the lower the rotation speed of the cooling fan, the lower the rotation speed corresponding to the cooling fan. In contrast, the lower the rotational speed of the cooling fan, the more power consumption of the various other electronic devices in the server gradually increases. That is to say, on the premise of meeting the working conditions of the server, the rotating speed of the cooling fan is increased, so that the heat dissipation effect of various electronic devices in the server is enhanced, the operating temperature of the electronic devices is reduced, and the power consumption of the electronic devices is effectively reduced; however, increasing the speed of the cooling fan increases its own power consumption. Besides the influence of the fan speed on the power consumption of the server, the power consumption of the server is related to a plurality of factors such as the load of the server in normal operation and the ambient temperature of the server. The power consumption of the server in the normal working state is not in a pure linear relation with the rotating speed of the cooling fan.
Therefore, on the premise of ensuring the normal operation of the server, selecting a proper rotating speed of the cooling fan to ensure that the overall power consumption of the server is low is an important technical problem in the field.
Please refer to fig. 1, which is a schematic diagram illustrating a variation of power consumption of a server according to the present application. In the server power consumption change diagram shown in fig. 1, the horizontal axis represents the rotational speed of the server cooling fan, and the vertical axis represents the power consumption of the server. As can be seen from the power consumption variation curve shown in fig. 1, the power consumption curve of the server is generally "V" along with the adjustment of the fan speed, that is, by adjusting the fan speed of the server, a better power consumption of the server meeting the normal operation of the server can be obtained. It can be understood that the power consumption curve shown in the server power consumption change diagram shown in fig. 1 of the present application is a power consumption change curve obtained by adjusting the rotation speed of the cooling fan under the condition that a plurality of factors such as the operating environment temperature and the operating load of the server are not changed, and the purpose is to illustrate the effect of the present invention. In the actual control process, the environmental temperature and the operation load are constantly changed, so that the rational state shown in fig. 1 cannot be obtained; however, with the technical solution of the present application, it is because of the continuous change of these influencing factors that the dynamic adjustment scheme provided by the technical solution of the present application has the advantage of continuously adapting to the changing situation.
In the field, a server is understood as a kind of computer, where the server provides computing or application services for other clients (e.g., PCs) in a network, and the server itself has high-speed CPU computing capability, long-time running capability, powerful I/O external data throughput capability, and good scalability. Generally, the server has the functions of bearing corresponding service requests and guaranteeing service quality after being started.
In the process of starting or operating the server, the rotating speed of the cooling fan may stay at any position on the horizontal axis in fig. 1, and the position is unknown.
Please refer to fig. 2, which is a flowchart illustrating a method for adjusting server power consumption in real time according to a first embodiment of the present application, specifically, the method performs the following steps of adjusting a fan for cooling a server during the operation of the server:
step S201, based on the current fan speed, adjusting the fan speed in the current adjustment direction by a predetermined step length.
In the first embodiment of the present application, the current adjustment direction refers to increasing the fan speed or decreasing the fan speed to adjust the fan speed, that is, gradually increasing or decreasing the fan speed according to a predetermined step.
The method aims to ensure that the server is always in a normal running state on the premise of reducing the running power consumption of the server. The reduction of the power consumption of the server is mainly realized by adjusting the rotating speed of the cooling fan, namely, the overall power consumption of the server is reduced by adjusting the operating temperature of various electronic devices of the server. It can be understood that, in the process of adjusting the rotating speed of the cooling fan, it is also required to ensure that each operating condition of the server meets the preset operating standard. The operation standard mainly means that the operation temperature of each electronic device of the server is in a preset temperature range.
The preset temperature range is an early warning temperature value. In the actual operation process of the server, the operating temperature may be higher than the preset temperature due to a higher operating load of the server or a higher ambient temperature, but the normal operation of the server is not affected if the operating temperature of the server exceeds the preset temperature range in a short time, but at this time, the operating state of the server may be at a critical point that is about to crash. In response to this situation, the operating temperature of each electronic device in the server needs to be adjusted by adjusting the rotation speed of the cooling fan to meet the preset temperature. In a specific application process, in the process of adjusting the operating temperature of the server to be within a preset temperature range, the adjustment of the rotating speed of the cooling fan is realized by adopting a PID control algorithm or other common control algorithms in the field. Specifically, in the process of adjusting the operating temperature of the server to be within the preset temperature range, the adjustment of the rotating speed of the cooling fan includes the following steps S201-1 to S201-4:
step S201-1, obtaining the temperature of each device of the server.
The temperature of each device of the server refers to the operating temperature of each electronic device in the server, and can be obtained through a temperature sensor built in the device.
Step S201-2, judging whether the temperature of each device of the server is in a preset temperature range.
And step S201-3, if the judgment result is negative, adjusting the rotating speed of the fan for cooling the server by a preset temperature adjusting scheme until the temperature of each device meets a preset temperature range.
And step S201-4, if the judgment result is yes, the step of adjusting the rotating speed of the fan to the current adjusting direction by the preset step length is carried out.
The preset temperature adjusting scheme is that the rotating speed of the fan is adjusted based on a PID control algorithm or other common control algorithms built in the server, so that the temperature of each device of the server is within a preset range. Since the built-in PID control algorithm or other common control algorithms of the server are in the prior art, and this part is not within the scope of the present application. Therefore, the embodiment of the present application does not describe the above process of adjusting the fan rotation speed based on the PID algorithm and other common control algorithms built in the server to keep the operating temperature of each device of the server within the preset temperature range.
Under the condition that the operation temperature of each electronic device in the server is ensured to be within the preset temperature range, the method for adjusting the power consumption of the server in real time provided by the embodiment of the application is implemented, so that the overall power consumption of the server is ensured to be always in a lower state.
In addition, in an alternative embodiment of the present application, the current fan speed in step S201 may be an initial speed when the server starts up, that is, in a case where the server starts up, the speed of the cooling fan is initialized, and then step S201 of the present application is executed.
Specifically, when the server is started, the initialization of the rotational speed of the cooling fan includes the following steps S201-a and S201-b.
Step S201-a, when the server is started, according to the operating environment temperature of the server, obtaining a first rotating speed of the fan capable of meeting the starting requirement of the server.
Wherein the first rotational speed is a cooling fan rotational speed for initializing a fan rotational speed.
Step S201-b, initializing the first rotating speed as the current fan rotating speed.
In step S201-b, the current fan speed obtained by initialization is the critical fan speed for normal server startup.
Specifically, the obtaining a first rotation speed of the fan capable of meeting the server start-up requirement according to the operating environment temperature of the server includes:
obtaining a second rotating speed which can enable the fan to be started normally; obtaining a third rotating speed of the fan capable of meeting the operation requirement of the server according to the operation environment temperature of the server; and selecting the higher one of the second rotating speed and the third rotating speed as the first rotating speed of the fan capable of meeting the starting requirement of the server.
The second rotating speed capable of enabling the fan to be normally started is the critical rotating speed for starting the fan, and the corresponding third rotating speed of the fan meeting the operation requirement of the server is the critical rotating speed for normally starting the server. That is, of the threshold rotational speed at which the fan can be started and the threshold rotational speed at which the normal start of the server can be satisfied, the larger one is selected as the first rotational speed.
In step S201, the predetermined step size may be understood as an amount of change of the fan speed each time the fan speed is adjusted, and in an alternative embodiment of the present application, the predetermined step size is 1%, that is, the fan speed is adjusted by 1% each time. For example, if the current fan speed is 500r/min, the fan speed is 505r/min or 495r/min after step S201 is executed. Of course, the step size can also be set to a fixed rotational speed value, for example 5 r/min.
In the process of adjusting the rotating speed of the fan in real time, the preset step length can be adjusted according to a preset step length adjusting strategy; the preset step size adjustment strategy can have various selectable schemes, and specific modes are detailed later.
It can be understood that the method for adjusting the rotating speed of the fan is performed in real time, and in the process of running the server, factors influencing the power consumption of the server, such as the running load of the server, the running environment temperature and the like, are all uncontrollable factors which change constantly. After the fan speed is adjusted, since the server itself is in an operating state, and in order to ensure a normal operating state of the server, the fan speed may also be changed due to a temperature change during a next adjustment period. Therefore, in an alternative embodiment of the present application, it is also necessary to collect the fan speed and adjust the fan speed according to a preset time interval. The collection of the fan rotating speed can be realized based on a fan rotating speed collecting unit arranged in the server.
In the embodiment of the application, the current rotating speed of the cooling fan of the server can be realized by a fan rotating speed acquisition unit arranged in the server. For the adjustment of the rotating speed of the fan, the voltage at two ends of the coil of the fan motor can be controlled through Pulse Width Modulation (PWM), and the adjustment is realized by changing the voltage. The principle of PWM pulse width modulation is as follows:
please refer to fig. 3, which is a schematic diagram illustrating voltage equivalence in a PWM pulse width modulation process according to a first embodiment of the present application. That is to say, in the process of powering on the fan motor, the PWM generated by the single chip microcomputer continuously controls the open/close state of the fan Field Effect Transistor (FET), so that the coil of the fan motor is repeatedly powered on or powered off, the longer the time of each power on, the larger the equivalent voltage at the two ends of the coil of the fan motor, the larger the generated magnetic field strength, the faster the motor rotor rotates (i.e. the faster the fan speed), and conversely, the slower the fan speed.
And step S202, comparing the power consumption data of the server before and after the adjustment of the fan rotating speed.
In order to ensure the normal operation of the server, the server includes devices such as a memory, a CPU processor, an internal bus, and a power supply. In the first embodiment of the present application, the power consumption data of the server refers to the total power consumption of each device in the server, including the power consumption of the cooling fan itself and the power consumption of each electronic device in the server.
In the first embodiment of the present application, the collection of the power consumption data of the server and the speed regulation of the cooling fan are performed almost simultaneously. For example, assuming that the adjustment process of the cooling fan is performed according to a preset adjustment period, the collection of the server power consumption data may also be performed according to a collection period that is the same as the adjustment period. The server power consumption data may also be acquired after the cooling fan is adjusted in speed, for example, after the fan speed acquisition unit for acquiring the rotational speed of the cooling fan determines that the rotational speed of the fan changes, an acquisition instruction is sent to the device for acquiring the server power consumption, so that the server acquisition device acquires the server power consumption data.
Specifically, the power consumption data of the server is obtained through a BMC (Baseboard management Controller) inside the server system, where the BMC is an independent subsystem in the server and may interact with a signal transmission system and an operating system in the server to manage the temperature, the power supply, and the like of the entire server. Please refer to fig. 4, which is a schematic diagram of a BMC subsystem interaction structure according to a first embodiment of the present application.
Fig. 4 includes: the system comprises a BMC chip 401, an I/O chip 402, a network interface controller 403, a serial interface connector 404, a switch logic controller 405 and an intelligent platform controller 406 which are deployed in the server.
The BMC chip 401 manages each element by obtaining data generated by each element. In the first embodiment of the present application, the BMC chip 401 mainly obtains the power consumption data of each of the above elements, and further determines the total power consumption data of the server.
It is to be understood that the connection relationship between the BMC chip 401 and each element and the data transmission relationship according to fig. 4 are only for facilitating understanding of the present application. In other embodiments, the BMC chip 401 may also obtain power consumption data of other elements in the server system, which is not limited in this application.
In the process of adjusting the power consumption of the server by adjusting the fan speed, the position of the fan speed in fig. 1 is unknown. Therefore, it is unknown whether the method of increasing the rotation speed of the fan in predetermined steps provided in step S201 of the first embodiment of the present application can reduce the power consumption of the server, it is unknown whether the power consumption data of the server has reached the extreme point shown in fig. 1, and it is also position whether the power consumption data of the server can be continuously reduced in such a manner that the rotation speed of the cooling fan is continuously adjusted in the current adjustment direction. Therefore, after the rotation speed of the fan is adjusted each time, the power consumption data before and after the adjustment of the rotation speed of the fan needs to be compared.
Step S203, if the power consumption data after the fan rotating speed is adjusted is smaller than the power consumption data before the fan rotating speed is adjusted, the adjusted fan rotating speed is set as the current fan rotating speed, and the step of adjusting the fan rotating speed in the current adjusting direction by the preset step length is returned.
If the power consumption data after the adjustment of the rotating speed of the fan is smaller than the power consumption data before the adjustment, the current adjustment direction is correct. Please refer to fig. 5a, which is a first distribution diagram of the server power consumption when the power consumption data after the adjustment of the fan speed is smaller than the adjusted fan speed according to the first embodiment of the present application. That is, assuming that the power consumption data after the fan speed adjustment is W2, the power consumption data before the fan speed adjustment is W1, and W2 < W1, it means that if the fan speed continues to be increased at predetermined time intervals, the power consumption of the server continues to be reduced for a while until it falls to a desired extreme point. In this case, therefore, the step of returning to the adjustment of the fan rotation speed in the current adjustment direction by a predetermined step size is continuously performed. Until the power consumption before the adjustment of the rotating speed of the fan is smaller than the power consumption data after the adjustment. Step S204 is then performed. In an optional implementation manner of the present application, if it is reasonable to always adjust the rotation speed of the fan according to the current adjustment direction, and after the rotation speed of the fan is adjusted for multiple times, a situation occurs in which the power consumption before the adjustment of the rotation speed of the fan is greater than the power consumption data after the adjustment. The preset step length can be further adjusted to be one half of the original preset step length according to a preset step length adjusting strategy, and the rotating speed of the fan is further adjusted according to the reverse direction opposite to the current adjusting direction until the condition that the power consumption before the rotating speed of the fan is adjusted is smaller than the adjusted power consumption data occurs again. So that the adjusted power consumption of the server is closer to the minimum value of the power consumption.
To facilitate understanding of the above-mentioned process of adjusting the predetermined step size to be one-half of the original predetermined step size and further adjusting the rotation speed of the fan according to the reverse direction opposite to the current adjustment direction. Please refer to fig. 5b, which is a diagram illustrating a second distribution of power consumption of a server according to the first embodiment of the present application.
If it is reasonable to adjust the fan speed in the current adjustment direction, if the power consumption W1 before the adjustment of the fan speed is less than the adjusted power consumption data W2, which means that there is a high possibility that the minimum value of the power consumption of the server exists between the power consumption W1 and the power consumption W2, then further adjusting the fan speed in the opposite direction by one third of the predetermined step size on the basis of the corresponding fan speed when the power consumption of the server is W2 would be that the power consumption of the server is further close to the minimum value of the power consumption of the server, so that the server can operate with better power consumption.
Step S204, if the power consumption data after the adjustment of the fan rotating speed is larger than the power consumption data before the adjustment, the adjusted fan rotating speed is set as the current rotating speed, the current adjustment direction is updated to be the direction opposite to the original current adjustment direction, and then the step of adjusting the fan rotating speed in the current adjustment direction by the preset step length is returned.
If the power consumption data after the adjustment of the fan rotation speed is greater than the power consumption data before the adjustment, it means that the current adjustment direction is wrong, please refer to fig. 5c, which is a third distribution diagram of the power consumption of the server provided in the first embodiment of the present application. That is, assuming that the power consumption data after the fan speed adjustment is W2, the power consumption data before the fan speed adjustment is W1, and W1 < W2, the power consumption of the server continues to increase if the fan speed continues to be increased at predetermined time intervals.
At this time, the adjustment direction of the fan rotation speed needs to be adjusted and updated immediately, so that the updated adjustment direction of the current fan rotation speed is opposite to the original current adjustment direction. And then adjusting the rotating speed of the fan according to the current adjusting direction by a preset step length.
As described in the above embodiments, the predetermined step adjustment strategy may take a variety of forms; the above-mentioned general use of equal step length, when the adjustment direction conversion occurs, it is a feasible adjustment strategy to reduce the step length by a certain proportion; in addition, other adjustment strategies may also be employed.
For example, a fixed step adjustment strategy may be used entirely, the fixed step being a fixed rotational speed, or a fixed proportion of the current rotational speed, for example 10% or 5%. Under the strategy, the control strategy is simpler.
Alternatively, in step S202, in the step of comparing the power consumption data of the server before and after the adjustment of the fan speed, an appropriate step size may be set according to the comparison result; for example, a corresponding table of the difference value of the power consumption data before and after adjustment and the step length is established, in the table, the smaller the difference value of the power consumption data before and after adjustment, the smaller the corresponding step length, and the specific corresponding relationship can be determined according to an experiment or theoretical model; in step S203 and step S204, the step length is set according to the correspondence relationship, and the process returns to step S201.
In order to facilitate understanding of the method for adjusting the power consumption of the server provided by the present application, the method for adjusting the power consumption of the server provided by the present application in real time is described below with reference to fig. 6a and 6 b. Fig. 6a and fig. 6b are two different real-time adjustment methods for server power consumption according to a second embodiment of the present application, respectively.
Fig. 6a is a first method for adjusting power consumption of a server in real time according to a second embodiment of the present application. The method comprises the following steps S601 a-S614 a.
In step S601a, the server system is started.
The starting of the server system is to start the server system. It is understood that the step S601a can also be understood as a case where the server system is operating normally.
Step S602a, determining in real time whether the operating temperature of each electronic device of the server is lower than a preset temperature.
In the process of executing the method for adjusting the power consumption of the server in real time, it is necessary to ensure that each electronic device of the server is in a normal operating state in real time.
If the determination result of determining whether the operating temperature of each electronic device of the server is lower than the preset temperature is no, step S603a is further performed.
In step S603a, the rotation speed of the cooling fan is adjusted by a PID control algorithm or other control algorithms built in the server. Until the operating temperature of each electronic device in the server is within a preset temperature range.
If the judgment result of judging whether the operating temperature of each electronic device of the server is lower than the preset temperature is no, determining that the server is in a normal operating state, and proceeding to step S604.
In step S604a, the current rotation speed of the cooling fan S1 and the current average power consumption W1 of the server system are obtained.
The current rotation speed S1 of the cooling fan is the rotation speed corresponding to the cooling fan during the execution of the method for adjusting the power consumption of the server. While acquiring the current rotating speed S1 of the cooling fan, determining power consumption data W1 corresponding to the server, wherein the power consumption data comprises: the power consumption of the cooling fan itself and the average power consumption W1 of the other electronics in the server. After determining the current rotation speed of the cooling fan S1 and the current average power consumption W1 of the server, the flow proceeds to step S605 a.
In step S605a, the rotation speed of the cooling fan is increased by a predetermined step size S1, where the rotation speed of the cooling fan after the increase is set to S2, and S2 is S1+ S1 × 1%.
The predetermined step size is a change amount of the fan rotation speed each time the fan rotation speed is adjusted, and in the second embodiment of the present application, the predetermined step size is 1%, and the rotation speed of the fan is adjusted by 1% each time. When the rotating speed of the fan is increased, power consumption data corresponding to the server after the rotating speed of the fan is increased also needs to be recorded.
In step S606a, average power consumption data W2 of the system after the cooling fan speed is increased is recorded.
The average power consumption W2 recorded in step S606a is the average power consumption corresponding to the system after the rotation speed of the cooling fan is increased. After the above-described steps S602a and S603a are performed, a step S607a of power consumption determination is performed.
In step S607a, it is determined whether the power consumption data W2 after the cooling fan speed is raised is smaller than the power consumption data W1 before the raising.
If the power consumption data of the cooling fan after the rotating speed of the cooling fan is increased W2 is smaller than the power consumption data before the rotating speed of the cooling fan is increased W1, the fact that the rotating speed of the cooling fan is increased on the basis of the current rotating speed S1 is shown to reduce the average power consumption of the system. In this case, step S608a is performed.
In step S608a, the current fan speed S1 is recorded as S2, the current average power consumption W1 is recorded as W2, and the process returns to step S605 a.
And repeating the steps until the power consumption data W2 after the rotating speed of the cooling fan is increased is larger than the power consumption data W1 before the rotating speed is increased, and completing the rotating speed increasing small-cycle process.
In the process of adjusting the fan speed to reduce the power consumption of the server through the above steps S605a to S608a, the power consumption of the server may suddenly change due to the change of the server load and the operating environment temperature, for example: in the process of sudden increase of the server load, the operation power consumption of the server is inevitably correspondingly increased. In the method for adjusting the power consumption of the server in real time provided by the embodiment of the application, no matter the condition that the power consumption data after the rotating speed of the fan is increased is larger than the power consumption data before the rotating speed of the fan is increased due to the change of the operating environment of the server; or simply the situation that the power consumption data after the fan rotating speed is increased is larger than the power consumption data before the fan rotating speed is increased due to the change of the fan rotating speed. Upon occurrence of the above, the flow proceeds to step S609 a.
In step S609a, the current fan speed S1 is recorded as S2, and the current average power consumption W1 of the system is recorded as W2.
The purpose of step S609a is to update the rotation speed and average power consumption of the cooling fan, so as to execute the step of rotating speed reduction small cycle. After the above step S609a is performed, step S610a is performed.
Step S610a is executed to decrease the rotation speed of the cooling fan S1 by a predetermined step size, where the decreased rotation speed of the cooling fan is set to S3, and S3 is S1-S1 × 1%.
In step S610a, the predetermined step is the same as the step in step S605a, and is 1% of the current fan speed S1. After the above step S610a is executed, the process proceeds to step S611 a.
In step S611a, the average power consumption W3 of the system after the cooling fan speed is reduced is recorded.
The average power consumption W3 recorded in step S611a is the average power consumption corresponding to the system after the rotation speed of the cooling fan is reduced. After the above-described steps S610a and S611a are performed, a step S612a of power consumption determination is performed.
In step S612a, it is determined whether the power consumption data W3 after the cooling fan rotation speed is reduced is smaller than the power consumption data W1 before the reduction.
If the power consumption data W3 after the cooling fan speed is reduced is smaller than the power consumption data W1 before the cooling fan speed is reduced, it is shown that the average power consumption of the server system can be reduced by reducing the fan speed on the basis of the current speed S1. In this case, step S613a is executed.
In step S613a, the current fan speed S1 is adjusted to S3, the current average power consumption W1 of the system is adjusted to W3, and the process returns to step S610 a.
This is repeated until the power consumption data W3 after the reduction of the rotational speed of the cooling fan becomes larger than the power consumption data W1 before the reduction, and the process of the rotational speed reduction small cycle is completed.
In step S612a, if the power consumption data W3 after the cooling fan rotation speed is reduced is larger than the power consumption data W1 before the reduction, it is indicated that a further change in the rotation speed adjustment direction is required. And proceeds to step S614 a.
In step S614a, the current fan speed S1 is adjusted to S3, the current average power consumption W1 is adjusted to W3, and the process returns to step S604 a.
The purpose of step S614a is to update the current rotation speed and the average power consumption of the cooling fan, so as to re-enter the rotation speed increasing small cycle step to complete the rotation speed adjusting large cycle.
In fig. 6b, the process of adjusting the rotation speed is substantially the same as the steps S601a to S613a, that is, after the server system is started, the rotation speed reduction loop is executed first when the operating temperature of the server is determined to meet the preset temperature; entering a rotating speed increasing small cycle under the condition that the power consumption data after the rotating speed is reduced is larger than the power consumption data before the rotating speed is reduced; and returning to the rotation speed small cycle under the condition that the power consumption data after the rotation speed is increased is larger than the power consumption data before the rotation speed is increased, and further completing the rotation speed large cycle.
The third embodiment of the present application further provides a device for adjusting power consumption of a server in real time. Since the embodiment of the apparatus is basically similar to the first embodiment and the second embodiment, the description is relatively simple, and for the relevant points, reference may be made to the real-time adjustment method for the power consumption of the server provided in the first embodiment and the second embodiment. The device embodiments described below are merely illustrative.
Please refer to fig. 7, which is a schematic structural diagram of a device for real-time adjustment of server power consumption according to a third embodiment of the present application.
The device includes:
a first speed adjustment unit 701, configured to adjust the fan speed in a current adjustment direction by a predetermined step length on the basis of the current fan speed; wherein the current adjustment direction is to increase the rotation speed of the fan or decrease the rotation speed of the fan;
a power consumption data comparing unit 702, configured to compare power consumption data of the server before and after the adjustment of the fan rotation speed;
a second rotation speed adjusting unit 703, configured to set the adjusted fan rotation speed as the current fan rotation speed if the power consumption data after the fan rotation speed adjustment is smaller than the power consumption data before the adjustment, and return to the step of adjusting the fan rotation speed in the current adjustment direction by the predetermined step length;
a third rotation speed adjusting unit 704, configured to set the adjusted fan rotation speed as the current rotation speed if the power consumption data after the fan rotation speed adjustment is greater than the power consumption data before the adjustment, update the current adjustment direction to a direction opposite to the original current adjustment direction, and then return to the step of adjusting the fan rotation speed in the current adjustment direction by the predetermined step length.
Optionally, the apparatus further comprises:
the temperature acquisition unit is used for acquiring the temperature of each device of the server;
the temperature judging unit is used for judging whether the temperature of each device of the server is within a preset temperature range or not;
the temperature adjusting unit is used for adjusting the rotating speed of a fan for cooling the server through a preset temperature adjusting scheme when the temperature of each device of the server is not within a preset temperature range until the temperature of each device meets the preset temperature range;
and the skipping unit is used for entering the step of adjusting the rotating speed of the fan to the current adjusting direction by the preset step length when the temperature of each device of the server is within the preset temperature range.
Optionally, the temperature of each device of the server is obtained by a temperature sensor built in each device.
Optionally, the adjusting the rotation speed of the fan to the current adjustment direction by the predetermined step length includes:
this step is performed at preset time intervals.
Optionally, the apparatus further comprises:
the rotating speed initialization unit is used for obtaining a first rotating speed of the fan capable of meeting the starting requirement of the server according to the operating environment temperature of the server when the server is started; initializing the first rotating speed as the current fan rotating speed.
Optionally, the obtaining, according to the operating environment temperature of the server, the first rotation speed of the fan that can meet the starting requirement of the server includes:
obtaining a second rotating speed which can enable the fan to be started normally;
obtaining a third rotating speed of the fan capable of meeting the operation requirement of the server according to the operation environment temperature of the server;
and selecting the higher one of the second rotating speed and the third rotating speed as the first rotating speed of the fan capable of meeting the starting requirement of the server.
Optionally, the power consumption data of the server is a sum of operating power consumptions of the devices of the server.
Corresponding to the above method embodiment and apparatus embodiment, the fourth embodiment of the present application further provides an electronic device, which is substantially similar to the above method embodiment and apparatus embodiment, so that the description is relatively simple, and for the relevant points, reference may be made to partial descriptions of the above method embodiment and apparatus embodiment, and the following description of the electronic device provided by the present application is only illustrative.
Please refer to fig. 8, which is a schematic structural diagram of an electronic device according to a fourth embodiment of the present application.
The electronic device includes:
a processor 801;
and a memory 802 for storing a program for implementing the method for adjusting the power consumption of the server, the apparatus executing the following steps after running the program by the processor:
on the basis of the current fan rotating speed, adjusting the fan rotating speed in the current adjusting direction according to a preset step length; wherein the current adjustment direction is to increase the rotation speed of the fan or decrease the rotation speed of the fan; comparing the power consumption data of the server before and after the adjustment of the fan rotating speed; if the power consumption data after the adjustment of the fan rotating speed is smaller than the power consumption data before the adjustment, setting the adjusted fan rotating speed as the current fan rotating speed, and returning to the step of adjusting the fan rotating speed in the current adjusting direction by the preset step length; and if the power consumption data after the adjustment of the rotating speed of the fan is larger than the power consumption data before the adjustment, setting the rotating speed of the fan after the adjustment as the current rotating speed, updating the current adjustment direction to be the direction opposite to the original current adjustment direction, and then returning to the step of adjusting the rotating speed of the fan in the current adjustment direction by the preset step length.
The fifth embodiment of the present application further provides a computer storage medium, where the computer storage medium is applied in a server operation process, and the computer storage medium stores a computer program, and when the program is executed, the computer program performs the following steps:
on the basis of the current fan rotating speed, adjusting the fan rotating speed in the current adjusting direction according to a preset step length; wherein the current adjustment direction is to increase the rotation speed of the fan or decrease the rotation speed of the fan; comparing the power consumption data of the server before and after the adjustment of the fan rotating speed; if the power consumption data after the adjustment of the fan rotating speed is smaller than the power consumption data before the adjustment, setting the adjusted fan rotating speed as the current fan rotating speed, and returning to the step of adjusting the fan rotating speed in the current adjusting direction by the preset step length; and if the power consumption data after the adjustment of the rotating speed of the fan is larger than the power consumption data before the adjustment, setting the rotating speed of the fan after the adjustment as the current rotating speed, updating the current adjustment direction to be the direction opposite to the original current adjustment direction, and then returning to the step of adjusting the rotating speed of the fan in the current adjustment direction by the preset step length.
It should be noted that, for the detailed description of the computer storage medium provided in the fifth embodiment of the present application, reference may be made to the above description of the method embodiment, and details are not repeated here.
Although the present application has been described with reference to the preferred embodiments, it is not intended to limit the present application, and those skilled in the art can make variations and modifications without departing from the spirit and scope of the present application, therefore, the scope of the present application should be determined by the claims that follow.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
1. Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transmitter 7 media), such as modulated data signals and carrier waves.
2. It will be apparent to those skilled in the art that embodiments of the present application may be provided as a system or an electronic device. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.

Claims (13)

1. A real-time adjustment method for server power consumption is characterized in that in the running process of a server, the following steps of adjusting a fan for cooling the server are executed:
on the basis of the current fan rotating speed, adjusting the fan rotating speed in the current adjusting direction according to a preset step length; wherein the current adjustment direction is to increase the rotation speed of the fan or decrease the rotation speed of the fan;
comparing the power consumption data of the server before and after the adjustment of the fan rotating speed;
if the power consumption data after the adjustment of the fan rotating speed is smaller than the power consumption data before the adjustment, setting the adjusted fan rotating speed as the current fan rotating speed, and returning to the step of adjusting the fan rotating speed in the current adjusting direction by the preset step length;
and if the power consumption data after the adjustment of the rotating speed of the fan is larger than the power consumption data before the adjustment, setting the rotating speed of the fan after the adjustment as the current rotating speed, updating the current adjustment direction to be the direction opposite to the original current adjustment direction, and then returning to the step of adjusting the rotating speed of the fan in the current adjustment direction by the preset step length.
2. The method for real-time adjustment of power consumption of a server according to claim 1, wherein before the step of adjusting the fan speed in the current adjustment direction by a predetermined step size, the method further comprises:
obtaining the temperature of each device of the server;
judging whether the temperature of each device of the server is within a preset temperature range or not;
if the judgment result is negative, adjusting the rotating speed of the fan for cooling the server through a preset temperature adjusting scheme until the temperature of each device meets a preset temperature range;
if the judgment result is yes, the step of adjusting the rotating speed of the fan to the current adjusting direction by the preset step length is carried out.
3. The method for adjusting the power consumption of the server according to claim 1, wherein the temperature of each device of the server is obtained by a temperature sensor built in each device.
4. The method for real-time adjustment of power consumption of a server according to claim 1, wherein the adjusting of the fan speed in the current adjustment direction by a predetermined step size comprises:
this step is performed at preset time intervals.
5. The method for real-time adjustment of server power consumption according to claim 1, further comprising:
when the server is started, obtaining a first rotating speed of the fan capable of meeting the starting requirement of the server according to the operating environment temperature of the server;
initializing the first rotating speed as the current fan rotating speed.
6. The method for adjusting the power consumption of the server according to claim 5, wherein the obtaining a first rotation speed of the fan capable of meeting the starting requirement of the server according to the operating environment temperature of the server comprises:
obtaining a second rotating speed which can enable the fan to be started normally;
obtaining a third rotating speed of the fan capable of meeting the operation requirement of the server according to the operation environment temperature of the server;
and selecting the higher one of the second rotating speed and the third rotating speed as the first rotating speed of the fan capable of meeting the starting requirement of the server.
7. The method for adjusting the power consumption of the server according to claim 1, wherein the power consumption data of the server is a sum of operating power consumptions of the devices of the server.
8. The method for real-time adjustment of power consumption of a server according to claim 1, further comprising: and adjusting the preset step length according to a preset step length adjusting strategy.
9. A device for adjusting the power consumption of a server in real time is applied to the operation process of the server and comprises the following components:
the first rotating speed adjusting unit is used for adjusting the rotating speed of the fan to the current adjusting direction according to a preset step length on the basis of the current rotating speed of the fan; wherein the current adjustment direction is to increase the rotation speed of the fan or decrease the rotation speed of the fan;
the power consumption data comparison unit is used for comparing the power consumption data of the server before and after the fan rotating speed is adjusted;
a second rotation speed adjusting unit, configured to set the adjusted fan rotation speed as the current fan rotation speed if the power consumption data after the fan rotation speed adjustment is smaller than the power consumption data before the adjustment, and return to the step of adjusting the fan rotation speed in the current adjustment direction by the predetermined step length;
and a third rotating speed adjusting unit, configured to set the adjusted rotating speed of the fan as the current rotating speed if the power consumption data after the adjustment of the rotating speed of the fan is greater than the power consumption data before the adjustment, update the current adjustment direction to a direction opposite to the original current adjustment direction, and then return to the step of adjusting the rotating speed of the fan in the current adjustment direction by the predetermined step length.
10. An electronic device, wherein the electronic device is applied to a server operation process, and the electronic device comprises:
a processor; and
a memory for storing a program for implementing the method for adjusting the power consumption of the server, the apparatus executing the following steps after running the program by the processor:
on the basis of the current fan rotating speed, adjusting the fan rotating speed in the current adjusting direction according to a preset step length; wherein the current adjustment direction is to increase the rotation speed of the fan or decrease the rotation speed of the fan; comparing the power consumption data of the server before and after the adjustment of the fan rotating speed; if the power consumption data after the adjustment of the fan rotating speed is smaller than the power consumption data before the adjustment, setting the adjusted fan rotating speed as the current fan rotating speed, and returning to the step of adjusting the fan rotating speed in the current adjusting direction by the preset step length; and if the power consumption data after the adjustment of the rotating speed of the fan is larger than the power consumption data before the adjustment, setting the rotating speed of the fan after the adjustment as the current rotating speed, updating the current adjustment direction to be the direction opposite to the original current adjustment direction, and then returning to the step of adjusting the rotating speed of the fan in the current adjustment direction by the preset step length.
11. A computer storage medium for use in a server, the computer storage medium storing a computer program that, when executed, performs the steps of:
on the basis of the current fan rotating speed, adjusting the fan rotating speed in the current adjusting direction according to a preset step length; wherein the current adjustment direction is to increase the rotation speed of the fan or decrease the rotation speed of the fan; comparing the power consumption data of the server before and after the adjustment of the fan rotating speed; if the power consumption data after the adjustment of the fan rotating speed is smaller than the power consumption data before the adjustment, setting the adjusted fan rotating speed as the current fan rotating speed, and returning to the step of adjusting the fan rotating speed in the current adjusting direction by the preset step length; and if the power consumption data after the adjustment of the rotating speed of the fan is larger than the power consumption data before the adjustment, setting the rotating speed of the fan after the adjustment as the current rotating speed, updating the current adjustment direction to be the direction opposite to the original current adjustment direction, and then returning to the step of adjusting the rotating speed of the fan in the current adjustment direction by the preset step length.
12. A real-time adjustment method for server power consumption is characterized by executing the following steps of adjusting a server cooling fan:
step 1, starting a server system;
step 2, judging whether the operating temperature of each electronic device of the server is lower than a preset temperature in real time;
if the judgment result of judging whether the operating temperature of each electronic device of the server is lower than the preset temperature is negative, further executing the step 3;
if the judgment result of judging whether the operating temperature of each electronic device of the server is lower than the preset temperature is yes, executing the step 4;
step 3, adjusting the rotating speed of the cooling fan through a control algorithm built in the server until the operating temperature of each electronic device in the server is within a preset temperature range;
step 4, acquiring the current rotating speed S1 of the cooling fan and the current average power consumption W1 of the server system;
step 5, increasing the rotation speed of the cooling fan by a preset step S1, wherein the rotation speed of the cooling fan after the increase is set to be S2, and S2 is S1+ the preset step;
step 6, recording average power consumption data W2 of the system after the rotating speed of the cooling fan is increased;
step 7, judging whether the power consumption data W2 after the rotating speed of the cooling fan is increased is smaller than the power consumption data W1 before the rotating speed of the cooling fan is increased;
if the power consumption data W2 after the rotating speed of the cooling fan is increased is less than the power consumption data W1 before the rotating speed of the cooling fan is increased, executing the step 8;
if the power consumption data W2 after the rotating speed of the cooling fan is increased is larger than the power consumption data W1 before the rotating speed of the cooling fan is increased, executing the step 9;
step 8, recording the current fan speed S1 being S2, the current average power consumption W1 being W2, and returning to execute step 5;
step 9, recording the current fan speed S1 as S2, and the current average power consumption W1 as W2;
step 10, reducing the rotation speed of the cooling fan by a predetermined step S1, wherein the reduced rotation speed of the cooling fan is set to S3, and S3 is S1-the predetermined step;
step 11, recording the average power consumption W3 of the system after the rotating speed of the cooling fan is reduced;
step 12, judging whether the power consumption data W3 after the rotating speed of the cooling fan is reduced is smaller than the power consumption data W1 before the rotating speed is reduced;
if the power consumption data W3 after the cooling fan speed is reduced is less than the power consumption data W1 before the cooling fan speed is reduced, executing the step 13;
if the power consumption data W3 after the cooling fan speed is reduced is larger than the power consumption data W1 before the cooling fan speed is reduced, executing the step 14;
step 13, adjusting the current fan speed S1 to S3, and the current average power consumption W1 to W3, and returning to execute step 10;
and step 14, adjusting the current fan speed S1 to S3, adjusting the current average power consumption W1 to W3, and returning to the step 4.
13. A real-time adjustment method for server power consumption is characterized by executing the following steps of adjusting a server cooling fan:
step 1, starting a server system;
step 2, judging whether the operating temperature of each electronic device of the server is lower than a preset temperature in real time;
if the judgment result of judging whether the operating temperature of each electronic device of the server is lower than the preset temperature is negative, further executing the step 3;
if the judgment result of judging whether the operating temperature of each electronic device of the server is lower than the preset temperature is yes, executing the step 4;
step 3, adjusting the rotating speed of the cooling fan through a control algorithm built in the server until the operating temperature of each electronic device in the server is within a preset temperature range;
step 4, acquiring the current rotating speed S1 of the cooling fan and the current average power consumption W1 of the server system;
step 5, reducing the rotation speed of the cooling fan by a preset step S1, wherein the rotation speed of the cooling fan after being reduced is set to be S2, and S2 is S1-the preset step;
step 6, recording average power consumption data W2 of the system after the rotating speed of the cooling fan is reduced;
step 7, judging whether the power consumption data W2 after the rotating speed of the cooling fan is reduced is smaller than the power consumption data W1 before the rotating speed is reduced;
if the power consumption data W2 after the cooling fan speed is reduced is less than the power consumption data W1 before the cooling fan speed is reduced, executing the step 8;
if the power consumption data W2 after the cooling fan speed is reduced is larger than the power consumption data W1 before the cooling fan speed is reduced, executing the step 9;
step 8, recording the current fan speed S1 being S2, the current average power consumption W1 being W2, and returning to execute step 5;
step 9, recording the current fan speed S1 as S2, and the current average power consumption W1 as W2;
step 10, increasing the rotation speed S1 of the cooling fan by a predetermined step, wherein the increased rotation speed of the cooling fan is set to S3, and S3 is S1+ the predetermined step;
step 11, recording the average power consumption W3 of the system after the rotating speed of the cooling fan is increased;
step 12, judging whether the power consumption data W3 after the rotating speed of the cooling fan is increased is smaller than the power consumption data W1 before the rotating speed of the cooling fan is increased;
if the power consumption data W3 after the rotating speed of the cooling fan is increased is less than the power consumption data W1 before the rotating speed of the cooling fan is increased, executing the step 13;
if the power consumption data W3 after the rotating speed of the cooling fan is increased is larger than the power consumption data W1 before the rotating speed of the cooling fan is increased, executing the step 14;
step 13, adjusting the current fan speed S1 to S3, and the current average power consumption W1 to W3, and returning to execute step 10;
and step 14, adjusting the current fan speed S1 to S3, adjusting the current average power consumption W1 to W3, and returning to the step 4.
CN202110655343.1A 2021-06-11 Real-time adjustment method and device for power consumption of server and electronic equipment Active CN113568805B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110655343.1A CN113568805B (en) 2021-06-11 Real-time adjustment method and device for power consumption of server and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110655343.1A CN113568805B (en) 2021-06-11 Real-time adjustment method and device for power consumption of server and electronic equipment

Publications (2)

Publication Number Publication Date
CN113568805A true CN113568805A (en) 2021-10-29
CN113568805B CN113568805B (en) 2024-07-30

Family

ID=

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116643952A (en) * 2023-07-27 2023-08-25 安擎计算机信息股份有限公司 Server power consumption management method and device
CN117803595A (en) * 2024-02-29 2024-04-02 四川华鲲振宇智能科技有限责任公司 Whole machine energy-saving fan speed regulation method, system and medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100023787A1 (en) * 2008-07-28 2010-01-28 Sun Microsystems, Inc. Controlling the power utilization of a computer system by adjusting a cooling fan speed
CN102878102A (en) * 2012-10-19 2013-01-16 华为技术有限公司 Speed adjustment processing method and device of fan
US20150106644A1 (en) * 2013-10-16 2015-04-16 Wistron Corp. Redundant array of independent disks storage device, server system, and power management method thereof
US20170030364A1 (en) * 2015-07-31 2017-02-02 Lenovo (Singapore) Pte. Ltd. Proactive control of electronic device cooling
US20180267582A1 (en) * 2017-03-16 2018-09-20 Dell Products L.P. Cooling fan speed control profile
CN108571460A (en) * 2017-08-30 2018-09-25 紫光华山信息技术有限公司 Fan rotational frequency control method and device
CN109857228A (en) * 2018-12-29 2019-06-07 曙光信息产业(北京)有限公司 Fan control device and method
CN110134208A (en) * 2019-04-08 2019-08-16 上海闻泰信息技术有限公司 Rotation speed of the fan Automatic adjustment method, system and server
CN112181107A (en) * 2020-09-10 2021-01-05 苏州浪潮智能科技有限公司 Method and device for reducing power consumption of fan
US20210132679A1 (en) * 2019-11-05 2021-05-06 Inventec (Pudong) Technology Corporation Method for automatically optimizing power consumption
TW202121113A (en) * 2019-11-19 2021-06-01 英業達股份有限公司 Method for automatically optimizing power consumption

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100023787A1 (en) * 2008-07-28 2010-01-28 Sun Microsystems, Inc. Controlling the power utilization of a computer system by adjusting a cooling fan speed
CN102878102A (en) * 2012-10-19 2013-01-16 华为技术有限公司 Speed adjustment processing method and device of fan
US20150106644A1 (en) * 2013-10-16 2015-04-16 Wistron Corp. Redundant array of independent disks storage device, server system, and power management method thereof
US20170030364A1 (en) * 2015-07-31 2017-02-02 Lenovo (Singapore) Pte. Ltd. Proactive control of electronic device cooling
US20180267582A1 (en) * 2017-03-16 2018-09-20 Dell Products L.P. Cooling fan speed control profile
CN108571460A (en) * 2017-08-30 2018-09-25 紫光华山信息技术有限公司 Fan rotational frequency control method and device
CN109857228A (en) * 2018-12-29 2019-06-07 曙光信息产业(北京)有限公司 Fan control device and method
CN110134208A (en) * 2019-04-08 2019-08-16 上海闻泰信息技术有限公司 Rotation speed of the fan Automatic adjustment method, system and server
US20210132679A1 (en) * 2019-11-05 2021-05-06 Inventec (Pudong) Technology Corporation Method for automatically optimizing power consumption
TW202121113A (en) * 2019-11-19 2021-06-01 英業達股份有限公司 Method for automatically optimizing power consumption
CN112181107A (en) * 2020-09-10 2021-01-05 苏州浪潮智能科技有限公司 Method and device for reducing power consumption of fan

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116643952A (en) * 2023-07-27 2023-08-25 安擎计算机信息股份有限公司 Server power consumption management method and device
CN117803595A (en) * 2024-02-29 2024-04-02 四川华鲲振宇智能科技有限责任公司 Whole machine energy-saving fan speed regulation method, system and medium
CN117803595B (en) * 2024-02-29 2024-05-31 四川华鲲振宇智能科技有限责任公司 Whole machine energy-saving fan speed regulation method, system and medium

Similar Documents

Publication Publication Date Title
US7464278B2 (en) Combining power prediction and optimal control approaches for performance optimization in thermally limited designs
CN102232205B (en) Forced idle of a data processing system
US7272732B2 (en) Controlling power consumption of at least one computer system
CN110778517B (en) Fan control method, device and storage medium
US7310738B2 (en) Multifunctional control of cooling systems for computers
US8108697B2 (en) Controlling the power utilization of a computer system by adjusting a cooling fan speed
CN113826082B (en) Method and equipment for controlling heat dissipation device
CN103593041A (en) Forced idle of a data processing system
CN113503269B (en) Fan speed regulating method, device, computer equipment and computer readable storage medium
US11592880B2 (en) System and method for automation of baseline fan speeds
CN110647224A (en) Method and device for controlling running state
CN114153298B (en) Fan module with adjustable air outlet angle, control method thereof and host
CN112987893B (en) Fan speed regulation method and device, storage medium and electronic equipment
CN114877582A (en) Temperature control method, device and system based on air cooling
CN113568805B (en) Real-time adjustment method and device for power consumption of server and electronic equipment
CN110725806A (en) Fan rotating speed control method and device and server
CN113568805A (en) Real-time adjustment method and device for power consumption of server and electronic equipment
CN116914325A (en) Temperature control method, electronic device, and computer-readable storage medium
CN114167963B (en) Fan control management method, device, equipment and machine-readable storage medium
CN110566492A (en) fan speed regulation method, device, equipment and medium
CN113844268B (en) Method and device for determining the operating speed of a cooling device of an electric vehicle
CN115469728A (en) Server heat dissipation system and method, electronic equipment and storage medium
CN115492674A (en) Control method and device for electric water pump and cooling fan
CN114153299B (en) Movable fan module, control method thereof, host and storage medium
US11847009B1 (en) Power control for improving foreground application performance in an information handling system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40069944

Country of ref document: HK

TA01 Transfer of patent application right

Effective date of registration: 20240229

Address after: # 03-06, Lai Zan Da Building 1, 51 Belarusian Road, Singapore

Applicant after: Alibaba Innovation Co.

Country or region after: Singapore

Address before: Room 01, 45th Floor, AXA Building, 8 Shanton Road, Singapore

Applicant before: Alibaba Singapore Holdings Ltd.

Country or region before: Singapore

TA01 Transfer of patent application right
GR01 Patent grant