Method and apparatus for controlling server fan, storage medium and electronic device
Patent Information
- Application Number
- CN202310713984.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-15
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-06-15
AI Technical Summary
[0005]本申请实施例提供了一种服务器风扇的控制方法及装置、存储介质及电子设备,以至少解决相关技术中的服务器风扇的控制方法存在风扇容易逆转的问题
[0010]In this embodiment, when a fan changes from an inactive state to an inactive state, the speed of other rotating fans is reduced in batches according to their distance. The in-situ status information of each fan in the target fan group within the server is obtained through a programmable logic device (CPLD). This in-situ status information indicates whether each fan is in an inactive state. If the target fan in the target fan group is determined to be inactive based on the in-situ status information of each fan, the speed of each fan in the same group is controlled to a specified speed within that group. When the target fan changes from an inactive state to an inactive state, the target fan is activated, and the speed is reduced according to the distance from the target fan. By gradually reducing the speed of individual fans within a group in batches, from closest to furthest, and adjusting the speed of other rotating fans in batches according to their distance when a fan changes from inactive to active, priority can be given to adjusting the speed of fans that are closer and have a greater impact on the rotation of newly started fans to lower speeds, thus reducing the impact on the rotation of newly started fans. Meanwhile, other fans that are farther away and have a less significant impact on the rotation of newly started fans are kept at higher speeds. This approach avoids rotating fans affecting the fans that are starting up and effectively reduces the occurrence of reduced server cooling performance due to fan speed reduction. This achieves the technical effect of reducing the frequency of fan reversal, thereby solving the problem of fans easily reversing in server fan control methods in related technologies.
Smart Images

Figure CN116771706B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computers, and more specifically, to a method and apparatus for controlling a server fan, a storage medium, and an electronic device. Background Technology
[0002] Currently, during server operation, in order to ensure normal heat dissipation, when some fans are not in place, it is necessary to set the speed of other fans to a higher speed (or even full speed) to compensate for the impact of a smaller number of fans on server heat dissipation.
[0003] However, since the fan is a hot-swappable device, if the fan is plugged in again after being pulled out and triggered to run at full speed, the newly plugged-in fan is less powerful due to the high speed of other fans and the low speed of the new fan. It is also susceptible to crosstalk from the backflow of air and other factors, which can cause abnormal phenomena such as reversal. This makes it impossible for the fans in the whole machine to adjust their speed normally, and they will always run at high speed, increasing the power consumption of the whole machine.
[0004] This shows that the server fan control methods in related technologies have the problem of the fan easily reversing. Summary of the Invention
[0005] This application provides a server fan control method and apparatus, storage medium and electronic device, to at least solve the problem that the server fan control method in the related art is prone to fan reversal.
[0006] According to one embodiment of this application, a server fan control method is provided, comprising: acquiring the presence status information of each fan in a target fan group within the server via a programmable logic device (CPLD), wherein the presence status information of each fan is used to indicate whether each fan is in a present state; when it is determined, based on the presence status information of each fan, that a target fan in the target fan group is in an absent state, controlling the rotational speed of each fan in a plurality of fan groups at a specified rotational speed, wherein the plurality of fan groups are all fans in the target fan group; and when it is detected that the target fan has changed from an absent state to a present state, starting the target fan, and gradually reducing the rotational speed of each fan in the plurality of fan groups in batches according to the order of distance from the target fan from closest to furthest.
[0007] According to another embodiment of this application, a server fan control device is provided, comprising: a first acquisition unit, configured to acquire the presence status information of each fan in a target fan group within the server via a programmable logic device (CPLD), wherein the presence status information of each fan is used to indicate whether each fan is in a present state; a control unit, configured to control the rotational speed of each fan in a plurality of fan groups to a specified rotational speed when it is determined, based on the presence status information of each fan, that a target fan in the target fan group is not in a present state, wherein the plurality of fan groups are all fans in the target fan group; and a first execution unit, configured to start the target fan when it is detected that the target fan has changed from an absent state to a present state, and to reduce the rotational speed of each fan in the plurality of fan groups in batches according to the order of distance from the target fan from near to far.
[0008] According to yet another embodiment of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and the computer program is configured to perform the steps in any of the above method embodiments when it is run.
[0009] According to yet another embodiment of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0010] In this embodiment, when a fan changes from an inactive state to an inactive state, the speed of other rotating fans is reduced in batches according to their distance. The in-situ status information of each fan in the target fan group within the server is obtained through a programmable logic device (CPLD). This in-situ status information indicates whether each fan is in an inactive state. If the target fan in the target fan group is determined to be inactive based on the in-situ status information of each fan, the speed of each fan in the same group is controlled to a specified speed within that group. When the target fan changes from an inactive state to an inactive state, the target fan is activated, and the speed is reduced according to the distance from the target fan. By gradually reducing the speed of individual fans within a group in batches, from closest to furthest, and adjusting the speed of other rotating fans in batches according to their distance when a fan changes from inactive to active, priority can be given to adjusting the speed of fans that are closer and have a greater impact on the rotation of newly started fans to lower speeds, thus reducing the impact on the rotation of newly started fans. Meanwhile, other fans that are farther away and have a less significant impact on the rotation of newly started fans are kept at higher speeds. This approach avoids rotating fans affecting the fans that are starting up and effectively reduces the occurrence of reduced server cooling performance due to fan speed reduction. This achieves the technical effect of reducing the frequency of fan reversal, thereby solving the problem of fans easily reversing in server fan control methods in related technologies. Attached Figure Description
[0011] Figure 1 This is a schematic diagram of the hardware environment for a server fan control method according to an embodiment of this application;
[0012] Figure 2 This is a flowchart of a server fan control method according to an embodiment of this application;
[0013] Figure 3 This is a schematic diagram of a server fan control method according to an embodiment of this application;
[0014] Figure 4 This is a schematic diagram of another server fan control method according to an embodiment of this application;
[0015] Figure 5 This is a flowchart of another server fan control method according to an embodiment of this application;
[0016] Figure 6 This is a schematic diagram of another server fan control method according to an embodiment of this application;
[0017] Figure 7This is a flowchart of another server fan control method according to an embodiment of this application;
[0018] Figure 8 This is a structural block diagram of a server fan control device according to an embodiment of this application. Detailed Implementation
[0019] The embodiments of this application will be described in detail below with reference to the accompanying drawings and examples.
[0020] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of the embodiments of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0021] The methods and embodiments provided in this application can be executed on a mobile terminal, a computer terminal, or a similar computing device. Taking running on a computer terminal as an example, Figure 1 This is a schematic diagram of the hardware environment for a server fan control method according to an embodiment of this application. Figure 1 As shown, a computer terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The computer terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the computer terminal described above. For example, the computer terminal may also include components that are more complex than those described above. Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0022] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the server fan control method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thus implementing the above-described method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to a mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0023] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider for the computer terminal. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0024] According to one aspect of the embodiments of this application, a server fan control method is provided, with an example of the server fan control method in this embodiment being executed by a computer terminal. Figure 2 This is a flowchart of a server fan control method according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps:
[0025] Step S202: Obtain the in-situ status information of each fan in the target fan group within the server through a programmable logic device (CPLD). The in-situ status information of each fan is used to indicate whether each fan is in an in-situ state.
[0026] The server fan control method in this embodiment can be applied to scenarios involving the control of fans within a server. Servers generate a significant amount of heat during operation. To ensure server stability and extend its lifespan, timely heat dissipation is necessary. The internal fan of the server, during its rotation, accelerates the airflow over the heatsink surface, thereby increasing the heat exchange rate between the heatsink and the air, effectively cooling the server.
[0027] To improve server heat dissipation, the presence status of the internal fans can be immediately detected after AC (Alternating Current) power is supplied, and the fans that can be started and their speeds can be determined based on the detection results.
[0028] Considering the hardware differences between different fans, and to mask these differences and make fan control more universal, this embodiment uses a CPLD (Complex Programmable Logic Device) to obtain the on-state information of each fan in the target fan group within the server. After AC power-on, as... Figure 3As shown, the BMC (Baseboard Management Controller) communicates with the CPLD via an I2C (Inter-Integrated Circuit) link. The BMC can obtain the on-site status information of different fans through the CPLD, thereby masking the hardware differences of the fans and enabling a more accurate determination of the on-site status information of each fan in the current server.
[0029] The aforementioned target fan group can be a fan module inside the server, such as... Figure 4 As shown, a fan module can contain multiple fans. A server can have at least two fan modules. Based on the server's internal configuration, the areas where the fans are located can be statically divided, with the area providing cooling for the CPU designated as the CPU area, and other areas designated as non-CPU areas. The CPU area can have one fan module, and the non-CPU area can have one fan module.
[0030] The presence status information of each fan can be used to indicate whether each fan is in the presence state. Based on the presence status information, it can be determined whether the fan is in the presence state or not.
[0031] Optionally, the acquisition of the on-premises status information of each fan can be performed either when the server is initially powered on or during server operation. The operation of acquiring the on-premises status information of each fan can be a continuous operation or a periodic operation.
[0032] Step S204: If it is determined that the target fan in the target fan group is not in the position based on the position status information of each fan, the speed of each fan in the multiple fans in the same group is controlled at a specified speed of each fan in the same group, wherein the multiple fans in the same group are all fans in the target fan group.
[0033] If, based on the presence status information of each fan, it is determined that the target fan in the target fan group is not in a present state, in order to ensure the server's heat dissipation effect, the speed of each fan in the same group can be controlled at a specified speed. The specified speed of each fan in the same group can be higher than the speed of each fan in the same group when the target fan is in a present state. Here, multiple fans in the same group can all be fans in the target fan group.
[0034] The specified speed for each fan in the same group can be the same or different. If the specified speed for each fan in the same group is different, the specified speed can be determined based on the distance between each fan in the same group and the target fan that is not in position.
[0035] Step S206: When the target fan is detected to change from an inactive state to an active state, the target fan is started, and the speed of each fan in the same group is reduced in batches according to the order of distance from the target fan from near to far.
[0036] After detecting that the target fan is out of position, this abnormal status can be reported to prompt server users to inspect or replace the fans within the server. Since fans are hot-swappable devices, the server does not need to be powered off when removing or inserting a fan; that is, other fans can continue to run normally while the target fan is being removed for inspection or insertion. Once the abnormal status is resolved, the target fan will be detected as having changed from being out of position to being in position. It should be noted that the target fan is determined by the location of the fan slot where it was initially out of position. Based on the reported abnormal status, if only fan repair is required, the target fan changing from out of position to being in position will be the same fan. If the fan is replaced, the target fan changing from out of position to being in position can be a different fan installed in the same fan slot.
[0037] Once the target fan is detected to have changed from an absent to an present state, it can be activated. However, when the target fan starts, the speed of other fans in the same group is relatively high. The newly activated target fan, with its lower operating speed, is more susceptible to factors such as airflow backflow interference, which can cause the target fan to reverse direction abnormally. While the target fan continues to reverse direction, other fans in the same group will remain at high speeds to ensure server cooling, thus increasing the server's power consumption.
[0038] To resolve the issue of fan reversal, the speeds of other fans surrounding the target fan can be reduced. However, the more fans that are slowed down and the wider the range of speed reduction, the lower the server's cooling efficiency will be. To resolve fan reversal while maintaining server cooling efficiency, a static partitioning approach can be used, as described in the previous embodiment. In this case, the speeds of fans in the area experiencing the abnormal fan are reduced, while the speeds of fans in other areas remain unchanged. In this embodiment, when the target fan is detected to have changed from an absent to an present state, the speeds of individual fans in a group can be reduced in batches according to their distance from the target fan, from closest to furthest, to minimize the impact of the group's fan speeds on the newly started target fan.
[0039] The aforementioned method of reducing the speed of each fan in a group in batches can refer to reducing the speed of the fans closest to the target fan in order of increasing distance from the target fan. If this fails to resolve the reverse rotation of the target fan, then the speed of the fans furthest away should be reduced.
[0040] Through the above steps, the presence status information of each fan in the target fan group within the server is obtained through a programmable logic device (CPLD). This presence status information indicates whether each fan is in a present state. If, based on the presence status information of each fan, the target fan in the target fan group is determined to be out of position, the speed of each fan in the multiple fans in the same group is controlled to a specified speed. These multiple fans are all fans within the target fan group. Upon detecting a change in the target fan's status from out of position to present, the target fan is activated, and the speeds of each fan in the multiple fans in the same group are reduced in batches according to their distance from the target fan, from closest to furthest. This solves the problem of fans easily reversing in the control methods of server fans in related technologies, achieving the technical effect of reducing the frequency of fan reversal.
[0041] In one exemplary embodiment, before acquiring the in-situ status information of each fan in the target fan group within the server via a programmable logic device (CPLD), the method further includes:
[0042] S11, obtain the onboard presence status information of each CPLD in the target CPLD group, wherein the CPLDs in the target CPLD group correspond one-to-one with the fans in the target fan group, and the onboard presence status information of each CPLD is used to represent the onboard presence status of each CPLD. Obtaining the presence status information of each fan is performed after determining that the onboard presence information of all CPLDs in the target CPLD group is in the presence state.
[0043] Considering that the system cannot automatically adjust its speed when the fan board module is not in place, thus affecting the server's heat dissipation, in this embodiment, before obtaining the onboard ...
[0044] BMC can obtain the onboard presence status information of CPLD through the I2C link. Based on the onboard presence status information, it determines whether the CPLD or fan board is in place. When it is determined that the CPLD or fan board is in place, it then obtains the presence status information of each fan.
[0045] In this embodiment, the onboard presence status of the CPLD is obtained before obtaining the fan presence status information, which can avoid fan speed control failure due to the fan board module not being in place and improve the success rate of fan control.
[0046] In one exemplary embodiment, after obtaining the onboard presence status information of each CPLD in the target CPLD group, the method further includes:
[0047] S21, if it is determined that there is a CPLD in the target CPLD group that is in an in-off state based on the onboard presence status information of each CPLD, a first abnormal alarm message is reported, wherein the first abnormal alarm message is used to alarm the CPLD in the target CPLD group that is in an in-off state.
[0048] Since the fan board is not in place, it will affect the control of the fan speed. In this embodiment, if it is determined that there is an out-of-place CPLD in the target CPLD group based on the onboard presence status information of each CPLD, it can be determined that the fan board corresponding to the out-of-place CPLD is also out of place, and a first abnormal alarm message is reported. Here, the first abnormal alarm message can be used to alarm the presence of an out-of-place CPLD in the target CPLD group.
[0049] In this embodiment, an abnormal alarm message is reported when it is determined that the CPLD is not in place, so as to prompt the user to check and avoid the server's heat dissipation efficiency being reduced due to the fan board not being in place.
[0050] In one exemplary embodiment, each fan in the target fan group corresponds one-to-one with a CPLD in the target CPLD group. The number of on-state information records for each fan is multiple, and these multiple on-state information records are read from the fan status register of the CPLD corresponding to each fan in a polling manner. After obtaining the on-state information of each fan in the target fan group within the server through the programmable logic device CPLD, the method further includes:
[0051] S31, for each fan as the current fan, perform the following on-state determination operation to determine whether each fan is in an on-state:
[0052] The current in-situ state of the fan is determined based on each in-situ state information of the current fan, resulting in multiple state determination results;
[0053] If the proportion of the judgment results corresponding to the in-situ state is greater than or equal to a preset proportion threshold among multiple state judgment results, the current fan is determined to be in the in-situ state.
[0054] If the proportion of the judgment results corresponding to the in-position state is less than a preset proportion threshold among multiple state judgment results, the current fan is determined to be in an out-of-position state.
[0055] To improve the accuracy of the read fan presence status information, in this embodiment, the presence status information of a single fan can be read multiple times in a polling manner. When there is a one-to-one correspondence between the fans in the target fan group and the CPLDs in the target CPLD group, the presence status information of each fan can be read from the fan status register of the CPLD corresponding to each fan.
[0056] For fan presence status information read multiple times, each fan can be treated as the current fan and its presence status can be determined separately to ascertain whether each fan is in a present state. The presence status determination operation can be based on the status judgment results corresponding to multiple presence status information of the same fan.
[0057] By determining the current fan's presence status based on each presence status information, multiple status determination results can be obtained. These multiple status determination results can all indicate that the current fan is in the presence status, all indicate that the current fan is not in the presence status, or a combination of both.
[0058] If, among multiple state determination results, the proportion corresponding to the in-position state is greater than or equal to a preset proportion threshold, the current fan can be determined to be in the in-position state. If, among multiple state determination results, the proportion corresponding to the in-position state is less than a preset proportion threshold, the current fan can be determined to be in the out-of-position state. The preset proportion threshold can be a pre-defined threshold, such as 90%.
[0059] For example, the BMC continuously acquires the fan status value 20 times. Based on the ratio of the in-position and out-of-position states in the 20 times, it determines whether the current fan is in a stable state. When the fan in-position probability is above 90%, it can be considered that the fan is in a relatively stable in-position state, and the fan in-position state is updated. At this time, the fan speed can be adjusted in a timely manner.
[0060] By acquiring the fan's presence status information multiple times and determining whether the fan is in position based on the proportion of the presence results to all results in the multiple judgments, the accuracy of the read fan presence status information can be improved.
[0061] In an exemplary embodiment, when it is determined that a target fan in the target fan group is in an inactive state based on the in-situ status information of each fan, controlling the rotational speed of each fan in the multiple fans in the same group to a specified rotational speed for each fan in the same group includes:
[0062] S41, if it is determined that the target fan in the target fan group is not in position based on the presence status information of each fan, the speed of all other fans in the target fan group, except for the target fan, is controlled to the maximum speed of the other fans, where multiple fans in the same group are all other fans; or...
[0063] S42, control the speed of all fans in the target fan group (excluding the target fan) to a specified speed based on their distance from the target fan, where multiple fans in the same group are all other fans, and the specified speed of each other fan is negatively correlated with the distance between the other fans and the target fan; or...
[0064] S43, control the speed of each fan in the target fan group whose distance from the target fan is less than or equal to a preset distance threshold to the maximum speed of each fan in the same group.
[0065] When it is determined that the target fan in the target fan group is not in position, the speed of each fan in the multiple fans in the same group can be controlled at the specified speed of each fan in the same group.
[0066] The aforementioned multiple fans in the same group can be all other fans in the target fan group except for the target fan. The specified speed can be the maximum speed. Controlling the speed of each fan in the multiple fans in the same group to the specified speed of each fan in the same group can also mean controlling the speed of all other fans in the target fan group except for the target fan to the maximum speed of the other fans.
[0067] The specified speed of the other fans mentioned above can also be negatively correlated with the distance between the other fans and the target fan. That is, controlling the speed of each fan in a group of multiple fans to the specified speed of each fan in the group can be based on the distance between the target fan and the target fan.
[0068] The aforementioned multiple fans in the same group can also refer to other fans in the target fan group besides the target fan. The specified speed can be the maximum speed. Controlling the speed of each fan in the multiple fans in the same group to the specified speed of each fan in the same group can be achieved by controlling the speed of each fan in the target fan group whose distance from the target fan is less than or equal to a preset distance threshold to the maximum speed of each fan in the same group.
[0069] This embodiment demonstrates how adjusting the speed of other fans in the same group when an out-of-position fan is detected can ensure the server's heat dissipation efficiency.
[0070] In one exemplary embodiment, the rotational speed of each fan in a group of fans is reduced in batches according to their distance from the target fan, from closest to furthest. This includes:
[0071] S51, perform the following speed adjustment operation at least once for multiple fans in the same group until a preset termination condition is met, wherein the preset termination condition includes at least one of the following: the target fan is rotating normally, and the number of unadjusted fans in the same group is 0:
[0072] Determine the current fans in the same group to be adjusted in order of their distance from the target fan to the nearest and farthest.
[0073] Reduce the speed of the current fan in the same group. The reduced speed of the current fan in the same group is the product of the specified speed of the current fan in the same group and the specified ratio.
[0074] The specified ratio used in each speed adjustment operation is positively correlated with the number of times the speed adjustment operation is performed.
[0075] To ensure server cooling efficiency while preventing fan reversal, in this embodiment, upon detecting a change in the target fan's status from absent to present, at least one speed adjustment operation can be performed on multiple fans in the same group until a preset termination condition is met. Here, the preset termination condition may include at least one of the following: the target fan is rotating normally, and the number of unadjusted fans in the same group is 0.
[0076] The speed adjustment operation described above can be performed by determining the current fan in the same group to be adjusted in order of increasing distance from the target fan, and then reducing the speed of the current fan in the same group. Here, the reduced speed of the current fan in the same group can be the product of the specified speed of the current fan in the same group and a specified ratio.
[0077] For services with multiple fans providing cooling, reducing the speed of a single fan has a relatively small impact on overall cooling. The speed of a single fan can be significantly reduced without affecting cooling. However, when reducing the speed of multiple fans, the impact on overall cooling performance must be considered. The reduction ratio needs to ensure both faster resolution of fan malfunctions and normal system cooling. In this embodiment, the number of fans corresponding to each speed adjustment operation can be positively correlated with the number of times the speed adjustment operation is executed. Correspondingly, the specified ratio used in each speed adjustment operation can also be positively correlated with the number of times the speed adjustment operation is executed. That is, when the above speed adjustment operation is executed for the first time, the specified ratio corresponding to the fan to be adjusted can be the minimum, such as 40%. When the above speed adjustment operation is executed for the second time, the specified ratio corresponding to the fan to be adjusted can be larger than the first specified ratio, such as 50%. When the above speed adjustment operation is executed for the third time, the specified ratio corresponding to the fan to be adjusted can be larger than the second specified ratio, such as 70%.
[0078] For example, based on the order of distance from the target fan from closest to farthest, the area where the target fan group is located can be dynamically subdivided into abnormal areas, secondary abnormal areas, and non-abnormal areas. The first speed adjustment operation can be performed on the fans in the abnormal area, the second speed adjustment operation can be performed on the fans in both the abnormal and secondary abnormal areas, and the third speed adjustment operation can be performed on the fans in the abnormal, secondary abnormal, and non-abnormal areas. Figure 5 As shown, when an abnormal state is detected where the fan speed changes from absent to present, the BMC first reduces the fan speed in the abnormal area to 40% of its maximum speed. It then checks if the abnormal fan speed issue is resolved. If resolved, normal speed adjustment is resumed (i.e., fan speed is adjusted according to the server's cooling requirements and the number of fans involved in cooling). If not resolved, the fans in the abnormal and secondary abnormal areas are reduced to 50% of their maximum speed. The BMC again checks if the abnormal fan speed issue is resolved. If resolved, normal speed adjustment is performed. If not resolved, the fans in the abnormal, secondary, and non-abnormal areas are reduced to 70% of their maximum speed, and a pre-alarm is issued (preparing to notify the user of the abnormal status). The BMC then checks if the abnormal fan speed issue is resolved. If resolved, normal speed adjustment is performed. If not resolved, a critical alarm is issued, notifying the user to check for fan hardware damage and replace the fans.
[0079] For servers with limited internal hardware, only the first speed adjustment needs to be performed. For servers with multiple network cards, GPUs (Graphics Processing Units), or other similar devices, a second speed adjustment can be performed directly, or the first adjustment can be performed first, and the second and third adjustments can be performed based on whether the abnormal status has been resolved. For servers with large modules such as GPU modules, a third speed adjustment can be performed directly, or the first adjustment can be performed first, and the second and third adjustments can be performed based on whether the abnormal status has been resolved.
[0080] In this embodiment, by reducing the speed of each fan in a group in batches according to the order of distance from the target fan from near to far, the server's heat dissipation effect can be guaranteed while eliminating fan reversal.
[0081] In one exemplary embodiment, determining the current fans in the same group to be speed-adjusted in order of increasing distance from the target fan includes:
[0082] S61, in order of distance from the target fan to the nearest, determine the fan closest to the target fan from among the multiple fans in the same group that have not been adjusted, and obtain the current fans in the same group to be adjusted for the current time. The current fans in the same group include the fans in the same group that have been adjusted and at least one fan.
[0083] In determining the current fans in the same group to be speed-adjusted, based on their distance from the target fan from closest to furthest, the fans can be selected from among the unadjusted fans in the same group, based on their distance from the target fan from closest to furthest, to obtain the current fans in the same group to be speed-adjusted. Correspondingly, the current fans in the same group can include adjusted fans from the multiple fans in the same group and at least one other fan.
[0084] For example, such as Figure 6 As shown, you can select the position of the fan adjacent to the target fan as the abnormal area, the position of the fan adjacent to the abnormal area as the secondary abnormal area, and the positions of other fans outside the same group of abnormal and secondary abnormal areas as non-abnormal areas. An abnormal area can correspond to two fans, and a secondary abnormal area can also correspond to two fans. The first speed adjustment operation adjusts the fans in the abnormal area (two fans). The second speed adjustment operation adjusts the fans in the abnormal and secondary abnormal areas (four fans). The third speed adjustment operation adjusts all fans except the target fan.
[0085] In this embodiment, when the fan speed is reduced in batches according to the distance, the efficiency of reversing the fan reversal can be improved by adjusting at least one fan that has been adjusted and at least one fan that has not been adjusted each time.
[0086] The following explanation, with reference to optional examples, illustrates the server fan control method in the embodiments of this application.
[0087] This optional example provides a fan stability and power consumption control scheme based on BMC. Through communication between the BMC and CPLD, it determines whether a fan is in position. If an out-of-position fan exists in a fan module, the speed of the other fans in that module is adjusted to full speed. When an out-of-position fan becomes in position, to prevent fan reversal caused by other fans running at excessively high speeds during startup, the fan speed is reduced in specific areas. This area-based anomaly control minimizes the impact of backflow interference on newly inserted fans, while ensuring that all fans in the server can operate at normal speeds, preventing fans from constantly running at full speed due to long-term fan anomalies, thereby further reducing fan power consumption.
[0088] The flow of the server fan control method in this optional example can be as follows: Figure 7 As shown, the following steps may be included:
[0089] Step S702: Read the onboard presence status of the CPLD to determine whether the CPLD or fan board is in place.
[0090] Step S704: Based on the fan board being in place, further read the fan status register of the CPLD to obtain the in-place status of different fans.
[0091] In step S706, if a fan is not in position, abnormal speed regulation will be triggered, and all fans in position in the same group will be turned up to full speed.
[0092] Step S708: After detecting that the non-in-position fan is in-position, the fan speed in the abnormal area is reduced to 40% first. If the abnormal fan speed is not resolved, the fan speed in the abnormal area and the secondary abnormal area is reduced by 50%. If the abnormal fan speed is still not resolved, the fan speed in the abnormal area, the secondary abnormal area and the non-abnormal area are reduced by 70%.
[0093] This optional example demonstrates how regional anomaly control can adapt to different chassis and fan environments, minimizing the impact on overall fan speed.
[0094] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0095] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0096] According to another aspect of the embodiments of this application, a server fan control device is also provided. This device is used to implement the server fan control method provided in the above embodiments, and details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0097] Figure 8 This is a structural block diagram of a server fan control device according to an embodiment of this application, such as... Figure 8 As shown, the device includes:
[0098] The first acquisition unit 802 is used to acquire the in-situ status information of each fan in the target fan group in the server through a programmable logic device CPLD, wherein the in-situ status information of each fan is used to indicate whether each fan is in-situ.
[0099] Control unit 804 is used to control the speed of each fan in a group of multiple fans in the same group to a specified speed when it is determined that the target fan in the target fan group is not in the target fan group based on the on-site status information of each fan. The multiple fans in the same group are all fans in the target fan group.
[0100] The first execution unit 806 is used to start the target fan when it is detected that the target fan has changed from an inactive state to an active state, and to reduce the speed of each fan in the same group in batches according to the order of distance from the target fan from near to far.
[0101] Through the embodiments of this application, the presence status information of each fan in the target fan group within the server is obtained by a programmable logic device (CPLD). The presence status information of each fan indicates whether each fan is in a present state. If, based on the presence status information of each fan, it is determined that the target fan in the target fan group is not in a present state, the speed of each fan in the multiple fans in the same group is controlled to a specified speed. These multiple fans are all fans in the target fan group. When a change from an absent state to a present state is detected, the target fan is started, and the speed of each fan in the multiple fans in the same group is reduced in batches according to the order of distance from the target fan from closest to furthest. This solves the problem of fan reversal in related technologies' server fan control methods and reduces the frequency of fan reversal.
[0102] Optionally, the above-mentioned device further includes:
[0103] The second acquisition unit is used to acquire the onboard presence status information of each CPLD in the target CPLD group before acquiring the presence status information of each fan in the target fan group through the programmable logic device CPLD. The CPLDs in the target CPLD group correspond one-to-one with the fans in the target fan group. The onboard presence status information of each CPLD is used to represent the onboard presence status of each CPLD. The acquisition of the presence status information of each fan is performed after it is determined that the onboard presence status information of each CPLD is in the presence state of all CPLDs in the target CPLD group.
[0104] Optionally, the above-mentioned device further includes:
[0105] The reporting unit is used to report a first abnormal alarm message after obtaining the onboard presence status information of each CPLD in the target CPLD group and determining, based on the onboard presence status information of each CPLD, that there are CPLDs in the target CPLD group that are in an absent state. The first abnormal alarm message is used to alarm the CPLDs in the target CPLD group that are in an absent state.
[0106] Optionally, each fan in the target fan group corresponds one-to-one with a CPLD in the target CPLD group, and each fan has multiple on-state information records. These multiple on-state information records for each fan are read from the fan status register of the CPLD corresponding to each fan in a polling manner. The above device further includes:
[0107] The second execution unit, after obtaining the in-situ status information of each fan in the target fan group within the server via a programmable logic device (CPLD), performs the following in-situ status determination operation on each fan as the current fan to determine whether each fan is in an in-situ state:
[0108] The current in-situ state of the fan is determined based on each in-situ state information of the current fan, resulting in multiple state determination results;
[0109] If the proportion of the judgment results corresponding to the in-situ state is greater than or equal to a preset proportion threshold among multiple state judgment results, the current fan is determined to be in the in-situ state.
[0110] If the proportion of the judgment results corresponding to the in-position state is less than a preset proportion threshold among multiple state judgment results, the current fan is determined to be in an out-of-position state.
[0111] Optionally, the control unit includes:
[0112] The first control module is used to, when determining that the target fan in the target fan group is not in position based on the presence status information of each fan, control the speed of all fans in the target fan group other than the target fan to the maximum speed of the other fans, where multiple fans in the same group are all other fans; or...
[0113] The second control module is used to control the speed of the other fans in the target fan group (excluding the target fan) to a specified speed based on their distance from the target fan. Here, multiple fans in the same group refer to all other fans, and the specified speed of each of the other fans is negatively correlated with the distance between the other fans and the target fan; or...
[0114] The third control module is used to control the speed of each fan in the target fan group whose distance from the target fan is less than or equal to a preset distance threshold to the maximum speed of each fan in the same group.
[0115] Optionally, the first execution unit includes:
[0116] The execution module is used to perform at least one speed adjustment operation on multiple fans in the same group until a preset termination condition is met. The preset termination condition includes at least one of the following: the target fan is rotating normally, and the number of unadjusted fans in the same group is 0.
[0117] Determine the current fans in the same group to be adjusted in order of their distance from the target fan to the nearest and farthest.
[0118] Reduce the speed of the current fan in the same group. The reduced speed of the current fan in the same group is the product of the specified speed of the current fan in the same group and the specified ratio.
[0119] The specified ratio used in each speed adjustment operation is positively correlated with the number of times the speed adjustment operation is performed.
[0120] Optionally, the above execution module includes:
[0121] The determination submodule is used to determine the fan closest to the target fan from among the multiple fans in the same group that have not been adjusted, in order of distance from the target fan to the farthest, and obtain the current fans in the same group to be adjusted. The current fans in the same group include the fans in the same group that have been adjusted and at least one fan.
[0122] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0123] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to perform the steps in any of the above method embodiments when it is run.
[0124] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0125] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0126] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0127] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0128] Obviously, those skilled in the art should understand that the modules or steps of the embodiments of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the embodiments of this application are not limited to any particular combination of hardware and software.
[0129] The above description is merely a preferred embodiment of this application and is not intended to limit the embodiments of this application. For those skilled in the art, various modifications and variations can be made to the embodiments of this application. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the embodiments of this application should be included within the protection scope of the embodiments of this application.
Claims
1. A method for controlling a server fan, characterized in that, include: The presence status information of each fan in the target fan group within the server is obtained through a programmable logic device (CPLD). The presence status information of each fan is used to indicate whether each fan is in a present state. The target fan group is a fan module inside the server, and there are at least two fan modules inside the server. When it is determined that the target fan in the target fan group is not in the position based on the position status information of each fan, the speed of each fan in the multiple fans in the same group is controlled at a specified speed of each fan in the same group, wherein the multiple fans in the same group are all fans in the target fan group, and the specified speed of each fan in the same group is higher than the speed of each fan in the same group when the target fan is in the position. When the target fan is detected to change from an off-site state to an on-site state, the target fan is started, and the speed of each fan in the group is reduced in batches according to the order of distance from the target fan from near to far. The area where the target fan group is located is divided into an abnormal area, a secondary abnormal area and an abnormal area according to the distance from the target fan from near to far. The first speed adjustment operation is used to adjust the fan in the abnormal area, the second speed adjustment operation is used to adjust the fan in the abnormal area and the secondary abnormal area, and the third speed adjustment operation is used to adjust the fan in the abnormal area, the secondary abnormal area and the abnormal area. When the server includes a first device, the second speed adjustment operation is executed directly. The first device includes at least one of the following: multiple network cards, a graphics processing unit (GPU) card. When the server includes a second device, the third speed adjustment operation is executed directly. The second device includes a GPU module.
2. The method according to claim 1, characterized in that, Before obtaining the in-situ status information of each fan in the target fan group within the server via a programmable logic device (CPLD), the method further includes: The onboard presence status information of each CPLD in the target CPLD group is obtained, wherein each CPLD in the target CPLD group corresponds one-to-one with a fan in the target fan group. The onboard presence status information of each CPLD is used to indicate the onboard presence status of each CPLD. The acquisition of the presence status information of each fan is performed after it is determined that the onboard presence information of all CPLDs in the target CPLD group is in the presence status.
3. The method according to claim 2, characterized in that, After obtaining the onboard presence status information of each CPLD in the target CPLD group, the method further includes: If, based on the onboard presence status information of each CPLD, it is determined that there is an CPLD in the target CPLD group that is in an absent state, a first abnormal alarm message is reported, wherein the first abnormal alarm message is used to alarm the CPLD in the target CPLD group that is in an absent state.
4. The method according to claim 1, characterized in that, The fans in the target fan group correspond one-to-one with the CPLDs in the target CPLD group. There are multiple on-site status information for each fan. The multiple on-site status information for each fan is read from the fan status register of the CPLD corresponding to each fan in a polling manner. After obtaining the in-situ status information of each fan in the target fan group within the server via a programmable logic device (CPLD), the method further includes: Perform the following on-site status determination operation on each fan as the current fan to determine whether each fan is in an on-site state: The current fan's in-situ state is determined based on each in-situ state information of the current fan, resulting in multiple state determination results; If the proportion of the multiple state determination results corresponding to the in-situ state is greater than or equal to a preset proportion threshold, the current fan is determined to be in the in-situ state. If the proportion of the determination results corresponding to the in-position state among the multiple state determination results is less than a preset proportion threshold, the current fan is determined to be in an out-of-position state.
5. The method according to claim 1, characterized in that, When it is determined, based on the presence status information of each fan, that the target fan in the target fan group is in an off-site state, controlling the speed of each fan in the multiple fans in the same group to a specified speed for each fan in the same group includes: If, based on the presence status information of each fan, it is determined that the target fan in the target fan group is not in position, the speeds of all other fans in the target fan group, excluding the target fan, are controlled to their maximum speeds. Here, the plurality of fans in the same group refers to all the other fans. Alternatively... The rotational speeds of the other fans in the target fan group (excluding the target fan) are controlled at specified speeds based on their distances from the target fan. Here, the plurality of fans in the same group refers to all the other fans, and the specified speeds of different other fans are negatively correlated with the distances between each other fan and the target fan; or... The rotational speed of each fan in the target fan group whose distance from the target fan is less than or equal to a preset distance threshold is controlled at the maximum rotational speed of each fan in the target fan group.
6. The method according to any one of claims 1 to 5, characterized in that, The step of reducing the speed of each fan in the same group in batches according to the order of distance from the target fan (from closest to farthest) includes: Perform at least one speed adjustment operation on the plurality of fans in the same group until a preset termination condition is met, wherein the preset termination condition includes at least one of the following: the target fan is rotating normally, and the number of unadjusted fans in the same group is 0: Determine the current fans in the same group to be adjusted in order of their distance from the target fan to the nearest and farthest. Reduce the speed of the current fan in the same group, wherein the reduced speed of the current fan in the same group is the product of the specified speed of the current fan in the same group and a specified ratio; The specified ratio used in each speed adjustment operation is positively correlated with the number of times the speed adjustment operation is performed.
7. The method according to claim 6, characterized in that, The step of determining the current fans in the same group to be speed-adjusted in order of distance from the target fan (from closest to farthest) includes: Based on the order of distance from the target fan to the nearest, among the unadjusted fans in the plurality of fans in the same group, at least one fan with the closest distance to the target fan is determined to obtain the current fan in the same group to be adjusted, wherein the current fan in the same group includes the fans in the plurality of fans that have been adjusted and the at least one fan.
8. A control device for a server fan, characterized in that, include: The first acquisition unit is used to acquire the in-situ status information of each fan in the target fan group inside the server through a programmable logic device (CPLD). The in-situ status information of each fan is used to indicate whether each fan is in-situ. The target fan group is a fan module inside the server, and there are at least two fan modules inside the server. The control unit is configured to control the rotational speed of each fan in a plurality of fans in the same group to a specified rotational speed when the target fan in the target fan group is determined to be out of service based on the on-site status information of each fan, wherein the plurality of fans in the same group are all fans in the target fan group, and the specified rotational speed of each fan in the same group is higher than the rotational speed of each fan in the same group when the target fan is in service; The first execution unit is used to start the target fan when it is detected that the target fan has changed from an inactive state to an active state, and to reduce the speed of each fan in the group in batches according to the order of distance from the target fan from near to far. The area where the target fan group is located is divided into an abnormal area, a secondary abnormal area and an abnormal area according to the distance from the target fan from near to far. The first speed adjustment operation is used to adjust the fan in the abnormal area, the second speed adjustment operation is used to adjust the fan in the abnormal area and the secondary abnormal area, and the third speed adjustment operation is used to adjust the fan in the abnormal area, the secondary abnormal area and the abnormal area. When the server includes a first device, the second speed adjustment operation is executed directly. The first device includes at least one of the following: multiple network cards, a graphics processing unit (GPU) card. When the server includes a second device, the third speed adjustment operation is executed directly. The second device includes a GPU module.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of claims 1 to 7.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method, system and device for solving fan reversal problem, and medium
CN112506739A
Regulation and control method and system for preventing reversion of hot plug fan, and computer storage medium
CN113074132A
Fan backboard and BMC decoupling method and device, equipment and storage medium
CN115718531A