Fan rotating speed control method and device, BMC and storage medium
By obtaining the thermal regulation parameters of the PCIe card and using the PID algorithm to calculate the PWM value, the problem of insufficient fan speed control is solved, and the fan power consumption and life extension are reduced.
Patent Information
- Application Number
- CN202411019128.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2024-11-12
AI Technical Summary
The prior art cannot fine-grained control of the speed of the server fan, resulting in excessive fan speed increase, increased power consumption, and easily causing fan damage.
By obtaining the corresponding slots of the target fan and the heat dissipation control parameters of each PCIe card, including fan weights, target control temperatures and threshold temperature values, the PWM value is calculated using the PID algorithm, and a control signal is generated to finely control the fan speed.
It realizes refined control of fan speed, avoids excessive pull-up or repeated pull-up, reduces fan power consumption, and extends the service life of the fan.
Smart Images

Figure CN118934699A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and device for controlling fan speed, a BMC and a storage medium. Background Art
[0002] A server is usually composed of a server chassis, boards, fans and important components. Important components usually include a central processing unit (CPU), memory and a peripheral component interconnect express (PCIe) card. PCIe cards include: network cards, graphics processing units (GPU), redundant arrays of independent disks (RAID), host bus adapters (HBA), host channel adapters (HCA), smart network cards, etc. During the operation of the server, various components in the server will generate a lot of heat. With the development of technology and the demand for PCIe card performance, the heat generation capacity of various PCIe components is getting stronger and stronger.
[0003] In order to effectively control the heat dissipation of the server and avoid the burning problem caused by overheating of components, the pulse width (Pulse Width Modulation, PWM) required for the maximum temperature of each type of PCIe card is usually determined according to the maximum temperature value of each type of PCIe card, and the fan speed on the server is controlled by controlling the output PWM to the fan for heat dissipation. This method cannot finely control the fan, resulting in excessive increase in fan speed and higher fan power consumption; repeated increase in fan speed can easily cause fan damage and other problems. Summary of the invention
[0004] In view of this, the present invention provides a method and device for controlling fan speed, a BMC and a storage medium to solve the problem that the fan cannot be finely controlled, resulting in excessive increase in fan speed and increased fan power consumption.
[0005] In a first aspect, the present invention provides a method for controlling a fan speed, the method comprising: obtaining N slots corresponding to a target fan, each slot being capable of inserting a PCIE card; determining a heat dissipation control parameter corresponding to each PCIE card in the N PCIE cards and at least two sampled temperature values of each PCIE card, the heat dissipation control parameter comprising a fan weight, a target control temperature value, and a threshold temperature value corresponding to each PCIE card.
[0006] When at least two sampled temperature values are both less than a threshold temperature value, the at least two sampled temperature values and the target control temperature value are subjected to a PID algorithm to calculate N first pulse width PWM values corresponding to the N PCIE cards; N second PWM values are calculated according to N fan weights and N first PWM values in the N heat dissipation control parameters, and a target PWM value is selected from the N second PWM values, where the target PWM value is the maximum value among the N second PWM values; a control signal including the target PWM is generated, and the control signal is sent to a target fan, where the control signal is used to instruct the target fan to dissipate heat for the N PCIE cards at a rotation speed corresponding to the target PWM value.
[0007] Based on the method provided in the first aspect above, N slots corresponding to the target fan can be obtained, the heat dissipation control parameters corresponding to each PCIE card in the N PCIE cards and at least two sampled temperature values of each PCIE card can be determined, and when at least two sampled temperature values are both less than the threshold temperature value, the at least two sampled temperature values and the target control temperature value are subjected to a PID algorithm to calculate N first pulse width PWM values; N second PWM values are calculated according to N fan weights in the N heat dissipation control parameters and the N first PWM values, and a target PWM value is screened from the N second PWM values; a control signal containing the target PWM is generated, and the control signal is sent to the target fan.
[0008] Since the N slots corresponding to the target fan can be obtained, the target PWM value of the fan can be adjusted according to the slot, and then the fan speed can be adjusted. Compared with the related art, the PWM value required for the maximum temperature of each type of PCIe card is usually determined according to the maximum temperature value of each type of PCIe card, and the fan speed is controlled by controlling the output PWM value to the fan. The present invention can determine the heat dissipation control parameters corresponding to the PCIE card inserted in each slot, and the heat dissipation control parameters include the fan weight and target control temperature corresponding to the PCIE card. The target control temperature is the operating temperature required for each PCIE card to work normally. Different PCIE cards have different corresponding fan weights, that is, the degree to which different PCIE cards need the target fan to dissipate heat can be accurately determined. Therefore, compared with the related art, the present invention can accurately determine the target PWM value of the target fan based on the target control temperature, that is, accurately determine the speed of the target fan, and finely control the speed of the fan to avoid excessive or repeated increases in the fan speed, and reduce the power consumption of the fan.
[0009] In an optional implementation, determining the heat dissipation control parameters corresponding to each PCIE card in N PCIE cards includes: receiving all identifiers of all PCIE cards and all slots where all PCIE cards are located sent from a BIOS system; obtaining the card type, temperature type and slot of each PCIE card in the N PCIE cards on the server; matching all slots where all PCIE cards are located with the slot where each PCIE card in the N PCIE cards is located, and determining N identifiers corresponding to the N PCIE cards from all identifiers.
[0010] According to the card type, temperature type, slot and N identifiers of each PCIE card, a search is performed in the preset mapping table to determine whether there are N heat dissipation control parameters corresponding to the N card types, N identifiers, N temperature types and N slots. The preset mapping table is used to indicate the mapping relationship between the heat dissipation control parameters and the card type, identifier, temperature type and slot.
[0011] If so, the N heat dissipation control parameters corresponding to the N PCIE cards are determined in the preset mapping table; if not so, the N heat dissipation control parameters are determined to be N default parameters.
[0012] Based on the above method, the heat dissipation control parameters of each PCIE card can be accurately determined based on the preset mapping table or default parameters, so as to facilitate the subsequent determination of the PWM value of the target fan based on the heat dissipation control parameters, and then accurately determine the fan speed.
[0013] In an optional embodiment, at least two sampled temperature values of each PCIE card are determined, including: when each PCIE card includes one temperature type, sampling the temperature value of each PCIE card at the previous moment and the temperature value of each PCIE card at the current moment; when each PCIE card includes M temperature types, sampling the temperature value of each temperature type at the previous moment and the temperature value of each temperature type of the M temperature types of each PCIE card at the current moment, M>1 and is a positive integer.
[0014] Based on the above method, based on the temperature type included in each PCIE card, the sampled temperature values corresponding to the different temperature types of each PCIE card can be determined, that is, when the PCIE card includes one temperature type, namely, the core temperature, at least two sampled temperature values of the core temperature are obtained; when the PCIE card includes two or more temperature types, namely, the core temperature and other additional temperatures except the core temperature, at least two sampled temperature values of the core temperature and at least two sampled temperature values of each additional temperature are obtained, and the first PWM value of the target fan can be calculated from more angles, thereby making the determined target PWM value more accurate.
[0015] In an optional embodiment, N second PWM values are calculated based on N fan weights in N heat dissipation control parameters and N first PWM values, including: calculating the product of the fan weight in the heat dissipation control parameters of each PCIE card and each first PWM value to obtain N second PWM values.
[0016] Based on the above method, the first PWM value can be adjusted by the fan weight so that the obtained second PWM value matches the degree to which the PCIE card requires the target fan to dissipate heat, thereby facilitating a more accurate determination of the target PWM value later.
[0017] In an optional embodiment, the N PCIE cards include a first PCIE card; the heat dissipation control parameters also include a threshold PWM value corresponding to the threshold temperature value; the method also includes: when the current temperature value of the first PCIE card is greater than or equal to the threshold temperature value, according to the fan weight and the threshold PWM value in the heat dissipation control parameters of the first PCIE card, calculating the second PWM value corresponding to the first PCIE card, and determining the second PWM value corresponding to the first PCIE card as the target PWM value corresponding to the first PCIE card.
[0018] Based on the above method, the current temperature value is higher than the threshold temperature value, that is, there is a risk of damage to the PCIE card due to excessive temperature. Therefore, in order to prevent the PCIE card from being in a high temperature state for a long time, the current temperature value is reduced as soon as possible. The target PWM value needs to be determined as the threshold PWM value corresponding to the threshold temperature value, so that the fan is at the fan speed corresponding to the threshold PWM value for heat dissipation.
[0019] In an optional embodiment, the heat dissipation regulation parameters also include PID heat dissipation control parameters, and when the at least two sampled temperature values are both less than the threshold temperature value, the at least two sampled temperature values and the target regulation temperature value are subjected to a PID algorithm to calculate the N first pulse width PWM values corresponding to the N PCIE cards, including: when the at least two sampled temperature values are both less than the threshold temperature value, the at least two sampled temperature values, the target regulation temperature value and the PID heat dissipation control parameters are input into the PID algorithm to calculate the N first PWM values corresponding to the N PCIE cards.
[0020] Based on the above method, N first pulse width PWM values corresponding to N PCIE cards can be calculated.
[0021] In an optional implementation, the default parameter includes a preset threshold temperature value that is less than or equal to the threshold temperature value.
[0022] Based on the above method, in order to prevent the PCIE card from overheating, and different PCIE cards have different corresponding threshold temperature values, the preset threshold temperature value should be less than or equal to the minimum value of the threshold temperature values.
[0023] In a second aspect, the present invention provides a fan speed control device, which includes: an acquisition module, used to obtain N slots corresponding to the target fan, each slot can be inserted with a PCIE card; a processing module, used to determine the heat dissipation control parameters corresponding to each PCIE card in the N PCIE cards and at least two sampled temperature values of each PCIE card, the heat dissipation control parameters including the fan weight corresponding to each PCIE card, the target control temperature value, and the threshold temperature value.
[0024] The processing module is further used to, when at least two sampled temperature values are both less than the threshold temperature value, calculate N first pulse width PWM values corresponding to the N PCIE cards by subjecting the at least two sampled temperature values and the target control temperature value to a PID algorithm; the processing module is further used to calculate N second PWM values according to N fan weights and N first PWM values in the N heat dissipation control parameters, and to select a target PWM value from the N second PWM values, where the target PWM value is the maximum value among the N second PWM values; the processing module is further used to generate a control signal including the target PWM, and to send the control signal to the target fan, where the control signal is used to instruct the target fan to dissipate heat for the N PCIE cards at a rotation speed corresponding to the target PWM value.
[0025] In a third aspect, the present invention provides a BMC, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the fan speed control method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0026] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the fan speed control method of the first aspect or any corresponding embodiment thereof.
[0027] In a fifth aspect, the present invention provides a computer program product, including computer instructions, where the computer instructions are used to enable a computer to execute the fan speed control method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0029] Figure 1 is a schematic diagram of a method for controlling a fan speed in a related art implemented according to the present invention;
[0030] Figure 2 is an architectural diagram of a fan speed control system according to an embodiment of the present invention;
[0031] Figure 3 is a flow chart of a method for controlling a fan speed according to an embodiment of the present invention;
[0032] Figure 4 is a schematic diagram of fan positions of a server according to the present invention;
[0033] Figure 5 is a schematic diagram of slot positions of a server implemented according to the present invention;
[0034] Figure 6 is a schematic diagram of a process of controlling the rotation speeds of multiple fans according to an embodiment of the present invention;
[0035] Figure 7 is a structural block diagram of a fan speed control device according to an embodiment of the present invention;
[0036] Figure 8 FIG. 4 is a schematic diagram of the hardware structure of the BMC according to an embodiment of the present invention. DETAILED DESCRIPTION
[0037] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0038] In the related art, heat dissipation control is usually performed on each type of PCIe card in the server. Figure 1 As shown, Figure 1 It is a schematic diagram of a method for controlling fan speed in a related technology implemented according to the present invention.
[0039] exist Figure 1In the process, the BMC periodically obtains the maximum temperature value of each type of PCIe card (such as the maximum temperature of all GPUs, the maximum temperature of all network cards, etc.), calculates the PWM required for the maximum temperature of each type of PCIe card according to the preset heat dissipation control parameters, and then compares all the calculation results to obtain the largest PWM, and controls the fan speed on the server by outputting it to the fan. Furthermore, the BMC sets the default heat dissipation control parameters for the PCIe card in the initial state, and then the BMC uses the 4 ID information (VenderID, DeviceID, SubVenderID, SubDeviceID) of the PCIe card (read by the BIOS and passed to the BMC) to find out the heat dissipation control parameters of the specified PCIe card (usually the default heat dissipation control parameters are more aggressive than the heat dissipation control parameters of the specific PCIe card, that is, at the same temperature, the default parameters have a higher speed), and uses them for heat dissipation control calculations.
[0040] In the above-mentioned related technologies, the BMC controls the fans of the server in a unified manner, and does not associate the fans with the positions of the PCIe cards; the temperature of a certain type of PCIe card is associated with all fans according to the heat dissipation control parameters. When the temperature of a single PCIe card rises, the speed of all fans will increase, and it is impossible to finely control the fans; the maximum temperature of the same type of PCIe card is used for heat dissipation control. When there are mixed insertions of PCIe cards of the same type but different manufacturers, when matching specific heat dissipation control parameters according to 4 IDs, only the most reliable heat dissipation control parameters can be used for heat dissipation control (that is, at the same temperature, the fan speed of one card is low and the fan speed of another card is high, then only the set of parameters with high fan speed can be used), which will increase the fan speed and it is impossible to finely control the fans; each PCIe card mainly uses the core temperature of the PCIe card for heat dissipation control, and other additional temperatures (such as: GPU memory temperature, network card optical module temperature) do not participate or only use the overall temperature for heat dissipation control, which is easy to cause over-temperature damage to the equipment.
[0041] In order to solve the problems of the above-mentioned related technologies, an embodiment of the present invention provides a method for controlling a fan speed, the method comprising: obtaining N slots corresponding to a target fan, each slot being capable of inserting a PCIE card; determining a heat dissipation control parameter corresponding to each PCIE card in the N PCIE cards and at least two sampled temperature values of each PCIE card, the heat dissipation control parameter comprising a fan weight, a target control temperature value, and a threshold temperature value corresponding to each PCIE card.
[0042] When at least two sampled temperature values are both less than a threshold temperature value, the at least two sampled temperature values and the target control temperature value are subjected to a PID algorithm to calculate N first pulse width PWM values corresponding to the N PCIE cards; N second PWM values are calculated according to N fan weights and N first PWM values in the N heat dissipation control parameters, and a target PWM value is selected from the N second PWM values, where the target PWM value is the maximum value among the N second PWM values; a control signal including the target PWM is generated, and the control signal is sent to a target fan, where the control signal is used to instruct the target fan to dissipate heat for the N PCIE cards at a rotation speed corresponding to the target PWM value.
[0043] In this way, the target PWM value of the target fan, that is, the rotation speed of the target fan, can be accurately determined, and the rotation speed of the fan can be finely controlled to avoid excessive or repeated increases in the fan rotation speed, thereby reducing the power consumption of the fan.
[0044] Below Figure 2 Taking the architecture diagram of the fan speed control system according to the embodiment of the present invention as an example, the method provided by the embodiment of the present application is described. Figure 2 It is only a schematic diagram and does not constitute a limitation on the applicable scenarios of the technical solution provided in this application.
[0045] like Figure 2 As shown, Figure 2 4 is a schematic diagram of a fan speed control system according to an embodiment of the present invention. Figure 2 In the embodiment, the fan speed control system 20 may include a fan speed control device 201 , a BIOS system 202 , a PCIE card 203 , a PCIE card 205 and a fan 204 .
[0046] The fan speed control device in the embodiment of the present invention, for example, the fan speed control device 201, can be a baseboard management controller (BMC). BMC is a microcontroller BMC embedded in the server motherboard. BMC is responsible for monitoring and managing the health status of the system, including temperature, fan speed, power status, etc.
[0047] The BIOS system in the embodiment of the present invention, for example, the BIOS system 202, is an industry standard firmware interface. The BIOS system is used to identify and obtain all identifiers of all PCIE cards and all slots where all PCIE cards are located.
[0048] The PCIE card (also referred to as a PCIE device) in the embodiment of the present invention, for example, the PCIE card 203 or the PCIE card 205, is a card based on the high-speed serial computer expansion bus standard. For example, the PCIE card can be a network card, a GPU card, a RAID card, an HBA card, an HCA card, or an intelligent network card.
[0049] The fan in the embodiment of the present invention, for example, the fan 204, can be any fan in the server. The fan is used to dissipate heat for the PCIE card.
[0050] Figure 2 The fan speed control system 20 shown is only used as an example and is not used to limit the technical solution of the present application. Those skilled in the art should understand that in the specific implementation process, the fan speed control system 20 can also include more PCIE cards and fans, and the number of PCIE cards and fans can also be determined according to specific needs without limitation.
[0051] According to an embodiment of the present invention, an embodiment of a method for controlling a fan speed is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0052] In this embodiment, a method for controlling a fan speed is provided, which can be used in the above-mentioned fan speed control device or BMC. Figure 3 FIG. 1 is a flow chart of a method for controlling a fan speed according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:
[0053] S301: Obtain N slots corresponding to the target fan, each slot being capable of inserting a PCIE card.
[0054] The target fan can be any fan on the server. Figure 4 As shown, Figure 4 FIG. 1 is a schematic diagram of the fan position of a server according to the present invention. Figure 4 In the diagram, fans are numbered 1 to 6 from left to right.
[0055] In the embodiment of the present invention, the slot is used to insert a PCIE card. Figure 5 As shown, Figure 5 Schematic diagram of the slot positions of the server according to the present invention. Figure 5 In the example, the slots are numbered from left to right and from top to bottom as Slot1 to Slot10.
[0056] S302: Determine a heat dissipation control parameter corresponding to each PCIE card in N PCIE cards and at least two sampled temperature values of each PCIE card.
[0057] The heat dissipation control parameters include the fan weight, target control temperature value, and threshold temperature value corresponding to each PCIE card. Optionally, the heat dissipation control parameters also include the identifier, card type, temperature type, PID heat dissipation control parameter, and threshold PWM value corresponding to the threshold temperature value corresponding to each PCIE card.
[0058] In the embodiment of the present invention, the fan weight is used to indicate the influence weight of the slot on each fan.
[0059] In the embodiment of the present invention, the target control temperature value is the working temperature of the PCIE card for normal operation. It is understandable that when the current temperature value of the PCIE card is higher than the target control temperature value, the fan needs to be controlled to make the temperature value of the PCIE card approach the target control temperature value.
[0060] In the embodiment of the present invention, the threshold temperature value represents the temperature threshold of the slot. It is understandable that when the temperature of the PCIE card on the slot is higher than the threshold temperature value, the PWM value of the fan needs to be set to the threshold PWM value corresponding to the threshold temperature value to control the speed of the fan for heat dissipation.
[0061] In the embodiment of the present invention, the identifier corresponding to each PCIE card includes four identifiers, namely, Vendor ID, Device ID, Subsystem Vendor ID, and Subsystem Device ID. The identifier corresponding to each PCIE card is used to uniquely identify the PCIE card and its manufacturer's number. For example, the identifier corresponding to the PCIE card in slot-4 is: "VenderID": 0x10de, "DeviceID": 0x1db6, "SubVenderID": 0x1bd4, "SubDeviceID": 0x0066.
[0062] In the embodiment of the present invention, the card type is used to indicate the type of the PCIE card. For example, the card type of the PCIE card may be a GPU, a network card, a RAID, an HBA, or an HCA.
[0063] In the embodiment of the present invention, the temperature type is used to indicate the temperature type on the PCIE card. For example, if the PCIE card is a GPU, the temperature type of the GPU includes core temperature and memory temperature; if the PCIE card is a network card, the temperature type of the network card includes core temperature and optical module temperature.
[0064] In the embodiment of the present invention, the PID heat dissipation control parameter is a parameter required by the PID algorithm to calculate the PWM value. For example, the PID heat dissipation control parameter includes time.
[0065] In some optional implementations, the BMC receives all identifiers of all PCIE cards and all slots where all PCIE cards are located sent by the BIOS system; obtains the card type, temperature type and slot of each PCIE card in the N PCIE cards; matches all slots where all PCIE cards are located with the slot where each PCIE card in the N PCIE cards is located, and determines N identifiers corresponding to the N PCIE cards from all identifiers; searches in a preset mapping table whether N heat dissipation control parameters corresponding to the N card types, N identifiers, N temperature types and N slots exist according to the card type, temperature type, slot and N identifiers of each PCIE card; if so, determines the N heat dissipation control parameters corresponding to the N PCIE cards in the preset mapping table; if not, determines the N heat dissipation control parameters to be N default parameters.
[0066] The preset mapping table (also called the heat dissipation control parameter table) is used to indicate the mapping relationship between the heat dissipation control parameters and the card type, identifier, temperature type, and slot.
[0067] In an embodiment of the present invention, the default parameter may be a preset default parameter. The default parameter may include a preset fan weight corresponding to each PCIE card, a preset target control temperature value, a preset threshold temperature value, a preset PID heat dissipation control parameter, and a preset threshold PWM value corresponding to the preset threshold temperature value. The preset threshold temperature value included in the default parameter is less than or equal to the threshold temperature value.
[0068] Exemplarily, when the server starts, the BIOS system reads all the identifiers of all PCIe cards and all the slots where all the PCIE cards are located, and sends all the identifiers of all the PCIe cards and all the slots where all the PCIE cards are located to the BMC. The BMC receives all the identifiers of all the PCIE cards and all the slots where all the PCIE cards are located from the BIOS system, and stores them in a non-volatile memory to ensure that data can still be obtained after the system is restarted.
[0069] The BMC periodically obtains the card type, temperature type and slot of each of the N PCIE cards on the server; matches all the slots where all the PCIE cards are located with the slot where each of the N PCIE cards is located, and determines N identifiers corresponding to the N PCIE cards from all the identifiers.
[0070] It is understandable that the card type, identifier, temperature type, and slot are associated with the heat dissipation control parameters. Different card types correspond to different heat dissipation control parameters. Different identifiers correspond to different heat dissipation control parameters. Different temperature types correspond to different heat dissipation control parameters. Different slots correspond to different heat dissipation control parameters.
[0071] In some optional implementations, when each PCIE card includes one temperature type, the BMC samples the temperature value of each PCIE card at the previous moment and the temperature value of the current moment; when each PCIE card includes M temperature types, the BMC samples the temperature value of each temperature type at the previous moment and the temperature value of the current moment among the M temperature types of each PCIE card.
[0072] Wherein, M>1 and is a positive integer.
[0073] In one example, when each PCIE card includes one temperature type, the BMC samples the temperature value at the first moment, the temperature value at the second moment, and the temperature value at the third moment of each PCIE card; when each PCIE card includes M temperature types, the BMC samples the temperature value at the first moment, the temperature value at the second moment, and the temperature value at the third moment of each temperature type among the M temperature types of each PCIE card.
[0074] The sampling time of the temperature value at the first moment may be before the sampling time of the temperature value at the second moment, and the sampling time of the temperature value at the second moment may be before the sampling time of the temperature value at the third moment.
[0075] It is understandable that the at least two sampled temperature values of each PCIE card include the temperature value of each PCIE card at the last moment and the temperature value of each PCIE card at the current moment. The at least two sampled temperature values of each PCIE card may also include the temperature value at the moment before the last moment, without limitation.
[0076] S303: When at least two sampled temperature values are both less than the threshold temperature value, the at least two sampled temperature values and the target control temperature value are subjected to a PID algorithm to calculate N first pulse width PWM values corresponding to the N PCIE cards.
[0077] In one example, when at least two sampled temperature values are less than a threshold temperature value, the BMC inputs at least two sampled temperature values, a target control temperature value, and a PID heat dissipation control parameter into a PID algorithm to calculate N first pulse width PWM values corresponding to N PCIE cards.
[0078] S304: Calculate N second PWM values according to N fan weights in the N heat dissipation control parameters and the N first PWM values, and select a target PWM value from the N second PWM values.
[0079] The target PWM value is the maximum value among the N second PWM values. The target PWM value is positively correlated with the rotation speed of the target fan.
[0080] In some optional implementations, the BMC calculates the product of the fan weight in the heat dissipation control parameters of each PCIE card and each first PWM value to obtain N second PWM values.
[0081] For example, Figure 2 For example, the target fan is fan 204, and the target fan corresponds to two slots, and the PCIE card slots inserted in the two slots are PCIE card 203 and PCIE card 205. For example, the first PWM value of PCIE card 203 is 50, the fan weight of PCIE card 203 is 60%, PCIE card 205 is 80, and the fan weight of PCIE card 205 is 10%. The BMC calculates the product of the fan weight of PCIE card 203 (60%) and the first PWM value of 50, and obtains the second PWM value of PCIE card 203 as 30. The BMC calculates the product of the fan weight of PCIE card 205 (10%) and the first PWM value of 80, and obtains the second PWM value of PCIE card 205 as 8. Obviously, 30 is greater than 8, and the target PWM value of 30 can be selected from the two second PWM values.
[0082] In the embodiment of the present invention, the N PCIE cards include a first PCIE card.
[0083] In some optional embodiments, when the current temperature value of the first PCIE card is greater than or equal to the threshold temperature value, the BMC calculates the second PWM value corresponding to the first PCIE card according to the fan weight and the threshold PWM value in the heat dissipation control parameters of the first PCIE card, and determines the second PWM value corresponding to the first PCIE card as the target PWM value corresponding to the first PCIE card.
[0084] For example, taking the threshold temperature value as 80 degrees Celsius, the first PWM value corresponding to the first PCIE card as 90, and the fan weight as 80%, when the current temperature value of the first PCIE card is 98 degrees Celsius, it is obvious that the current temperature value of the first PCIE card is greater than or equal to the threshold temperature value. The BMC calculates the second PWM value corresponding to the first PCIE card as 72 (90*80%) based on the fan weight of 80% and the threshold PWM value of 90 of the first PCIE card.
[0085] It can be understood that the current temperature value is higher than the threshold temperature value, that is, there is a risk of the PCIE card being burned due to excessive temperature. Therefore, in order to avoid the PCIE card being in a high temperature state for a long time, the current temperature value is reduced as soon as possible. The target PWM value needs to be determined as the threshold PWM value corresponding to the threshold temperature value, so that the fan is at the fan speed corresponding to the threshold PWM value for heat dissipation.
[0086] S305: Generate a control signal including a target PWM, and send the control signal to a target fan.
[0087] The control signal is used to instruct the target fan to dissipate heat for the N PCIE cards at a rotation speed corresponding to the target PWM value.
[0088] Based on the above S301-S305, the BMC can obtain N slots corresponding to the target fan, determine the heat dissipation control parameters corresponding to each PCIE card in the N PCIE cards and at least two sampled temperature values of each PCIE card, and when at least two sampled temperature values are less than the threshold temperature value, the at least two sampled temperature values and the target control temperature value are subjected to a PID algorithm to calculate N first pulse width PWM values; calculate N second PWM values according to the N fan weights in the N heat dissipation control parameters and the N first PWM values, and select the target PWM value from the N second PWM values; generate a control signal including the target PWM, and send the control signal to the target fan.
[0089] Since the N slots corresponding to the target fan can be obtained, the target PWM value of the fan can be adjusted according to the slot, and then the fan speed can be adjusted. Compared with the related art, the PWM value required for the maximum temperature of each type of PCIe card is usually determined according to the maximum temperature value of each type of PCIe card, and the fan speed is controlled by controlling the output PWM value to the fan. The present invention can determine the heat dissipation control parameters corresponding to the PCIE card inserted in each slot, and the heat dissipation control parameters include the fan weight and target control temperature corresponding to the PCIE card. The target control temperature is the operating temperature required for each PCIE card to work normally. Different PCIE cards have different fan weights, that is, the degree to which different PCIE cards need the target fan to dissipate heat can be accurately determined. Therefore, compared with the related art, the present invention can accurately determine the target PWM value of the target fan based on the target control temperature, that is, accurately determine the speed of the target fan, and finely control the speed of the fan to avoid excessive or repeated increases in the fan speed, thereby reducing the power consumption of the fan. Especially under low load conditions, fine control can greatly reduce the power demand of active heat dissipation components such as fans, thereby saving electricity. Adjust the fan speed according to actual needs to maintain a relatively low and comfortable noise level, which is especially suitable for a quiet office or living environment.
[0090] The above S301-S305 takes the target fan as an example to determine the PWM value corresponding to a fan. It can be understood that for a PCIE card, the speed of multiple fans can be affected. The following takes Slot1 and Slot4 as examples to describe the process of BMC controlling the speed of multiple fans (Fan1, Fan2, Fan3, Fan4, Fan5, Fan6). Slot1 is a GPU card; Slot4 is a NIC card. Figure 6 As shown, Figure 6 This is a schematic diagram of a process of controlling the speeds of multiple fans according to an embodiment of the present invention. The specific process is as follows:
[0091] 1) The BIOS system reads all the identifiers (4 IDs) of all PCIe cards and all the slots (slot information) where all PCIE cards are located, and sends them to the BMC.
[0092] 2) The BMC stores the 4 IDs and information slot information in the BMC non-volatile memory.
[0093] 3) BMC matches the 4 IDs of the PCIE card according to the slot.
[0094] 4) The BMC samples the temperature of each PCIe card in each slot.
[0095] 5) Match the heat dissipation control parameters according to the card type, identification, temperature type, and slot position, and then determine the heat dissipation control parameters of the core temperature of the GPU card on Slot1 and the heat dissipation control parameters of the video memory temperature; and determine the heat dissipation control parameters of the core temperature of the NIC card on Slot4, the heat dissipation control parameters of the NIC optical module temperature 0, and the heat dissipation control parameters of the NIC optical module temperature 1.
[0096] 6) Based on the heat dissipation control parameters determined in 5), the BMC calculates the first PWM value acting on each fan through the PID algorithm, and calculates the second PWM value acting on each fan in combination with the fan weight.
[0097] 7) Summarize the second PWM values of each fan calculated for all temperature types, and compare and obtain the maximum PWM value of each fan.
[0098] 8) Generate a control signal including the maximum PWM, and send the control signal to the target fan to control the fan speed.
[0099] In this embodiment, a fan speed control device is also provided, which is used to implement the above embodiments and preferred implementations, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0100] This embodiment provides a fan speed control device, such as Figure 7 As shown, Figure 7 is a structural block diagram of a fan speed control device according to an embodiment of the present invention, the device comprising:
[0101] The acquisition module 701 is used to acquire N slots corresponding to the target fan, each slot being capable of inserting a PCIE card.
[0102] The processing module 702 is used to determine the heat dissipation control parameters corresponding to each PCIE card in the N PCIE cards and at least two sampled temperature values of each PCIE card. The heat dissipation control parameters include the fan weight, target control temperature value, and threshold temperature value corresponding to each PCIE card.
[0103] The processing module 702 is further used to calculate N first pulse width PWM values corresponding to N PCIE cards by using a PID algorithm to process the at least two sampled temperature values and the target control temperature value when both of the at least two sampled temperature values are less than the threshold temperature value.
[0104] The processing module is also used to calculate N second PWM values according to N fan weights in the N heat dissipation control parameters and N first PWM values, and select a target PWM value from the N second PWM values, where the target PWM value is the maximum value among the N second PWM values.
[0105] The processing module is also used to generate a control signal including a target PWM value, and send the control signal to a target fan, wherein the control signal is used to instruct the target fan to dissipate heat for N PCIE cards at a rotation speed corresponding to the target PWM value.
[0106] In some optional implementations, the processing module 702 is specifically used to receive all identifiers of all PCIE cards and all slots where all PCIE cards are located sent from the BIOS system; the processing module 702 is also specifically used to obtain the card type, temperature type and slot of each PCIE card in the N PCIE cards; the processing module 702 is also specifically used to match all slots where all PCIE cards are located with the slot where each PCIE card in the N PCIE cards is located, and determine N identifiers corresponding to the N PCIE cards from all identifiers.
[0107] The processing module 702 is further specifically used to search in a preset mapping table whether there are N heat dissipation control parameters corresponding to N card types, N identifiers, N temperature types, and N slots according to the card type, temperature type, slot and N identifiers of each PCIE card. The preset mapping table is used to indicate the mapping relationship between the heat dissipation control parameters and the card type, identifier, temperature type, and slot; the processing module 702 is further specifically used to determine the N heat dissipation control parameters corresponding to the N PCIE cards in the preset mapping table if they exist; the processing module 702 is further specifically used to determine that the N heat dissipation control parameters are N default parameters if they do not exist.
[0108] In some optional embodiments, the processing module 702 is further specifically used to sample the temperature value at the previous moment and the temperature value at the current moment of each PCIE card when each PCIE card includes one temperature type; the processing module 702 is further specifically used to sample the temperature value at the previous moment and the temperature value at the current moment of each temperature type among the M temperature types of each PCIE card when each PCIE card includes M temperature types, where M>1 and is a positive integer.
[0109] In some optional implementations, the processing module 702 is further specifically configured to calculate the product of the fan weight in the heat dissipation control parameters of each PCIE card and each first PWM value to obtain N second PWM values.
[0110] In some optional embodiments, the N PCIE cards include a first PCIE card; the heat dissipation control parameters also include a threshold PWM value corresponding to the threshold temperature value; the processing module 702 is also used to calculate the second PWM value corresponding to the first PCIE card according to the fan weight and the threshold PWM value in the heat dissipation control parameters of the first PCIE card when the current temperature value of the first PCIE card is greater than or equal to the threshold temperature value, and determine the second PWM value corresponding to the first PCIE card as the target PWM value corresponding to the first PCIE card.
[0111] In some optional embodiments, the processing module 702 is also specifically used to input at least two sampled temperature values, the target control temperature value and the PID heat dissipation control parameters into the PID algorithm when at least two sampled temperature values are less than the threshold temperature value, and calculate the N first PWM values corresponding to the N PCIE cards.
[0112] In some optional implementations, the default parameters include a preset threshold temperature value that is less than or equal to the threshold temperature value.
[0113] The further functional description of each of the above modules is the same as that of the above corresponding embodiments and will not be repeated here.
[0114] The fan speed control device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0115] The embodiment of the present invention further provides a BMC having the above Figure 7 The fan speed control device is shown.
[0116] See also Figure 8 , Figure 8 is a schematic diagram of the structure of a BMC provided by an optional embodiment of the present invention, such as Figure 8 As shown, the BMC includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the BMC, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple BMCs can be connected, and each BMC provides some necessary operations. Figure 8 A processor 10 is taken as an example.
[0117] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0118] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0119] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required by at least one function; the data storage area may store data created according to the use of the BMC, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the BMC via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0120] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0121] The BMC further includes a communication interface 30 for the BMC to communicate with other devices or a communication network.
[0122] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0123] Part of the present application may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present application through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes but is not limited to source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0124] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for controlling fan speed, characterized in that: The method comprises: Get the N slots corresponding to the target fan, each slot can be inserted with a PCIE card; Determine a heat dissipation control parameter corresponding to each PCIE card in the N PCIE cards and at least two sampled temperature values of each PCIE card, wherein the heat dissipation control parameter includes a fan weight, a target control temperature value, and a threshold temperature value corresponding to each PCIE card; When the at least two sampled temperature values are both less than the threshold temperature value, the at least two sampled temperature values and the target control temperature value are subjected to a PID algorithm to calculate N first pulse width PWM values corresponding to the N PCIE cards; Calculate N second PWM values according to N fan weights in the N heat dissipation control parameters and the N first PWM values, and select a target PWM value from the N second PWM values, wherein the target PWM value is a maximum value among the N second PWM values; A control signal including the target PWM is generated, and the control signal is sent to the target fan, wherein the control signal is used to instruct the target fan to dissipate heat for the N PCIE cards at a rotation speed corresponding to the target PWM value.
2. The method according to claim 1, characterized in that The determining of the heat dissipation control parameters corresponding to each PCIE card in the N PCIE cards includes: Receive all identifiers of all PCIE cards and all slots where all PCIE cards are located sent from the BIOS system; Obtaining the card type, temperature type and slot location of each PCIE card in the N PCIE cards; Matching all the slots where all the PCIE cards are located with the slot where each of the N PCIE cards is located, and determining N identifiers corresponding to the N PCIE cards from all the identifiers; According to the card type, temperature type, slot and N identifiers of each PCIE card, searching in a preset mapping table whether there are N heat dissipation control parameters corresponding to the N card types, the N identifiers, the N temperature types and the N slots, wherein the preset mapping table is used to indicate a mapping relationship between the heat dissipation control parameters and the card type, identifier, temperature type and slot; If so, determining the N heat dissipation control parameters corresponding to the N PCIE cards in a preset mapping table; If not present, the N heat dissipation control parameters are determined to be N default parameters.
3. The method according to claim 1, characterized in that The determining of at least two sampled temperature values of each PCIE card includes: In the case where each PCIE card includes a temperature type, sampling a temperature value at a previous moment and a temperature value at a current moment of each PCIE card; In the case that each PCIE card includes M temperature types, the temperature value at the previous moment and the temperature value at the current moment of each temperature type in the M temperature types of each PCIE card are sampled, where M>1 and is a positive integer.
4. The method according to claim 1, characterized in that The calculating N second PWM values according to the N fan weights in the N heat dissipation control parameters and the N first PWM values includes: The product of the fan weight in the heat dissipation control parameter of each PCIE card and each first PWM value is calculated to obtain the N second PWM values.
5. The method according to claim 2, characterized in that: The N PCIE cards include a first PCIE card; the heat dissipation control parameter also includes a threshold PWM value corresponding to the threshold temperature value; the method also includes: When the current temperature value of the first PCIE card is greater than or equal to the threshold temperature value, the second PWM value corresponding to the first PCIE card is calculated according to the fan weight and the threshold PWM value in the heat dissipation control parameters of the first PCIE card, and the second PWM value corresponding to the first PCIE card is determined as the target PWM value corresponding to the first PCIE card.
6. The method according to claim 1, characterized in that The heat dissipation control parameter also includes a PID heat dissipation control parameter, and when the at least two sampled temperature values are both less than the threshold temperature value, the at least two sampled temperature values and the target control temperature value are subjected to a PID algorithm to calculate N first pulse widths PWM values corresponding to the N PCIE cards, including: When the at least two sampled temperature values are both less than the threshold temperature value, the at least two sampled temperature values, the target control temperature value and the PID heat dissipation control parameter are input into the PID algorithm to calculate the N first PWM values corresponding to the N PCIE cards.
7. The method according to claim 2, characterized in that The preset threshold temperature value included in the default parameter is less than or equal to the threshold temperature value.
8. A fan speed control device, characterized in that: The device comprises: An acquisition module is used to acquire N slots corresponding to the target fan, each slot can be inserted with a PCIE card; A processing module, used to determine a heat dissipation control parameter corresponding to each PCIE card in the N PCIE cards and at least two sampled temperature values of each PCIE card, wherein the heat dissipation control parameter includes a fan weight, a target control temperature value, and a threshold temperature value corresponding to each PCIE card; The processing module is further configured to calculate N first pulse width PWM values corresponding to the N PCIE cards by subjecting the at least two sampled temperature values and the target control temperature value to a PID algorithm when both of the at least two sampled temperature values are less than the threshold temperature value; The processing module is further used to calculate N second PWM values according to N fan weights in the N heat dissipation control parameters and the N first PWM values, and select a target PWM value from the N second PWM values, wherein the target PWM value is a maximum value among the N second PWM values; The processing module is further used to generate a control signal including the target PWM value, and send the control signal to the target fan, wherein the control signal is used to instruct the target fan to dissipate heat for the N PCIE cards at a rotation speed corresponding to the target PWM value.
9. A baseboard controller BMC, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the fan speed control method according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the fan speed control method according to any one of claims 1 to 7.
Citation Information
Cited By
Server and heat dissipation control method, system, product, equipment and medium thereof
CN119512342A
Fan rotating speed regulation and control system, method and equipment, medium and product
CN119878575A
A fan speed regulation system, method, device, medium and product
CN119878575B
Fan speed regulation system and method, and device, medium, and product
WO2026199849A1
