Power consumption control method, apparatus, device, and storage medium
Through processor detection and coordination in multi-node servers, the node power consumption coordination problem in dynamic power capping is solved, and system stability and energy efficiency are improved.
Patent Information
- Application Number
- CN202411894143.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-12-20
AI Technical Summary
During the dynamic power consumption capping process of multi-node servers, since each node is independent but shares a common power input, it is difficult to coordinate power consumption adjustments during overcurrent events, affecting system stability and energy efficiency.
Through mutual detection between the first processor and the second processor in multiple nodes, the status is determined and in abnormal situations, the second processor calculates the power consumption of the entire machine based on the node power consumption and the power consumption of external devices, and sends the power consumption limit value to external devices and normal nodes to ensure system stability.
It achieves dynamic power consumption capping even when the processor is abnormal, protects system stability, improves energy efficiency, and avoids power consumption control failure caused by abnormal processors.
Smart Images

Figure CN119759196B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of server power consumption management, and in particular to a power consumption control method, device, equipment and storage medium. Background Art
[0002] Dynamic power capping, on the one hand, means that when an overcurrent event is triggered, power consumption can be limited, rather than keeping the server in a power-limited state. When the overcurrent event ends, power consumption is restored to normal. On the other hand, it means that the power consumption limit value can be autonomously calculated based on the machine configuration without human intervention.
[0003] Compared to general-purpose servers, dynamic power capping for multi-node servers presents greater complexity. First, each node is independent, requiring individual node power consumption calculations. Second, each node has a unified power input and relies on a common PSU (Power Supply Unit). When an overcurrent event is triggered, each node must collectively adjust its power consumption to reduce system power consumption.
[0004] The dynamic power capping of multi-node servers is jointly implemented by the MPCPLD (MidPlane Complex Programmable Logic Device) and the BMC (Baseboard Management Controller). If any of them fails, it will affect the implementation of the dynamic power capping function of the multi-node server.
[0005] Therefore, in view of the shortcomings of the existing technical solutions, the present invention provides a power consumption control method. Summary of the Invention
[0006] Based on this, it is necessary to provide a power consumption control method, device, equipment and storage medium to address the above technical problems.
[0007] On the one hand, a power consumption control method is provided, which is applied to a multi-node server, wherein the multi-node server includes multiple nodes, a second processor, an external device and a power supply unit, wherein each node includes a first processor, and the multiple nodes, the external device and the power supply unit are respectively connected to the second processor. The method includes: the first processors and the second processors in the multiple nodes determine the status of the first processors and the second processors through mutual detection; in response to an abnormality of one or more first processors in the multiple nodes, the second processor determines the node power consumption corresponding to the abnormal first processor based on the received node power consumption, and the second processor determines the power consumption of the entire machine based on the node power consumption of each node and the power consumption of the external device; when the second processor receives an overcurrent alarm signal sent by the power supply unit, the second processor determines and sends a power consumption limit value to the external device and the node corresponding to the first processor in normal status based on the power consumption of the entire machine; in response to an abnormality of the second processor, when the first processor in each node receives an abnormal signal sent by the power supply unit, the first processor in each node obtains information of the power supply unit through a bus, and determines the power consumption limit value of each node based on the information of the power supply unit.
[0008] Optionally, the first processor and the second processor in the multiple nodes determine the status of the first processor and the second processor through mutual detection, including: the first processors in the multiple nodes are respectively connected to the second processor through pins; the first processor and the second processor detect changes in pin levels, and determine the status of the first processor and the second processor based on the changes in the pin levels.
[0009] Optionally, the first processor and the second processor in the multiple nodes determine the status of the first processor and the second processor through mutual detection, including: the first processor in the multiple nodes sends an excitation signal to the second processor respectively; if the first processor in the multiple nodes detects that no response is received from the second processor within a first time interval after sending the excitation signal, it determines that the status of the second processor is an abnormal state; the second processor monitors and does not receive the first excitation signal sent by the first processor of each node within a preset second time interval, and determines that the status of the first processor that did not send the signal is an abnormal state.
[0010] Optionally, the second processor determines the node power consumption corresponding to the abnormal first processor based on the received node power consumption, including: the second processor determines the maximum value of multiple node power consumptions based on the received node power consumptions corresponding to multiple normal first processors; the second processor uses the maximum value as the node power consumption corresponding to one or more abnormal first processors.
[0011] Optionally, when the second processor receives an overcurrent alarm signal sent by the power supply unit, it determines and sends a power consumption limit value to the external device and the node corresponding to the first processor in a normal state based on the power consumption of the entire machine, including: the second processor determines and sends the power consumption limit value of the external device to the external device based on the power consumption of the entire machine; determines the total power consumption of multiple nodes corresponding to the first processors in a normal state based on the power consumption of the entire machine and the power consumption limit value of the external device; determines and sends the power consumption limit value corresponding to each node corresponding to the first processor in a normal state to each node corresponding to the first processor in a normal state based on the total power consumption and the power consumption requirement of the node corresponding to each first processor in a normal state.
[0012] Optionally, before responding to the exception of the second processor, the method also includes: the second processor determines the configuration of the entire machine based on the power consumption of the entire machine, wherein the configuration of the entire machine includes the configuration of the power supply unit; and the second processor sends the configuration of the entire machine to the first processor in each node.
[0013] Optionally, the first processor in each node obtains information about the power supply unit through a bus, and determines the power consumption limit value of each node based on the information about the power supply unit, including: the first processor in each node obtains the status register of the power supply unit through a power management bus, and determines whether there is a data abnormality in the status register; when there is a data abnormality in the status register, the first processor in each node obtains the on-site status of the power supply unit through the power management bus; compares the configuration of the power supply unit in the whole machine configuration with the on-site status of the power supply unit, and when the configuration of the power supply unit in the whole machine configuration and the on-site status of the power supply unit are the same, determines that the on-site status of the power supply unit is normal; when the on-site status is normal and the data in the status register is abnormal, determines that the power supply unit is in an overcurrent state; the first processor in each node calculates the power consumption limit value corresponding to each node based on the power consumption requirement of each node; the first processor in each node controls the power consumption of each node based on the power consumption limit value.
[0014] In another aspect, a power consumption control device is provided, which is applied to a multi-node server including a plurality of nodes, a second processor, an external device and a power supply unit, wherein each node includes a first processor, the plurality of nodes, the external device and the power supply unit are connected with the second processor respectively, and the device includes: a detection module, configured to determine the states of the first processors and the second processor through mutual detection between the first processors and the second processor in the plurality of nodes; a first processing module, configured to, in response to one or more first processors in the plurality of nodes being abnormal, determine the node power consumption corresponding to the abnormal first processor according to the received node power consumption by the second processor, and determine the overall power consumption according to the node power consumption of each node and the power consumption of the external device by the second processor; a second processing module, configured to, when the second processor receives an over-current alarm signal sent by the power supply unit, determine and send a power consumption limit value to the external device and the node corresponding to the first processor in a normal state according to the overall power consumption; and a third processing module, configured to, in response to the second processor being abnormal, when the first processor in each node receives an abnormal signal sent by the power supply unit, acquire information of the power supply unit by the first processor in each node through a bus, and determine the power consumption limit value of each node according to the information of the power supply unit.
[0015] In another aspect, a computer device is provided, which includes a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the following steps when executing the computer program: determining the states of the first processors and the second processor through mutual detection between the first processors and the second processor in the plurality of nodes; in response to one or more first processors in the plurality of nodes being abnormal, determining the node power consumption corresponding to the abnormal first processor according to the received node power consumption by the second processor, and determining the overall power consumption according to the node power consumption of each node and the power consumption of the external device by the second processor; when the second processor receives an over-current alarm signal sent by the power supply unit, determining and sending a power consumption limit value to the external device and the node corresponding to the first processor in a normal state according to the overall power consumption; and in response to the second processor being abnormal, when the first processor in each node receives an abnormal signal sent by the power supply unit, acquiring information of the power supply unit by the first processor in each node through a bus, and determining the power consumption limit value of each node according to the information of the power supply unit.
[0016] On the other hand, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: the first processor and the second processor in multiple nodes determine the status of the first processor and the second processor through mutual detection; in response to an abnormality of one or more first processors in multiple nodes, the second processor determines the node power consumption corresponding to the abnormal first processor based on the received node power consumption, and the second processor determines the power consumption of the entire machine based on the node power consumption of each node and the power consumption of external devices; when the second processor receives an overcurrent alarm signal sent by the power supply unit, the second processor determines and sends the power consumption limit value to the external device and the node corresponding to the first processor in normal status based on the power consumption of the entire machine; in response to an abnormality of the second processor, when the first processor in each node receives the abnormal signal sent by the power supply unit, the first processor in each node obtains the information of the power supply unit through a bus, and determines the power consumption limit value of each node based on the information of the power supply unit.
[0017] The above-mentioned power consumption control method, device, equipment and storage medium, the method includes: the first processor and the second processor in multiple nodes determine the status of the first processor and the second processor through mutual detection; in response to the abnormality of one or more first processors in multiple nodes, the second processor determines the node power consumption corresponding to the abnormal first processor based on the received node power consumption, and the second processor determines the power consumption of the entire machine based on the node power consumption of each node and the power consumption of the external device; when the second processor receives an overcurrent alarm signal sent by the power supply unit, it determines and sends the power consumption limit value to the external device and the node corresponding to the normal first processor based on the power consumption of the entire machine; in response to the abnormality of the second processor, when the first processor in each node receives the abnormal signal sent by the power supply unit, the first processor in each node obtains the information of the power supply unit through the bus, and determines the power consumption limit value of each node based on the information of the power supply unit; in this way, when the first processor or the second processor is in an abnormal state, dynamic power consumption capping can still be performed, thereby protecting system stability and improving energy efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 1 is a flow chart of a power consumption control method according to an embodiment;
[0019] Figure 2 A schematic diagram of the dynamic power consumption capping state flow of a power consumption control method in one embodiment;
[0020] Figure 3 A schematic diagram of the system architecture of a power consumption control method according to an embodiment;
[0021] Figure 4is a structural block diagram of a power consumption control device in one embodiment;
[0022] Figure 5 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0023] To make the purpose, technical solutions, and advantages of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0024] It should be understood that in the description of this application, unless the context clearly requires otherwise, words such as "include", "comprises", and the like throughout the specification should be interpreted as inclusive rather than exclusive or exhaustive; that is, as "including but not limited to".
[0025] It should also be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, the meaning of "plurality" is two or more.
[0026] It should be noted that the terms "S1", "S2", etc. are used only for the purpose of describing the steps and do not specifically refer to the order or sequence, nor are they used to limit this application. They are merely for the convenience of describing the method of this application and should not be understood as indicating the order of the steps. In addition, the technical solutions between the various embodiments can be combined with each other, but this must be based on the fact that ordinary technicians in this field can implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0027] In one embodiment, Figure 1 As shown, a power consumption control method is provided, which is applied to a multi-node server, wherein the multi-node server includes multiple nodes, a second processor, an external device, and a power supply unit, wherein each node includes a first processor, and the multiple nodes, the external device, and the power supply unit are respectively connected to the second processor, comprising the following steps:
[0028] S101: First processors and second processors in multiple nodes detect each other to determine states of the first processors and the second processors.
[0029] Here, the status of the processor includes a normal state and an abnormal state.
[0030] Here, the first processor is used for managing each node, and the second processor is used for managing multiple nodes, external devices, and a power unit, etc.
[0031] Here, the abnormal state refers to a state in which the processor cannot work normally due to flash refreshing during upgrading, code runaway, or other problems, and cannot support existing functions, in which case the processor is in an abnormal state.
[0032] For example, the first processor can be a BMC, and the second processor can be an MPCPLD. The dynamic power consumption ceiling function is completed by the MPCPLD and the BMC.
[0033] Here, the first processor in the abnormal state can be one first processor in the abnormal state, or multiple first processors in the abnormal state.
[0034] S102: In response to one or more first processors in multiple nodes being abnormal, the second processor determines the node power consumption corresponding to the abnormal first processor according to the received node power consumption, and determines the overall machine power consumption according to the node power consumption of each node and the power consumption of external devices.
[0035] Here, the power consumption of the external device can be the power consumption of a fan, a hard disk, etc.
[0036] Here, the first processor collects the node power consumption of each node and sends it to the second processor.
[0037] Specifically, when the first processor is in an abnormal state, it cannot collect node power consumption and send it to the second processor. The second processor determines the node power consumption of the abnormal node according to the received node power consumption, and thus calculates the overall machine power consumption.
[0038] In one embodiment, the second processor can preset a time range, and record whether the node power consumption of the node corresponding to the first processor in a normal state is received within the preset time range. If not, the power consumption control is ended. In this way, it can be prevented that the first processor of the existing node is normal, but the node power consumption cannot be sent in time, resulting in the influence of other links.
[0039] In one embodiment, the second processor sequentially detects whether the node corresponding to one or more abnormal first processors is in place. When it is detected that the node corresponding to the abnormal first processor is not in place, the power consumption control is ended.
[0040] S103: When the second processor receives the overcurrent alarm signal sent by the power unit, it determines and sends a power consumption limit value to the external device and the node corresponding to the first processor in a normal state according to the overall machine power consumption.
[0041] Here, the second processor may receive the overcurrent alarm signal sent by the power supply unit through a pin connected to the power supply unit.
[0042] Here, the power supply unit includes a plurality of PSUs for providing power.
[0043] The power consumption limit value includes the power consumption limit value of the external device and the power consumption limit value of the node, and the power consumption limit value of each node may be different.
[0044] Specifically, the power consumption of the node corresponding to the first processor in an abnormal state will not be reduced. The second processor can reduce the power consumption of the external device by controlling the power consumption limit value of the external device. At the same time, based on the power consumption of the entire machine, the power consumption limit value of each node corresponding to the first processor in a normal state is determined, and the power consumption limit value is sent to each node corresponding to the first processor in a normal state.
[0045] In one embodiment, after the second processor adjusts the power consumption limit value of the external device and the power consumption limit value of the node corresponding to the first processor in normal status, the second processor still receives the overcurrent alarm signal sent by the power supply unit, and then cuts off the power supply of the node corresponding to the abnormal first processor to protect the normal operation of other nodes.
[0046] S104: In response to the abnormality of the second processor, when the first processor in each node receives the abnormal signal sent by the power supply unit, the first processor in each node obtains the information of the power supply unit through the bus, and determines the power consumption limit value of each node based on the information of the power supply unit.
[0047] Here, the abnormal signal is used to indicate that the power supply unit is in an abnormal state, and cannot specifically indicate the type of abnormality.
[0048] In one embodiment, before the first processor in each node receives the abnormal signal sent by the power supply unit, it is assumed that the second processor is in an abnormal state. At this time, the first processor cannot calculate the power consumption and configuration of the entire machine. At this time, the dynamic power consumption capping function is turned off, the power consumption control is ended, and the first processor of each node automatically exits the dynamic power consumption capping state.
[0049] It should be noted that the present application implements a dynamic power consumption capping function when the first processor or the second processor is in an abnormal state.
[0050] In some specific embodiments, the first processor and the second processor in the multiple nodes determine the states of the first processor and the second processor by mutual detection, including:
[0051] The first processors in the multiple nodes are respectively connected to the second processors via pins;
[0052] The first processor and the second processor detect changes in pin levels, and determine states of the first processor and the second processor according to the changes in the pin levels.
[0053] Here, the pin may be a GPIO pin, a general-purpose input / output pin, used to implement input and output of digital signals.
[0054] Specifically, the first processor and the second processor of each node are connected through two pins. One pin is used by the first processor to detect whether the second processor is in an abnormal state, and the other pin is used by the second processor to detect whether the first processor is in an abnormal state. When one of the processors is detected to be in an abnormal state, the pin level will change, and the other processor will detect the change in the pin and detect the processor in the abnormal state.
[0055] In this way, the first processor and the second processor are connected through the pins to detect the status of the processors, and the signal is stable and the response speed is fast.
[0056] In some specific embodiments, the first processor and the second processor in the multiple nodes determine the states of the first processor and the second processor by mutual detection, including:
[0057] The first processors in the plurality of nodes respectively send an excitation signal to the second processors;
[0058] If the first processor of the plurality of nodes detects that no response is received from the second processor within a first time interval after the stimulus signal is sent, determining that the state of the second processor is an abnormal state;
[0059] The second processor monitors that the first excitation signal sent by the first processor of each node is not received within a preset second time interval, and determines that the state of the first processor that does not send the signal is an abnormal state.
[0060] Here, the sizes of the first time interval and the second time interval can be adjusted according to user needs.
[0061] The multiple first processors may send excitation signals to the second processor simultaneously, or may send excitation signals to the second processor at different times.
[0062] Specifically, a request and response mechanism is used. The first processor sends an activation signal to the second processor at regular intervals. Upon receiving the signal from the first processor, the second processor responds. If neither the first processor nor the second processor sends a response signal within a certain period of time, it indicates that one of the processors is in an abnormal state.
[0063] In one embodiment, the second processor may also send an excitation signal to the multiple first processors and receive responses from the first processors to detect whether the multiple first processors are in an abnormal state.
[0064] In this way, by sending an excitation signal to detect the status of the processor, mutual detection can be achieved without occupying hardware resources.
[0065] In some specific implementations, the second processor determines the node power consumption corresponding to the abnormal first processor based on the received node power consumption, including:
[0066] The second processor determines a maximum value of the multiple node power consumptions based on the received node power consumptions corresponding to the multiple normal first processors;
[0067] The second processor uses the maximum value as the power consumption of nodes corresponding to the one or more abnormal first processors.
[0068] In one embodiment, the user may set the configuration of each node in advance. When the first processor is abnormal, the power consumption corresponding to the preset configuration is used as the power consumption of the abnormal node received by the second processor.
[0069] In this way, the problem that the first processor is unable to report the node power consumption due to being in an abnormal state can be solved.
[0070] In some specific embodiments, when the second processor receives the overcurrent alarm signal sent by the power supply unit, determining and sending the power consumption limit value to the external device and the node corresponding to the first processor in a normal state according to the power consumption of the entire machine includes:
[0071] The second processor determines, based on the overall power consumption of the device, and sends the power consumption limit value of the external device to the external device;
[0072] Determine the total power consumption of nodes corresponding to the plurality of first processors in normal states according to the power consumption of the entire machine and the power consumption limit value of the external device;
[0073] According to the total power consumption value and the power consumption requirement of the node corresponding to each normal first processor, the power consumption limit value corresponding to the node corresponding to each normal first processor is determined and sent to the node corresponding to each normal first processor.
[0074] Here, the power consumption requirement of the node can be determined according to the current operating state of the node, the configuration of the node, etc.
[0075] The total power consumption value may be allocated by weighting or other methods to determine the power consumption limit value of each node.
[0076] Thus, different power consumption limit values are configured according to different power consumption requirements of each normal node, and the influence of the power consumption limit on the node corresponding to the state normal first processor is reduced.
[0077] In some embodiments, before the response to the second processor exception, the method further comprises:
[0078] The second processor determines a whole machine configuration according to the whole machine power consumption, wherein the whole machine configuration comprises a configuration of a power supply unit;
[0079] The second processor sends the whole machine configuration to the first processor in each node.
[0080] Here, the power supply unit comprises a plurality of PSUs, and a part or all of the PSUs are determined to be enabled according to the whole machine power consumption and the whole machine configuration.
[0081] The whole machine power consumption is required to be less than or equal to the maximum value of the power consumption supported by all the PSUs in the power supply unit.
[0082] Further, the second processor sends the whole machine configuration and the whole machine power consumption to the first processor in each node after determining the whole machine configuration, and the first processor checks whether the whole machine power consumption meets the requirement of power consumption capping after receiving the whole machine configuration and the whole machine power consumption, and if not, the dynamic power consumption capping is closed. Exemplarily, there can be a case that the maximum power consumption that can be supported by the power supply unit is less than the whole machine power consumption, and there can also be a case that the whole machine power consumption is calculated as 0 due to transmission error.
[0083] In some embodiments, the first processor in each node obtains information of the power supply unit through a bus, and determines a power consumption limit value of each node according to the information of the power supply unit, comprising:
[0084] The first processor in each node obtains a state register of the power supply unit through a power management bus, and determines whether there is a data exception in the state register;
[0085] When there is a data exception in the state register, the first processor in each node obtains an in-place state of the power supply unit through the power management bus;
[0086] The configuration of the power supply unit in the whole machine configuration and the in-place state of the power supply unit are compared, and when the configuration of the power supply unit in the whole machine configuration and the in-place state of the power supply unit are the same, it is determined that the in-place state of the power supply unit is normal;
[0087] When the in-place state is normal and the data exception of the state register exists, it is determined that the power supply unit is in an overcurrent state;
[0088] The first processor in each node calculates a power consumption limit value corresponding to each node according to the power consumption requirement of each node;
[0089] The first processor in each node controls the power consumption of each node according to the power consumption limit value.
[0090] Here, when the second processor is in an abnormal state, the first processor and the power supply unit may interact via a PMBUS (Power Management Bus).
[0091] Among them, whether the node is in place can be detected through sensors, conductive contacts, dedicated signal lines, bus interfaces, etc.
[0092] Among them, when the second processor is abnormal, the first processor receives the abnormal signal sent by the power supply unit and cannot determine the specific abnormal type of the power supply unit. By detecting the in-place status and status register of the power supply unit, it is determined that the power supply unit is overcurrent abnormal, thereby implementing power consumption control.
[0093] Specifically, when the second processor is abnormal, the first processor cannot obtain the power consumption control instruction sent by the second processor. The first processor receives the whole machine configuration sent by the second processor. The first processor interacts with the power supply unit through PMBUS to detect the in-place status and status register of the power supply unit. When the in-place status of the power supply unit does not meet the whole machine configuration and the status register data is abnormal, multiple nodes need to perform power consumption control. Each first processor determines the power consumption limit value of the corresponding node based on the power consumption requirements of the node, and sends it to the corresponding ME (Management Engine) for power consumption control.
[0094] In one embodiment, when the first processor is normal, after power is restored or the second processor is restored, the power of the node corresponding to the first processor is reset to normal.
[0095] In this way, when the second processor is in an abnormal state, the first processor can control the power consumption of each node.
[0096] In some specific implementations, when the first processor in each node receives the abnormal signal sent by the power supply unit, the process includes:
[0097] The first processor records the duration of receiving the abnormal signal;
[0098] The duration is compared with a standard duration, and when the duration is greater than the standard duration, power consumption control is performed on each node.
[0099] Here, the standard duration can be set according to user needs.
[0100] In this way, misjudgment of abnormal situations can be avoided through continuous abnormal signals.
[0101] In one embodiment, Figure 2 This is a schematic diagram of the dynamic power consumption capping state flow in the embodiment of the present application, such as Figure 2 As shown, the dynamic power consumption capping state flow includes: when the dynamic power consumption capping function is not enabled, it is in the dynamic power consumption capping closed state; when this function is enabled, the first processor will calculate the current node power consumption according to the current configuration of the node, and after the calculation is completed, the result will be sent to the second processor; after the second processor receives the node power consumption sent by the first processor of all nodes, it accumulates the values, calculates the power consumption of the entire machine, and calculates the entire machine configuration information based on the entire machine power consumption, and sends the configuration information to the first processor. When it is not enabled or the accumulation timeout occurs, it is in the dynamic power consumption capping closed state; the second processor monitors the health status of the power supply unit. After receiving the entire machine configuration information of the second processor, the first processor checks whether the configuration meets the power consumption capping requirements. If not, it is in the dynamic power consumption capping closed state; if it meets the requirements, the first processor starts to monitor the throttling signal sent by the second processor. If the signal is received, the node power consumption is capped.
[0102] In one embodiment, Figure 3 This is a schematic diagram of the system architecture in the embodiment of the present application. Figure 3 As shown, the system architecture in this application includes: multiple nodes, MPCPLD or CMC, power supply unit and external devices.
[0103] Specifically, each of the multiple nodes consists of a mainboard and external devices, including a network card, a RAID (Redundant Arrays of Independent Disks) card, a BMC, a mainboard CPLD (Complex Programmable Logic Device), a CPU (Central Processing Unit), memory, and an ME. Each node can be managed through the BMC on its own mainboard. Each node's BMC can request information about common components in the entire system by sending a request to the MPCPLD or CMC.
[0104] Specifically, the MPCPLD or CMC manages all nodes, processes multi-node information, and manages external devices and power supply units. The MPCPLD or CMC delivers power from the power supply unit to each node and external device, and can obtain the health status of the power supply unit. The MPCPLD or CMC can also control fan speed and obtain hard disk information.
[0105] Specifically, the power supply unit is used to supply power to the entire machine.
[0106] Specifically, the external devices may include fans, hard disks, etc. The external devices are centrally managed by the MPCPLD or CMC.
[0107] For example, when a PSU in a power supply unit fails, the unit sends an overcurrent alarm signal to the MPCPLD. Upon receiving the overcurrent alarm signal, the MPCPLD sends a throttling signal to the BMC of each node, triggering the BMC to cap power consumption. Once the BMC has capped power consumption, it notifies the MPCPLD that throttling is complete. The MPCPLD then waits for the failed PSU to be replaced with a healthy one before clearing the alarm.
[0108] It should be understood that although Figure 1-3 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. In addition, Figure 1-3 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0109] In one embodiment, Figure 4As shown, a power consumption control device is provided, which is applied to a multi-node server. The multi-node server includes multiple nodes, a second processor, an external device, and a power supply unit, wherein each node includes a first processor, and the multiple nodes, the external device, and the power supply unit are respectively connected to the second processor. The device includes: a detection module 401, which is used for the first processor and the second processor in the multiple nodes to determine the status of the first processor and the second processor through mutual detection; a first processing module 402, which is used for, in response to one or more first processors in the multiple nodes being abnormal, the second processor to determine the node power consumption corresponding to the abnormal first processor based on the received node power consumption, and the second processor to determine the entire machine power consumption based on the node power consumption of each node and the power consumption of the external device; a second processing module 403, which is used for, when the second processor receives an overcurrent alarm signal sent by the power supply unit, to determine and send a power consumption limit value to the external device and the node corresponding to the first processor in normal state based on the entire machine power consumption; a third processing module 404, which is used for, when the first processor in each node receives an abnormal signal sent by the power supply unit in response to the second processor being abnormal, the first processor in each node to obtain information about the power supply unit through a bus, and determine the power consumption limit value of each node based on the information of the power supply unit.
[0110] As a preferred implementation, in an embodiment of the present application, the detection module 401 is specifically used for: the first processors in the multiple nodes are respectively connected to the second processors through pins; the first processor and the second processor detect changes in pin levels, and determine the status of the first processor and the second processor based on the changes in the pin levels.
[0111] As a preferred implementation, in an embodiment of the present application, the detection module 401 is specifically used for: the first processor in the multiple nodes sends an excitation signal to the second processor respectively; if the first processor in the multiple nodes detects that it does not receive a response from the second processor within a first time interval after sending the excitation signal, it determines that the state of the second processor is an abnormal state; the second processor monitors and does not receive the first excitation signal sent by the first processor of each node within a preset second time interval, and determines that the state of the first processor that did not send the signal is an abnormal state.
[0112] As a preferred implementation, in an embodiment of the present application, the first processing module 402 is specifically used for: the second processor determines the maximum value of multiple node power consumptions based on the received node power consumptions corresponding to multiple normal first processors; the second processor uses the maximum value as the node power consumption corresponding to one or more abnormal first processors.
[0113] As a preferred implementation, in an embodiment of the present application, the second processing module 403 is specifically used for: the second processor determines and sends the power consumption limit value of the external device to the external device based on the power consumption of the entire machine; determines the total power consumption value of the nodes corresponding to multiple first processors in normal states based on the power consumption of the entire machine and the power consumption limit value of the external device; determines and sends the power consumption limit value corresponding to the node corresponding to each first processor in normal state to the node corresponding to each first processor in normal state based on the total power consumption value and the power consumption requirements of the node corresponding to each first processor in normal state.
[0114] As a preferred implementation method, in an embodiment of the present application, the device also includes a fourth processing device, and the fourth processing module is specifically used to: the second processor determines the configuration of the entire machine based on the power consumption of the entire machine, wherein the configuration of the entire machine includes the configuration of the power supply unit; the second processor sends the configuration of the entire machine to the first processor in each node.
[0115] As a preferred implementation manner, in an embodiment of the present application, the third processing module 404 is specifically used for: the first processor in each node obtains the status register of the power supply unit through the power management bus to determine whether there is a data abnormality in the status register; when there is a data abnormality in the status register, the first processor in each node obtains the in-place status of the power supply unit through the power management bus; compares the configuration of the power supply unit in the whole machine configuration and the in-place status of the power supply unit, and when the configuration of the power supply unit in the whole machine configuration and the in-place status of the power supply unit are the same, determines that the in-place status of the power supply unit is normal; when the in-place status is normal and the data in the status register is abnormal, determines that the power supply unit is in an overcurrent state; the first processor in each node calculates the power consumption limit value corresponding to each node according to the power consumption requirement of each node; the first processor in each node controls the power consumption of each node according to the power consumption limit value.
[0116] For the specific definition of the power consumption control device, please refer to the definition of the power consumption control method above, which will not be repeated here. The various modules in the above-mentioned power consumption control device can be implemented in whole or in part by software, hardware, and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0117] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 5As shown. The computer device includes a processor, memory, and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, it implements a power consumption control method.
[0118] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0119] In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the following steps are implemented when the processor executes the computer program: S1: a first processor and a second processor in a plurality of nodes determine the status of the first processor and the second processor through mutual detection; S2: in response to an abnormality in one or more first processors in a plurality of nodes, the second processor determines the node power consumption corresponding to the abnormal first processor based on the received node power consumption, and the second processor determines the power consumption of the entire machine based on the node power consumption of each node and the power consumption of an external device; S3: when the second processor receives an overcurrent alarm signal sent by a power supply unit, the second processor determines and sends a power consumption limit value to the external device and the node corresponding to the first processor in a normal state based on the power consumption of the entire machine; S4: in response to an abnormality in the second processor, when the first processor in each node receives an abnormality signal sent by the power supply unit, the first processor in each node obtains information of the power supply unit through a bus, and determines the power consumption limit value of each node based on the information of the power supply unit.
[0120] In one embodiment, when the processor executes the computer program, the following steps are further implemented: the first processors in the multiple nodes are respectively connected to the second processors through pins; the first processor and the second processor detect changes in pin levels, and determine the states of the first processor and the second processor based on the changes in the pin levels.
[0121] In one embodiment, when the processor executes the computer program, the following steps are also implemented: the first processors in the multiple nodes respectively send excitation signals to the second processors; if the first processors in the multiple nodes detect that no response is received from the second processor within a first time interval after sending the excitation signal, the state of the second processor is determined to be an abnormal state; the second processor monitors and does not receive the first excitation signal sent by the first processor of each node within a preset second time interval, and determines that the state of the first processor that did not send the signal is an abnormal state.
[0122] In one embodiment, when the processor executes the computer program, the following steps are also implemented: the second processor determines the maximum value among multiple node power consumptions based on the received node power consumptions corresponding to multiple normal first processors; the second processor uses the maximum value as the node power consumption corresponding to one or more abnormal first processors.
[0123] In one embodiment, when the processor executes the computer program, the following steps are also implemented: the second processor determines and sends the power consumption limit value of the external device to the external device based on the power consumption of the entire machine; determines the total power consumption value of the nodes corresponding to multiple first processors in normal states based on the power consumption of the entire machine and the power consumption limit value of the external device; determines and sends the power consumption limit value corresponding to the node corresponding to each first processor in normal state to the node corresponding to each first processor in normal state based on the total power consumption value and the power consumption requirement of the node corresponding to each first processor in normal state.
[0124] In one embodiment, when the processor executes the computer program, the following steps are further implemented: the second processor determines the configuration of the entire machine based on the power consumption of the entire machine, wherein the configuration of the entire machine includes the configuration of the power supply unit; and the second processor sends the configuration of the entire machine to the first processor in each node.
[0125] In one embodiment, when the processor executes the computer program, the following steps are also implemented: the first processor in each node obtains the status register of the power supply unit through the power management bus to determine whether there is a data abnormality in the status register; when there is a data abnormality in the status register, the first processor in each node obtains the in-place status of the power supply unit through the power management bus; compares the configuration of the power supply unit in the whole machine configuration with the in-place status of the power supply unit, and when the configuration of the power supply unit in the whole machine configuration and the in-place status of the power supply unit are the same, determines that the in-place status of the power supply unit is normal; when the in-place status is normal and the data in the status register is abnormal, determines that the power supply unit is in an overcurrent state; the first processor in each node calculates the power consumption limit value corresponding to each node according to the power consumption requirement of each node; the first processor in each node controls the power consumption of each node according to the power consumption limit value.
[0126] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: S1: the first processor and the second processor in multiple nodes determine the status of the first processor and the second processor through mutual detection; S2: in response to an abnormality of one or more first processors in multiple nodes, the second processor determines the node power consumption corresponding to the abnormal first processor based on the received node power consumption, and the second processor determines the power consumption of the entire machine based on the node power consumption of each node and the power consumption of external devices; S3: when the second processor receives an overcurrent alarm signal sent by a power supply unit, the second processor determines and sends a power consumption limit value to the external device and the node corresponding to the first processor in normal status based on the power consumption of the entire machine; S4: in response to an abnormality of the second processor, when the first processor in each node receives an abnormal signal sent by the power supply unit, the first processor in each node obtains information of the power supply unit through a bus, and determines the power consumption limit value of each node based on the information of the power supply unit.
[0127] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: the first processors in the multiple nodes are respectively connected to the second processors through pins; the first processor and the second processor detect changes in pin levels, and determine the states of the first processor and the second processor based on the changes in the pin levels.
[0128] In one embodiment, the computer program, when executed by the processor, further implements the following steps: the first processor in the plurality of nodes respectively sends an excitation signal to the second processor; the first processor in the plurality of nodes determines that the state of the second processor is an abnormal state if it detects that no response from the second processor is received within a first time interval after sending the excitation signal; and the second processor determines that the state of the first processor that does not send the first excitation signal is an abnormal state if it does not receive the first excitation signal sent by the first processor of each node within a preset second time interval.
[0129] In one embodiment, the computer program, when executed by the processor, further implements the following steps: the second processor determines the maximum value of the plurality of node power consumptions according to the received plurality of normal first processor corresponding node power consumptions; and the second processor takes the maximum value as the node power consumption corresponding to one or more abnormal first processors.
[0130] In one embodiment, the computer program, when executed by the processor, further implements the following steps: the second processor determines and sends the power consumption limit value of the external device to the external device according to the overall power consumption; determines the total power consumption value of the nodes corresponding to the normal first processors according to the overall power consumption and the power consumption limit value of the external device; and determines and sends the power consumption limit value corresponding to each node corresponding to the normal first processor to each node corresponding to the normal first processor according to the total power consumption value and the power consumption demand of each node corresponding to the normal first processor.
[0131] In one embodiment, the computer program, when executed by the processor, further implements the following steps: the second processor determines the overall configuration according to the overall power consumption, wherein the overall configuration includes the configuration of the power supply unit; and the second processor sends the overall configuration to the first processor in each node.
[0132] In one embodiment, the computer program, when executed by the processor, further implements the following steps: the first processor in each node acquires the status register of the power supply unit through the power management bus, and determines whether the status register has data exception; when the status register has data exception, the first processor in each node acquires the in-place state of the power supply unit through the power management bus; the configuration of the power supply unit in the whole machine configuration and the in-place state of the power supply unit are compared, and when the configuration of the power supply unit in the whole machine configuration and the in-place state of the power supply unit are the same, it is determined that the in-place state of the power supply unit is normal; when the in-place state is normal and the data exception of the status register, it is determined that the power supply unit is in an overcurrent state; the first processor in each node calculates the power consumption limit value corresponding to each node according to the power consumption demand of each node; and the first processor in each node performs power consumption control on each node according to the power consumption limit value.
[0133] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, the processes of the above-mentioned embodiments can be included. Any reference to memory, storage, database or other medium used in the embodiments provided in the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0134] The technical features of the above embodiments can be combined in any manner. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described, but as long as the combinations of the technical features do not exist, they should be considered as the scope of the present disclosure.
[0135] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.
Claims
1. A power consumption control method, characterized in that: Applied to a multi-node server, the multi-node server includes multiple nodes, a second processor, an external device, and a power supply unit, wherein each node includes a first processor, the multiple nodes, the external device, and the power supply unit are respectively connected to the second processor, the method comprising: The first processor and the second processor in the plurality of nodes determine states of the first processor and the second processor by mutual detection; In response to one or more first processors in the plurality of nodes being abnormal, the second processor determines, based on the received node power consumption, a node power consumption corresponding to the abnormal first processor, and the second processor determines the power consumption of the entire machine based on the node power consumption of each node and the power consumption of external devices; When the second processor receives the overcurrent alarm signal sent by the power supply unit, it determines and sends the power consumption limit value to the external device and the node corresponding to the first processor in normal state according to the power consumption of the entire machine; In response to the abnormality of the second processor, when the first processor in each node receives the abnormal signal sent by the power supply unit, the first processor in each node obtains the information of the power supply unit through the bus and determines the power consumption limit value of each node based on the information of the power supply unit.
2. The power consumption control method according to claim 1, wherein: The first processor and the second processor in the multiple nodes determine states of the first processor and the second processor by mutual detection, including: The first processors in the multiple nodes are respectively connected to the second processors via pins; The first processor and the second processor detect changes in pin levels, and determine states of the first processor and the second processor according to the changes in the pin levels.
3. The power consumption control method according to claim 1, wherein: The first processor and the second processor in the multiple nodes determine states of the first processor and the second processor by mutual detection, including: The first processors in the plurality of nodes respectively send an excitation signal to the second processors; If the first processor of the plurality of nodes detects that no response is received from the second processor within a first time interval after the stimulus signal is sent, determining that the state of the second processor is an abnormal state; The second processor monitors that the first excitation signal sent by the first processor of each node is not received within a preset second time interval, and determines that the state of the first processor that does not send the signal is an abnormal state.
4. The power consumption control method according to claim 1, wherein: The second processor determines, based on the received node power consumption, the node power consumption corresponding to the abnormal first processor, including: The second processor determines a maximum value of the multiple node power consumptions based on the received node power consumptions corresponding to the multiple normal first processors; The second processor uses the maximum value as the power consumption of nodes corresponding to the one or more abnormal first processors.
5. The power consumption control method according to claim 1, wherein: When the second processor receives the overcurrent alarm signal sent by the power supply unit, determining and sending the power consumption limit value to the external device and the node corresponding to the first processor in a normal state according to the power consumption of the entire machine, including: The second processor determines, based on the overall power consumption of the device, and sends the power consumption limit value of the external device to the external device; Determine the total power consumption of nodes corresponding to the plurality of first processors in normal states according to the power consumption of the entire machine and the power consumption limit value of the external device; According to the total power consumption value and the power consumption requirement of the node corresponding to each normal first processor, the power consumption limit value corresponding to the node corresponding to each normal first processor is determined and sent to the node corresponding to each normal first processor.
6. The power consumption control method according to claim 1, wherein: Before responding to the second processor exception, the method further includes: The second processor determines a whole-machine configuration according to the whole-machine power consumption, wherein the whole-machine configuration includes a configuration of a power supply unit; The second processor sends the entire machine configuration to the first processor in each node.
7. The power consumption control method according to claim 6, wherein: The first processor in each node obtains information of the power supply unit through a bus, and determines a power consumption limit value of each node according to the information of the power supply unit, including: The first processor in each node obtains the status register of the power supply unit through the power management bus, and determines whether there is data abnormality in the status register; When data in the status register is abnormal, the first processor in each node obtains the in-place status of the power supply unit through the power management bus; comparing the configuration of the power supply unit in the whole machine configuration with the in-place state of the power supply unit, and determining that the in-place state of the power supply unit is normal when the configuration of the power supply unit in the whole machine configuration and the in-place state of the power supply unit are the same; When the in-position state is normal and the data of the status register is abnormal, determining that the power supply unit is in an overcurrent state; The first processor in each node calculates a power consumption limit value corresponding to each node according to the power consumption requirement of each node; The first processor in each node controls the power consumption of each node according to the power consumption limit value.
8. A power consumption control device, characterized in that: Applied to a multi-node server, the multi-node server includes multiple nodes, a second processor, an external device, and a power supply unit, wherein each node includes a first processor, the multiple nodes, the external device, and the power supply unit are respectively connected to the second processor, and the apparatus includes: A detection module, configured to determine states of the first processor and the second processor in the plurality of nodes by mutual detection between the first processor and the second processor; a first processing module, configured to, in response to one or more first processors in a plurality of nodes being abnormal, determine, by the second processor, a node power consumption corresponding to the abnormal first processor based on the received node power consumption, and determine, by the second processor, a whole-machine power consumption based on the node power consumption of each node and the power consumption of an external device; a second processing module, configured to determine and send a power consumption limit value to an external device and a node corresponding to the first processor in a normal state according to the power consumption of the entire machine when the second processor receives an overcurrent alarm signal sent by the power supply unit; The third processing module is used to respond to the abnormality of the second processor. When the first processor in each node receives the abnormal signal sent by the power supply unit, the first processor in each node obtains the information of the power supply unit through the bus and determines the power consumption limit value of each node based on the information of the power supply unit.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Multi-node server power consumption control method and system
CN111913802A
Power redundancy control system and method of GPU server and medium
CN113064479A