Power control method and server

By monitoring changes in server equipment and performing dynamic power distribution, the problem of uneven power consumption allocation of computing nodes in the server is solved, reasonable power distribution and system energy efficiency improvement are achieved, and the stable operation of high-priority tasks is ensured.

CN120428841APending Publication Date: 2025-08-05TAIWAN LENOVO GLOBAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510547693.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2025-08-05

AI Technical Summary

Technical Problem

How to reasonably allocate total power consumption to each computing node in the server to avoid performance degradation when a single computing node reaches the power consumption cap target without increasing hardware costs.

Method used

By monitoring equipment changes in the server, obtaining total demand power and dynamically allocating based on the demand power, total demand power and power of the computing node, a fair distribution strategy or a priority allocation strategy is adopted to ensure reasonable power allocation for each computing node.

Benefits of technology

It realizes that the total power in the server is dynamically and reasonably distributed without affecting the system's power supply capacity, meet user needs, improve system energy efficiency and resource utilization, and ensure the stable operation of high-priority tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120428841A_ABST
    Figure CN120428841A_ABST
Patent Text Reader

Abstract

The invention discloses a power control method and a server, and the method comprises the steps: obtaining the total demanded power of all computing nodes in the server based on the demanded power of each computing node in the server under the condition of determining that equipment in the server changes, and obtaining the total demanded power of all computing nodes in the server based on the demanded power of each computing node in the server; the equipment at least comprises the computing node and power supply equipment; determining that the total required power is greater than power supply power which can be provided by the power supply equipment; and determining the distribution power of each computing node based on the required power of each computing node, the total required power and the power of the power supply.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of electronic technology, and relate to, but are not limited to, a power control method and a server. Background Art

[0002] When using servers, users have upper limits on the power consumption of the AC power supply. For example, a user requires that the power consumption of each rack cabinet installed with a server be less than 18kW (AC voltage 220V). There are 15 chassis (60 computing nodes) in the rack cabinet. Taking into account auxiliary power, power efficiency, and power conversion loss, the power consumption of each computing node is set to 270W. Users can set each computing node to run up to 270W or a specific power through the power cap policy of each computing node. When a single computing node reaches the power cap target, the performance of the computing node will immediately drop even if the overall power consumption of the rack is low. How to reasonably allocate the total power consumption to each computing node in the server has become a technical problem that needs to be solved urgently. Summary of the Invention

[0003] In view of this, embodiments of the present application provide a power control method and a server.

[0004] The technical solution of the embodiment of the present application is implemented as follows:

[0005] In a first aspect, an embodiment of the present application provides a power control method, including:

[0006] When it is determined that a device set in the server has changed, obtaining a total power requirement of all computing nodes in the server based on a power requirement of each computing node set in the server, where the device includes at least a computing node and a power supply device;

[0007] Make sure the total power requirement is greater than the power that the power supply can provide;

[0008] The allocated power of each computing node is determined based on the required power of each computing node, the total required power, and the supply power.

[0009] In a second aspect, an embodiment of the present application provides a server comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, it is realized that when a device set in the server changes, the total required power of all computing nodes in the server is obtained based on the required power of each computing node set in the server, and the device includes at least computing nodes and power supply devices; it is determined that the total required power is greater than the power supply power that the power supply device can provide; and the allocated power of each computing node is determined based on the required power of each computing node, the total required power and the power supply power.

[0010] In a third aspect, an embodiment of the present application provides a power control device, including:

[0011] an acquisition module, configured to acquire the total power requirements of all computing nodes in the server based on the power requirements of each computing node in the server when determining that a device in the server has changed, the device including at least a computing node and a power supply device;

[0012] A first determining module is used to determine that the total required power is greater than the power that can be provided by the power supply device;

[0013] The second determining module is configured to determine the allocated power of each computing node based on the required power of each computing node, the total required power, and the power supply power.

[0014] In a fourth aspect, an embodiment of the present application provides a storage medium storing executable instructions, which, when executed by a processor, can determine that when a device set in a server changes, obtain the total required power of all computing nodes in the server based on the required power of each computing node set in the server, and the device includes at least a computing node and a power supply device; determine that the total required power is greater than the power supply power that the power supply device can provide; and determine the allocated power of each computing node based on the required power of each computing node, the total required power and the power supply power.

[0015] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program or instructions. When the computer program or instructions are executed by a processor, it is realized that when a device set in a server is determined to have changed, the total required power of all computing nodes in the server is obtained based on the required power of each computing node set in the server, and the device includes at least computing nodes and power supply devices; it is determined that the total required power is greater than the power supply power that the power supply device can provide; and the allocated power of each computing node is determined based on the required power of each computing node, the total required power and the power supply power. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A schematic diagram of an implementation flow of a power control method provided in an embodiment of the present application;

[0017] Figure 2 A schematic diagram of an implementation flow of a power allocation method provided in an embodiment of the present application;

[0018] Figure 3 A schematic diagram of an implementation flow of a power allocation method provided in an embodiment of the present application;

[0019] Figure 4A A schematic diagram of a power distribution implementation process is provided for an embodiment of the present application;

[0020] Figure 4BA schematic diagram of an implementation flow of a dynamic power budget algorithm provided in an embodiment of the present application;

[0021] Figure 4C A schematic diagram of a power distribution simulation provided in an embodiment of the present application;

[0022] Figure 4D A schematic diagram of a power distribution simulation provided in an embodiment of the present application;

[0023] Figure 4E A schematic diagram of a power distribution simulation provided in an embodiment of the present application;

[0024] Figure 4F A schematic diagram of a power distribution simulation provided in an embodiment of the present application;

[0025] Figure 5 A schematic diagram of the structure of a power control device provided in an embodiment of the present application;

[0026] Figure 6 A schematic diagram of a hardware entity of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] To make the purpose, technical solutions and advantages of the embodiments of the present application more clear, the specific technical solutions of the embodiments of the present application will be further described in detail below in conjunction with the drawings in the embodiments of the present application. The following embodiments are used to illustrate the present application but are not intended to limit the scope of the present application.

[0028] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0029] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0030] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.

[0031] The present application embodiment provides a power control method, which is applied to a server, such as Figure 1 As shown, the method includes:

[0032] Step S110: When it is determined that a device set in the server has changed, obtaining the total required power of all computing nodes in the server based on the required power of each computing node set in the server, where the device includes at least the computing node and a power supply device;

[0033] Here, a server is an electronic device that provides computing power and runs software applications in a network environment. It can provide computing or application services to other clients (such as personal computers, smartphones, ATMs, and other terminal devices) within the network. A server has the ability to respond to service requests, provide services, and guarantee services.

[0034] In a server system architecture, the equipment configuration includes at least computing nodes and power supply equipment. Computing nodes include devices with computing capabilities such as central processing units (CPUs), graphics processing units (GPUs), data processing units (DPUs), and neural network processing units (NPUs), while power supply equipment includes devices that provide power such as PSUs.

[0035] During implementation, changes in server equipment can be used as triggers for power control (power allocation). Equipment changes include at least one of the following: adjustments to the number of computing nodes, the number of power supply devices, the specifications of computing nodes, and the specifications of power supply devices.

[0036] In some embodiments, the step of determining that a device has changed comprises at least one of the following:

[0037] Determine to remove the computing node in the server;

[0038] Here, a server agent may be set in the server to monitor the computing nodes through the Inter-Integrated Circuit (I2C) bus and obtain the change information of the computing nodes in real time, such as when a computing node is removed.

[0039] For example, if I2C polling finds that the flag bit of GPU-0001 is cleared, it can be determined that GPU-0001 is removed.

[0040] Determining to insert a new computing node into the server;

[0041] During the implementation process, if a new computing node is inserted, the information of the new computing node is read through I2C.

[0042] Determine that a power supply device in the server is removed;

[0043] Here, a server agent may be set in the server to monitor the power supply device via the System Management Bus (SMBus) and obtain change information of the power supply device in real time, for example, a PSU is removed.

[0044] In some embodiments, power supply failure may also be determined via the SMBus.

[0045] Make sure the new power supply is inserted in the server.

[0046] In the implementation, after the insertion or replacement of the PSU is determined via the SMBus, the PSU parameters are reconfigured via the SMBus.

[0047] During implementation, when it is determined that a device in the server has changed, the total power requirement of all computing nodes in the server may be triggered to be obtained. The total power requirement may be obtained by summing the power requirements of each computing node.

[0048] For example, if there are four computing nodes and each computing node requires 270W of power, the total required power may be 1080W.

[0049] Step S120: Determine whether the total required power is greater than the power that can be provided by the power supply device;

[0050] The power that a power supply can provide can be determined based on the power supply capacity of each power supply installed in the server. For example, a server can be equipped with three PSUs of the same specification, each with a power supply capacity of 800W. Considering factors such as ambient temperature, load efficiency, and aging degradation, three 800W PSUs (effective power of 657W) connected in parallel have a total power of 1971W.

[0051] During the implementation process, the total required power and the power that the power supply device can provide can be compared. If it is determined that the total required power is greater than the power that the power supply device can provide, step S130 is executed; if it is determined that the total required power is less than or equal to the power that the power supply device can provide, the power required by the computing node can be allocated to each computing node to meet the power consumption requirements of the computing node.

[0052] If the total power demand (Total_Demand) is less than or equal to the power the power supply can provide (Total_Power), each compute node can obtain the power it needs. No power allocation is required; instead, each compute node can simply be provided with the power it needs. In other words, the allocated power (Power_Allocated[i]) equals the demanded power (Power_Demand[i]).

[0053] If Total_Demand is greater than Total_Power, power is allocated according to a fair allocation strategy or a priority allocation strategy.

[0054] Step S130: Determine the allocated power of each computing node based on the required power of each computing node, the total required power, and the power supply power.

[0055] During implementation, the allocation coefficient of each computing node, i.e., the power proportion, can be determined based on the required power of each computing node and the total required power. The allocated power that can be allocated to each computing node is then determined based on the power proportion.

[0056] In an embodiment of the present application, changes in the equipment in the server are used as trigger conditions for allocating power to the computing nodes, and the required power and total required power of each computing node are obtained; when it is determined that the total required power is greater than the power that the power supply device can provide, the allocated power of each computing node is determined based on the required power, total required power and power of each computing node. In this way, the dynamic power allocation strategy provided can flexibly and reasonably allocate the total power to multiple computing nodes set in the server, realizing automatic dynamic power budgeting. The dynamic power budget design can meet user needs and utilize the existing server architecture without increasing hardware costs. Flexible power consumption within the computing node is achieved without affecting the power supply capacity of the entire system.

[0057] In some embodiments, the above step S130 "determines the allocated power of each computing node based on the required power of each computing node, the total required power and the power supply power" is as follows: Figure 2 As shown, this can be achieved by following the steps below:

[0058] Step S210: Obtain a first required power of each computing node and a first total required power determined based on the first required powers of all computing nodes;

[0059] During implementation, the number of computing nodes N is determined based on the actual computing nodes in the server. If four computing nodes can be inserted into the server, N is between 1 and 4. Each computing node i dynamically reports the first required power Power_Demand[i] of the computing node.

[0060] For each computing node i (1≤i≤N), the first required power Power_Demand[i] is set and the first total required power Total_Demand of the power consumption of all computing nodes is calculated using the following formula (1):

[0061]

[0062] Among them, Power_Demand[i] is the first required power of computing node i dynamically reported by the computing node.

[0063] Step S220: Determine a first power ratio of each first required power in the first total required power;

[0064] During the implementation process, for each computing node i, the first power demand Power_Demand[i] is calculated as the first power ratio in the first total power demand Total_Demand

[0065] Step S230: Allocate the power supply power based on the first power ratio to obtain the allocated power of each of the computing nodes.

[0066] During implementation, based on the ratio of the first power of each computing node to the first total required power, the allocated power Power_Allocated[i] of each computing node i is determined using the following formula (2):

[0067]

[0068] Among them, Power_Demand[i] is the power demand of computing node i dynamically reported by the computing node, Total_Power is the total available power, and Total_Demand is the sum of the power consumption demands of all computing nodes.

[0069] In the embodiment of the present application, the first power requirement of each computing node and the first total power requirement determined based on the first power requirements of all computing nodes are first obtained; then the first power ratio of each first power requirement in the first total power requirement is determined; finally, the power supply power is allocated based on the first power ratio to obtain the allocated power of each computing node. In this way, the power supply power is allocated to the computing nodes based on the first power requirement of each computing node, which can achieve a fair allocation strategy and a precise and adaptive power supply strategy. By proportionalizing the power requirements, the power allocation is strongly coupled with the actual load, thereby improving the energy efficiency, reliability and resource utilization of the system.

[0070] In some embodiments, the above step S130 "determines the allocated power of each computing node based on the required power of each computing node, the total required power and the power supply power" is as follows: Figure 3 As shown, this can be achieved by following the steps below:

[0071] Step S310: Obtain a first required power and a power weighted value of each computing node;

[0072] During the implementation process, a power weighted value (priority weight) Priority[i] is added to represent the priority of the i-th computing node. The larger the power weighted value, the higher the priority of allocating power to the node.

[0073] Step S320: Determine a second required power of each computing node and a second total required power of all computing nodes based on the first required power of each computing node and the power weighted value;

[0074] During implementation, the second required power (weighted required power) Weighted_Demand[i] may be calculated using the following formula (3):

[0075] Weighted_Demand[i]=Power_Demand[i]×Priority[i] (3);

[0076] Among them, Power_Demand[i] is the power demand dynamically reported by computing node i; Priority[i] is the priority weight of computing node i.

[0077] The second total power demand (the sum of weighted power demands) Total_Weighted_Demand of all computing nodes is calculated using the following formula (4):

[0078]

[0079] Wherein, Weighted_Demand[i] is the second required power (weighted required power) of computing node i.

[0080] Step S330: determining a second power proportion of each second required power in the second total required power;

[0081] During the implementation process, for each computing node i, the second power proportion of the second required power Weighted_Demand[i] in the second total required power Total_Weighted_Demand is calculated.

[0082] Step S340: Allocate the power supply power based on the second power ratio to obtain the allocated power of each of the computing nodes.

[0083] Based on the ratio of the weighted power requirement of each computing node to the total weighted power requirement, the allocated power Power_Allocated[i] of each computing node i is determined using the following formula (5):

[0084]

[0085] Wherein, Weighted_Demand[i] is the weighted required power (second power) of computing node i.

[0086] Total_Weighted_Demand is the sum of the weighted power requirements of all computing nodes (the second total power requirement); Total_Power is the total available power.

[0087] In an embodiment of the present application, first obtain the first required power and power weighted value of each computing node; determine the second required power of each computing node and the second total required power of all computing nodes based on the first required power and power weighted value of each computing node; then determine the second power ratio of each second required power in the second total required power; finally, allocate power supply power based on the second power ratio to obtain the allocated power of each computing node. In this way, the secondary dynamic allocation based on the required power and the power weighted value is a refined, multi-dimensional control power supply strategy. By introducing a weighting factor to correct the original required power, the load characteristics of the actual computing node can be more accurately matched, thereby achieving significant optimization in energy efficiency, reliability and resource utilization.

[0088] In some embodiments, the step S310 of “obtaining the power weighted value of each computing node” can be implemented by the following steps:

[0089] Step 311: Determine the initial priority of the target computing node based on the node information of the target computing node;

[0090] Here, the initial priority Base_Priority[i] is set: the initial priority is set based on the basic importance of each computing node. For example, it can be set to the same number at the beginning, or updated based on the importance of the computing node, operating status, or changing trend of power demand.

[0091] The priority can be set such that if it is positive, it indicates that the power demand of the computing node is increasing, and if it is negative, it indicates that the power demand of the computing node is decreasing.

[0092] In some embodiments, the node information includes at least one of the following information: computing task information running by the target computing node, operation information of the target computing node, and power demand change information of the target computing node; the initial priority is set to a positive number, indicating an increase in the power demand of the target computing node; the initial priority is set to a negative number, indicating a decrease in the functional demand of the target computing node.

[0093] Step 312: Obtain a power demand growth rate of the target computing node during a first preset time period.

[0094] During implementation, the first preset duration may be set based on actual needs. For example, the first preset duration may be set to 30 minutes.

[0095] The calculation can be done by calculating the power demand change of node i in the recent period. For example, the power demand growth rate ΔDemand_Rate[i] of node i in the last half hour can be calculated using the following formula (6):

[0096]

[0097] Among them, Power_Demand[i] t=0min Power_Demand[i] represents the power demand of node i at 0 minutes (min). t=30min Indicates the power requirement of the i-node in 30 minutes.

[0098] The power demand growth rate ΔDemand_Rate[i] monitors the growth rate of the power demand of each computing node in the first preset time period (for example, half an hour). If the demand of a computing node continues to grow, the priority of the computing node should be increased.

[0099] Step 313: Determine a power weighted value of the target computing node based on the initial priority and the power growth rate.

[0100] During implementation, the priority can be dynamically updated at regular intervals using the following formula (7):

[0101] Priority[i]=Base_Priority[i]+ΔDemand_Rate[i] (7);

[0102] Where Base_Priority[i] is the initial priority of computing node i, and ΔDemand_Rate[i] is the power demand growth rate of computing node i.

[0103] In the embodiment of the present application, the initial priority of the target computing node is first determined based on the node information of the target computing node; the power demand growth rate of the target computing node during a first preset time period is obtained; and then the power weighted value of the target computing node is determined based on the initial priority and the power growth rate. In this way, the weighted allocation strategy based on the computing node priority and the dynamic power growth rate achieves differentiated power supply guarantee for computing node loads and dynamic optimization of system energy efficiency by integrating the initial priority and the dynamic load characteristics (power growth rate).

[0104] In some embodiments, the step of "obtaining the power weighted value of each computing node" in the above step S310 further includes the following steps:

[0105] Step 314: Determine, within a second preset time period, the duration for which the power consumption of the target computing node is greater than the allocated power of the target computing node.

[0106] During implementation, when the power consumption of the computing node i continuously exceeds the allocated power and lasts for a period of time (eg, half an hour), it can be identified that the computing node i is in a high demand state for a long time.

[0107] Step 315: Determine a power maintenance ratio based on the maintenance duration and the second preset duration;

[0108] The long-term maintenance demand (power maintenance ratio) LongTimeDemand can be calculated using the following formula (8):

[0109]

[0110] Among them, Time 维持时长 Indicates the duration for which the power consumption of computing node i exceeds the allocated power continuously; Time 观察时长 Indicates the second preset time duration for monitoring the power consumption of the computing node i.

[0111] Correspondingly, the above step 313 “determining the power weighted value of the target computing node based on the initial priority and the power growth rate” can be implemented by the following process:

[0112] A power weighted value of the target computing node is determined based on the initial priority, the power growth rate, and the power maintenance ratio.

[0113] During implementation, the priority can be dynamically updated at regular intervals using the following formula (9):

[0114] Priority[i]=Base_Priority[i]+ΔDemand_Rate[i]+LongTimeDemand (9);

[0115] Among them, Base_Priority[i] is the initial priority of computing node i, ΔDemand_Rate[i] is the power demand growth rate of computing node i, and LongTimeDemand is the power maintenance ratio.

[0116] In an embodiment of the present application, the duration during which the power consumption of the target computing node exceeds the allocated power of the target computing node is determined within a second preset duration; the power maintenance ratio is determined based on the maintenance duration and the second preset duration; and the power maintenance ratio is added to the calculation method for power allocation. In this way, by introducing the power maintenance ratio, a dynamic response is provided to the risk of continuous power shortage of the computing node load, ensuring the stable operation of high-priority tasks. By inputting a negative feedback mechanism for the power maintenance ratio, the risk of the computing node being unable to provide the corresponding power during long-term operation is reduced, making system-level risks controllable.

[0117] In some embodiments, the above step 313 “determining the power weighted value of the target computing node based on the initial priority, the power growth rate, and the power maintenance ratio” can be implemented by the following steps:

[0118] Step 3131: Obtain a first factor of the power growth rate and a second factor of the power maintenance ratio;

[0119] During implementation, the first factor of the power growth rate and the second factor of the power maintenance ratio can be determined based on the actual usage scenario, that is, the value of the first factor can be determined based on the importance of the power growth rate, and the value of the second factor can be determined based on the importance of the power maintenance ratio.

[0120] Step 3132: Based on the first factor and the second factor, perform weighted summation on the initial priority, the power growth rate, and the power maintenance ratio to obtain a power weighted value of the target computing node.

[0121] During implementation, the priority can be dynamically updated at regular intervals using the following formula (10):

[0122]

[0123] Where Base_Priority[i] is the initial priority of computing node i, ΔDemand_Rate[i] is the power demand growth rate of computing node i, LongTimeDemand is the power maintenance ratio, α is the first factor, and β is the second factor.

[0124] In an embodiment of the present application, a first factor of the power growth rate and a second factor of the power maintenance ratio are obtained; based on the first factor and the second factor, a weighted sum of the initial priority, the power growth rate, and the power maintenance ratio is performed to obtain a power weighted value for the target computing node. In this way, by adding the first factor of the power growth rate and the second factor of the power maintenance ratio when calculating the power weighted value, the importance of the power growth rate and the power maintenance ratio can be reflected based on different application scenarios. The obtained power weighted value can more effectively adjust the allocated power, making the allocated power for the target computing node more accurate and reasonable.

[0125] In some embodiments, the above step 313 "determining the power weighted value of the target computing node based on the initial priority, the power growth rate, and the power maintenance ratio" may further adjust the power weighted value by the following steps:

[0126] Step 3133: Obtain the power consumption of other computing nodes except the target computing node;

[0127] Here, we calculate the low-power status of other computing nodes, OtherMachine: If the power consumption of other computing node j, Power_Demand[j], is lower than the allocated power for this computing node for a long time, its priority can be lowered and Priority[i] can be increased. The larger this value is, the more reallocatable resources the other computing node has. The power consumption of other computing nodes, OtherMachine[j], can be calculated using the following formula (11):

[0128]

[0129] Where AllocatedPower[j] represents the allocated power of computing node j, and DemandPower[j] represents the power demand of computing node j.

[0130] Step 3134: When it is determined that the power consumption of the other computing nodes is less than the corresponding allocated power, the power weighted value of the target computing node is increased.

[0131] During the implementation process, the priority is dynamically updated. The following formula (12) is used to dynamically update the priority at intervals:

[0132]

[0133] Among them, Base_Priority[i] is the initial priority of computing node i, ΔDemand_Rate[i] is the power demand growth rate of computing node i, LongTimeDemand is the power maintenance ratio, OtherMachine is the low-power status of other computing nodes, α is the first factor, β is the second factor, and γ is the adjustment factor of OtherMachine.

[0134] When the power consumption of other computing nodes OtherMachine is less than the corresponding allocated power, the power weighted value of the target computing node Base_Priority[i] is increased to allocate the required power to the target computing node.

[0135] In this embodiment of the present application, the power consumption of all computing nodes other than the target computing node is obtained. If it is determined that the power consumption of other computing nodes is less than the corresponding allocated power, the power weighting value of the target computing node is increased. In this way, by introducing dynamic weighting adjustment based on the power detection of other nodes, the target node can quickly obtain redundant power, ensuring the stable operation of high-priority tasks. By centrally utilizing redundant power, the load factor of the power module is improved, balancing global energy efficiency and fairness in computing node power allocation.

[0136] An embodiment of the present application provides a server, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, it is realized to determine that, when a device set in the server changes, the total required power of all computing nodes in the server is obtained based on the required power of each computing node set in the server, the device including at least the computing nodes and a power supply device; determine that the total required power is greater than the power supply power that can be provided by the power supply device; and determine the allocated power of each computing node based on the required power of each computing node, the total required power, and the power supply power.

[0137] This dynamic power allocation strategy allows for flexible and reasonable allocation of total power to multiple compute nodes within a server, enabling automatic dynamic power budgeting. This dynamic power budget design meets user needs while leveraging existing server architectures without increasing hardware costs. It also enables flexible power usage within compute nodes without impacting the overall system's power supply capabilities.

[0138] Figure 4A A schematic diagram of a power distribution implementation process is provided for an embodiment of the present application, such as Figure 4AThe server shown in this diagram consists of three main components: a power supply unit (PSU), compute nodes, and a server agent. The agent, which can be installed on a programmable system-on-chip (PSoC) and resides at the server chassis level, detects and records the maximum power consumption and allocated power of each compute node. The internal operation of the agent can be implemented through the following five steps: Steps A to E:

[0139] Step A: System information collection;

[0140] When the system power is turned on, the Agent actively reads the information of power supply devices 1 to n installed on the server, including at least the maximum rated power of the power supply devices; receives the status of all computing nodes transmitted from node 1 (master), including at least the current usage status of the computing nodes, real-time power consumption, the power upper limit of the nodes; and power policy status, etc., and records these values in the Agent's buffer to use the above information to provide subsequent algorithm reading, judgment, operation, etc.

[0141] Step B: whether to set the power policy;

[0142] Based on the power policy status information collected in step A, determine whether each compute node has a set power policy status. If the power policy is not enabled, the compute node operates normally without power restrictions. If it is enabled, proceed to step C for further determination.

[0143] Step C: Check whether the dynamic power policy is enabled;

[0144] Determine whether the power policy uses dynamic power budgeting or power capping. If power capping is enabled, which limits the power of a single compute node, it will not balance the power budgets of all compute nodes. If dynamic power budgeting is enabled, proceed to step D for further configuration.

[0145] Power Cap (Unit: Per Server or Single Compute Node) Definition: If the power cap policy is enabled, you can use the power cap policy to limit the amount of power used by the server or single compute node.

[0146] After the power capping policy is enabled, the following two options are provided to determine the power capping value:

[0147] Option 1: Use the following formula (1) to set the initial power cap value for each computing node.

[0148] (user input server power budget / computing node existence status) × 90% (1);

[0149] The power budget of the server input by the user is the power that can be provided by the power supply device of the device in the server, and the computing node existence status can represent the number of computing nodes set in the server.

[0150] After the user manually enters a server-level power budget value, the manually entered power budget value can be divided by the number of computing nodes installed in the server using the above formula (1), and 90% of this value can be taken as the initial power cap value of each computing node.

[0151] For example, if there are three compute nodes in a server chassis and option 1 is selected: manually set 1800W as the server-level power budget value, then the above formula (1) is used to obtain the following formula (2) to obtain the power cap value of each compute node:

[0152] (1800W / 3)×90% = 540W (2);

[0153] The initial power cap for each computer node is set to 540W.

[0154] Option 2: Use the following formula (3) to set the initial power cap value for each computing node.

[0155] (Server power budget × 90%) / Compute node presence status (3);

[0156] When the user does not manually set the initial power cap value at the server level, option 2 can be automatically selected. The server agent can take 90% of the maximum rated power value of the power supply device read and divide it by the number of compute nodes installed in the server as the initial power cap value for each compute node.

[0157] For example, if there are four computer nodes in a server chassis and the chassis's power supply is 2000W, then using the above formula (3) we can get the following formula (4) to obtain the power cap value of each computing node:

[0158] (2000W×90%) / 4 = 450W (4);

[0159] The initial power cap for each computing node is automatically set to 450W.

[0160] Step D: whether to set the power limit value;

[0161] Determines whether the compute node has a power limit value set for the dynamic power budget. If the agent detects that the compute node has no manual power limit value set, it sets an initial power limit value based on the maximum power rating of the power supply unit (PSU) and the current state of the compute node.

[0162] If there is a manually set power limit value, you can use the manually set value as a reference first.

[0163] Step E: Dynamic power budget core program.

[0164] The Dynamic Power Budget Process (DPB Process) is the core program for dynamically allocating power. Once the Agent officially enters this process, the internal algorithm sets power limits (power capping) based on the current state of the compute nodes. This process calculates the physical power ceiling for each compute node, and dynamically adjusts the power budget by capturing the node's power consumption and the light and heavy load conditions of each node in real time. The key feature here is dynamically transferring power budget from lightly loaded nodes to heavily loaded nodes, enabling flexible utilization of power within the node without impacting the overall system's power supply capabilities.

[0165] Heavy workload node: When the computing node's operating power consumption reaches 81% or more of the initial power cap (including 81%). For example, 81% of 450W is approximately 365W. A computing node operating at 365W or greater is considered to be in the heavy workload range.

[0166] Lightly loaded nodes: When the power consumption of a computer node is less than or equal to 80% of the initial power limit, for example, 80% of 450W is approximately 360W. A computer node operating with a power consumption of 360W or less is considered lightly loaded.

[0167] Dynamic Power Budget, DPB (unit: all compute nodes) definition: If the DPB policy is enabled, in addition to the power capping policy, key functions can dynamically borrow power budget from lightly loaded nodes to heavily loaded compute nodes, achieving flexible power consumption within the compute nodes without affecting the power supply capacity of the entire server.

[0168] Figure 4B A schematic diagram of the implementation flow of a dynamic power budget algorithm provided in an embodiment of the present application is shown in FIG. Figure 4B As shown, this can be achieved by following the steps below:

[0169] Step E1, initializing parameters;

[0170] Set the total available power Total_Power based on the number and power supply capabilities of the PSUs in the server.

[0171] Based on the computing nodes of actual devices in the server, the number of computing nodes N is determined and set. In the case that 4 computing nodes can be inserted into the server, N is between 1 and 4.

[0172] For each computing node i (1≤i≤N), set the required power Power_Demand[i] and initialize the allocated power Power_Allocated[i] to 0.

[0173] Each computing node i dynamically reports the required power Power_Demand[i] of the computing node.

[0174] Step E2: Check the total demand and total power;

[0175] The total power demand of all computing nodes is calculated using the following formula (1):

[0176]

[0177] Among them, Power_Demand[i] is the required power of computing node i dynamically reported by the computing node.

[0178] If Total_Demand is less than or equal to Total_Power, each computing node can obtain the power it needs. There is no need to allocate power. Instead, the power required by each computing node can be provided. That is, the allocated power Power_Allocated[i] is equal to the demanded power Power_Demand[i].

[0179] If Total_Demand is greater than Total_Power, power is allocated according to a fair allocation strategy or a priority allocation strategy.

[0180] Step E3: fair distribution strategy;

[0181] Based on the ratio of the required power (first power) of each computing node to the total required power (first total required power), the allocated power Power_Allocated[i] of each computing node i is determined using the following formula (2):

[0182]

[0183] Among them, Power_Demand[i] is the power demand of computing node i dynamically reported by the computing node, Total_Power is the total available power, and Total_Demand is the sum of the power consumption demands of all computing nodes.

[0184] Step E4: Select a priority allocation strategy;

[0185] Add the priority weight Priority[i] to represent the priority of the i-th computing node. The larger the weight value, the higher the priority of the node.

[0186] The weighted demand power (second demand power) Weighted_Demand[i] can be calculated using the following formula (3):

[0187] Weighted_Demand[i]=Power_Demand[i]×Priority[i] (3);

[0188] Among them, Power_Demand[i] is the power demand dynamically reported by computing node i; Priority[i] is the priority weight of computing node i.

[0189] The weighted power demand sum (the second total power demand) Total_Weighted_Demand of all computing nodes is calculated using the following formula (4):

[0190]

[0191] Wherein, Weighted_Demand[i] is the weighted required power (second required power) of computing node i.

[0192] Based on the ratio of the weighted power requirement of each computing node to the total weighted power requirement, the allocated power Power_Allocated[i] of each computing node i is determined using the following formula (5):

[0193]

[0194] Wherein, Weighted_Demand[i] is the weighted power demand (second power) of computing node i, Total_Weighted_Demand is the sum of the weighted power demands of all computing nodes (second total power demand), and Total_Power is the total available power.

[0195] Here, the dynamic priority Prior[i] adjustment strategy is provided as follows:

[0196] Set initial priority Base_Priority[i]: Set the initial priority based on the basic importance of each computing node. For example, it can be set to the same number at the beginning, or updated based on the importance, operating status, or power demand trend of the computing node.

[0197] The priority can be set such that if it is positive, it indicates that the power demand of the computing node is increasing, and if it is negative, it indicates that the power demand of the computing node is decreasing.

[0198] Dynamically update the priority. The initial priority of each computing node is Base_Priority[i], and the priority is dynamically updated every once in a while using the following formula (12):

[0199]

[0200] Among them, α, β and γ are adjustment factors used to balance the impact of basic priorities and demand growth.

[0201] Power demand growth rate ΔDemand_Rate[i]: monitors the growth rate of power demand of each computing node over a period of time (first preset period) (e.g. half an hour). If the demand of a computing node continues to grow, the priority of the computing node should be increased.

[0202] The calculation can be done by calculating the power demand change of node i in the recent period. For example, the power demand growth rate ΔDemand_Rate[i] of node i in the last half hour can be calculated using the following formula (6):

[0203]

[0204] Among them, Power_Demand[i] t=0min Power_Demand[i] represents the power demand of node i at 0 minutes (min). t=30min Indicates the power requirement of the i-node in 30 minutes.

[0205] Calculate the long-term maintenance demand LongTimeDemand: When the power consumption of computing node i exceeds the allocated power continuously for a period of time (for example, half an hour), it can be identified that the computing node i is in a high demand state for a long time. The following formula (8) can be used to calculate LongTimeDemand:

[0206]

[0207] Among them, Time 维持时长 Indicates the duration of time during which the power consumption of computing node i exceeds the allocated power; Time 观察时长 Indicates the duration for monitoring the power consumption of computing node i.

[0208] Calculate the low-power status of other computing nodes OtherMachine: If the power consumption Power_Demand[j] of other computing node j is lower than the allocated power for a long time, its priority can be lowered and Priority[i] can be increased. The larger this value is, the more reallocatable resources the other computing nodes have. The power consumption of other computing nodes can be calculated using the following formula (11):

[0209]

[0210] Where AllocatedPower[j] represents the allocated power of computing node j, and DemandPower[j] represents the power demand of computing node j.

[0211] Step E5: Monitoring and adjustment.

[0212] During server operation, the number of computing nodes and the power requirements of the computing nodes may change over time. Steps E1 to E4 are re-executed every time unit to ensure that the power allocation is updated in real time.

[0213] In some embodiments, an interval may be introduced to periodically reallocate power in response to changes in demand.

[0214] The dynamic power allocation process can be achieved by performing the following steps:

[0215] 1. Initial allocation: Power is allocated based on the initial priority.

[0216] 2. Monitoring and Adjustment: Check the power demand growth rate of each computing node every period (e.g., 5 minutes). If the power demand growth rate of a computing node is high (e.g., continuously increasing for half an hour), its priority is dynamically increased.

[0217] 3. Redistribution: Recalculate power allocation using the new priorities and allocate more power to computing nodes with rapidly increasing demand.

[0218] Compute node removal: Share the power budget of the removed node equally with each node

[0219] During implementation, any computing node or power supply device in the server is removed or inserted, and the dynamic power budget is reset and the power budget is dynamically borrowed from the lightly loaded node to the heavily loaded node.

[0220] When any power supply device is removed from the server, a major event is immediately determined to have occurred and throttling is immediately implemented, so that each computing node operates at a light load until the power supply device is reinserted into the chassis, and the throttling is released, allowing the dynamic power allocation scheme to operate normally.

[0221] Here, each compute node can access the server agent individually through the I2C bus, so two scenarios are defined when the server fails:

[0222] Scenario 1: When each compute node is unable to access the server agent and obtain data through the I2C bus while the AC power is on, each compute node can assume that the agent is faulty. Each compute node will enter the power-permitting state and will not turn on the DC power until the agent fault is resolved.

[0223] Scenario 2: In the DC power-on state, when each computing node cannot access the agent through the I2C bus and obtain data, each computing node assumes that the agent is faulty, and each computing node will enter throttling mode to limit power consumption until the agent fault is resolved.

[0224] The DC power-on state means that the user sets the power button to start the system in the DC power-on state.

[0225] The simulation was conducted under real-world conditions (with variations in ambient temperature, fan speed, and power supply failures), with four computer nodes operating under heavy load for different time periods. The algorithm's simulation fidelity and optimization curve changes were analyzed.

[0226] Figure 4C A schematic diagram of a power distribution simulation provided in an embodiment of the present application is shown. Figure 4D A schematic diagram of a power distribution simulation provided in an embodiment of the present application is shown in FIG. Figure 4C and Figure 4D As shown, the simulation diagram includes: a power demand and power distribution diagram 41 and a weight diagram 42, wherein:

[0227] The horizontal axis of the power demand and allocated power diagram 41 is the time axis, and the vertical axis is the power axis. From time 0 to 20 minutes, node M1 is in a heavy-loaded state, and other nodes (M2, M3 and M4) are in a light-loaded state; from time 20 to 40 minutes, node M2 is in a heavy-loaded state, and other nodes (M1, M3 and M4) are in a light-loaded state; from time 40 to 60 minutes, node M3 is in a heavy-loaded state, and other nodes (M1, M2 and M4) are in a light-loaded state; from time 60 to 80 minutes, node M4 is in a heavy-loaded state, and other nodes (M1, M2 and M3) are in a light-loaded state; after time 60 minutes, all nodes (M1, M2, M3 and M4) are in a light-loaded state.

[0228] The horizontal axis of the weight diagram 41 is the time axis, and the vertical axis is the weight axis. From 0 to 20 minutes, node M1 is in an overloaded state, and the weight value of M1 is the largest; from 20 to 40 minutes, node M2 is in an overloaded state, and the weight value of M2 is the largest; from 40 to 60 minutes, node M3 is in an overloaded state, and the weight value of M3 is the largest; from 60 to 80 minutes, node M4 is in an overloaded state, and the weight value of M4 is the largest; after 60 minutes, the weights of all nodes (M1, M2, M3 and M4) are reduced.

[0229] Figure 4E A schematic diagram of a power distribution simulation provided in an embodiment of the present application is shown. Figure 4F A schematic diagram of a power distribution simulation provided in an embodiment of the present application is shown in FIG. Figure 4E and Figure 4F As shown, the simulation diagram includes: a power demand and allocated power diagram 41 and a weight diagram 42, wherein the allocated power of each computing node in the power demand and allocated power diagram 41 is determined based on the weight and allocated power of the computing node corresponding to the same moment.

[0230] In the embodiments of this application, the dynamic power allocation strategy provided can flexibly and reasonably allocate total power to multiple computing nodes set up in the server, realizing automatic dynamic power budgeting. This dynamic power budget design can meet user needs and utilize existing server architecture without increasing hardware costs. It can achieve flexible power consumption within the computing nodes without affecting the power supply capacity of the entire system.

[0231] Based on the foregoing embodiments, an embodiment of the present application provides a power control device, which includes modules, each module includes sub-modules, each sub-module includes a unit, and can be implemented by a processor in an electronic device; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA), etc.

[0232] Figure 5 A schematic diagram of the structure of the power control device provided in the embodiment of the present application is shown in FIG. Figure 5 As shown, the apparatus 500 includes:

[0233] An acquisition module 510 is configured to acquire, when determining that a device provided in the server has changed, a total power requirement of all computing nodes in the server based on a power requirement of each computing node provided in the server, wherein the device includes at least the computing node and a power supply device;

[0234] A first determining module 520 is configured to determine that the total required power is greater than the power that can be provided by the power supply device;

[0235] The second determining module 530 is configured to determine the allocated power of each computing node based on the required power of each computing node, the total required power, and the power supply power.

[0236] In some embodiments, the second determination module 530 includes a first acquisition submodule, a first determination submodule and a first power allocation submodule, wherein the first acquisition submodule is used to obtain the first required power of each computing node and the first total required power determined based on the first required power of all computing nodes; the first determination submodule is used to determine the first power proportion of each first required power in the first total required power; and the first power allocation submodule is used to allocate the power supply power based on the first power proportion to obtain the allocated power of each computing node.

[0237] In some embodiments, the second determination module 530 includes a second acquisition submodule, a second determination submodule, a third determination submodule and a second power allocation submodule, wherein the second acquisition submodule is used to obtain the first required power and power weighted value of each computing node; the second determination submodule is used to determine the second required power of each computing node and the second total required power of all computing nodes based on the first required power of each computing node and the power weighted value; the third determination submodule is used to determine the second power proportion of each second required power in the second total required power; and the second power allocation submodule is used to allocate the power supply power based on the second power proportion to obtain the allocated power of each computing node.

[0238] In some embodiments, the second acquisition submodule includes a first determination unit, a first acquisition unit, and a second determination unit, wherein the first determination unit is used to determine the initial priority of the target computing node based on the node information of the target computing node; the first acquisition unit is used to obtain the power demand growth rate of the target computing node in a first preset time period; and the second determination unit is used to determine the power weighted value of the target computing node based on the initial priority and the power growth rate.

[0239] In some embodiments, the node information includes at least one of the following information: computing task information running by the target computing node, operation information of the target computing node, and power demand change information of the target computing node; the initial priority is set to a positive number, indicating an increase in the power demand of the target computing node; the initial priority is set to a negative number, indicating a decrease in the functional demand of the target computing node.

[0240] In some embodiments, the second acquisition submodule also includes a third determination unit and a fourth determination unit, wherein the third determination unit is used to determine the maintenance time of the power consumption of the target computing node greater than the allocated power of the target computing node within a second preset time period; the fourth determination unit is used to determine the power maintenance ratio based on the maintenance time period and the second preset time period; correspondingly, the second determination unit is also used to determine the power weighted value of the target computing node based on the initial priority, the power growth rate and the power maintenance ratio.

[0241] In some embodiments, the second determination unit includes an acquisition subunit and a weighted summation subunit, wherein the acquisition subunit is used to obtain a first factor of the power growth rate and a second factor of the power maintenance ratio; the weighted summation subunit is used to perform weighted summation of the initial priority, the power growth rate and the power maintenance ratio based on the first factor and the second factor to obtain the power weighted value of the target computing node.

[0242] In some embodiments, the second acquisition module further includes a second acquisition unit and an adjustment unit, wherein the second acquisition unit is used to obtain the power consumption of other computing nodes except the target computing node; and the adjustment unit is used to increase the power weighted value of the target computing node when it is determined that the power consumption of the other computing nodes is less than the corresponding allocated power.

[0243] In some embodiments, the power control device also includes at least one of the following modules: a third determination module, a fourth determination module, a fifth determination module and a sixth determination module, wherein the third determination module is used to determine the removal of the computing node in the server; the fourth determination module is used to determine the insertion of a new computing node in the server; the fifth determination module is used to determine the removal of the power supply device in the server; and the sixth determination module is used to determine the insertion of a new power supply device in the server.

[0244] The description of the above device embodiment is similar to the description of the above method embodiment and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of this application, please refer to the description of the method embodiment of this application for understanding.

[0245] It should be noted that, in the embodiment of the present application, if the above method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable an electronic device (which can be a mobile phone, tablet computer, laptop computer, desktop computer, etc.) to execute all or part of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program code, such as a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.

[0246] Correspondingly, an embodiment of the present application provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the power control method provided in the above embodiment are implemented.

[0247] Correspondingly, an embodiment of the present application provides an electronic device, Figure 6 A hardware entity diagram of an electronic device provided in an embodiment of the present application, such as Figure 6 As shown, the hardware entity of the device 600 includes: a memory 601 and a processor 602, the memory 601 stores a computer program that can be run on the processor 602, and the processor 602 implements the steps of the power control method provided in the above embodiment when executing the program.

[0248] The memory 601 is configured to store instructions and applications executable by the processor 602, and can also cache data to be processed or processed by the processor 602 and various modules in the electronic device 600 (for example, image data, audio data, voice communication data and video communication data), which can be implemented through flash memory (FLASH) or random access memory (RAM).

[0249] It should be noted that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.

[0250] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The above-mentioned serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments.

[0251] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0252] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0253] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed across multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment.

[0254] In addition, all functional units in the embodiments of the present application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the above-mentioned integrated units can be implemented in the form of hardware or in the form of hardware plus software functional units.

[0255] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, and other media that can store program codes.

[0256] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can essentially or in other words be embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium and includes several instructions for enabling an electronic device (which can be a mobile phone, tablet computer, laptop computer, desktop computer, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0257] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0258] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0259] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

[0260] The above is merely an embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A power control method, applied to a server, comprising: When determining that a device set in the server has changed, obtaining a total power requirement of all computing nodes in the server based on a power requirement of each computing node set in the server, the device including at least the computing node and a power supply device; Determining that the total required power is greater than the power that can be provided by the power supply device; The allocated power of each of the computing nodes is determined based on the required power of each of the computing nodes, the total required power, and the power supply power.

2. The method according to claim 1, wherein determining the allocated power of each computing node based on the required power of each computing node, the total required power, and the power supply power comprises: Obtaining a first required power of each computing node and a first total required power determined based on the first required powers of all computing nodes; determining a first power ratio of each first required power in the first total required power; The power supply power is allocated based on the first power ratio to obtain the allocated power of each of the computing nodes.

3. The method according to claim 1 , wherein determining the allocated power of each computing node based on the required power of each computing node, the total required power, and the power supply power comprises: Obtaining a first required power and a power weighted value of each computing node; Determine a second required power of each computing node and a second total required power of all computing nodes based on the first required power of each computing node and the power weighted value; determining a second power ratio of each second required power in the second total required power; The power supply power is allocated based on the second power ratio to obtain the allocated power of each of the computing nodes.

4. The method according to claim 3, wherein obtaining the power weighted value of each computing node comprises: Determining an initial priority of the target computing node based on node information of the target computing node; Obtaining a power demand growth rate of the target computing node during a first preset time period; A power weighted value of the target computing node is determined based on the initial priority and the power growth rate.

5. According to the method as claimed in claim 4, the node information includes at least one of the following information: computing task information running by the target computing node, operation information of the target computing node, and power demand change information of the target computing node; the initial priority is set to a positive number, indicating an increase in the power demand of the target computing node; the initial priority is set to a negative number, indicating a decrease in the functional demand of the target computing node.

6. The method of claim 4, further comprising: Determining, within a second preset time period, a duration during which the power consumption of the target computing node is greater than the allocated power of the target computing node; Determining a power maintenance ratio based on the maintenance duration and the second preset duration; Correspondingly, determining the power weighted value of the target computing node based on the initial priority and the power growth rate includes: A power weighted value of the target computing node is determined based on the initial priority, the power growth rate, and the power maintenance ratio.

7. The method according to claim 6, wherein determining the power weighted value of the target computing node based on the initial priority, the power growth rate, and the power maintenance ratio comprises: Obtaining a first factor of the power growth rate and a second factor of the power maintenance ratio; Based on the first factor and the second factor, a weighted sum is performed on the initial priority, the power growth rate, and the power maintenance ratio to obtain a power weighted value of the target computing node.

8. The method of claim 6, further comprising: Obtaining power consumption of other computing nodes except the target computing node; When it is determined that the power consumption of the other computing nodes is less than the corresponding allocated power, the power weighted value of the target computing node is increased.

9. The method according to any one of claims 1 to 8, wherein, before determining that a device configured in the server has changed and obtaining a total power requirement of all computing nodes in the server based on a power requirement of each computing node configured in the server, the method further comprises at least one of the following: Determine to remove the computing node in the server; Determining to insert a new computing node into the server; Determine that a power supply device in the server is removed; Make sure the new power supply is inserted in the server.

10. A server comprising a memory and a processor, the memory storing a computer program executable on the processor, wherein when the processor executes the program, determining a change in a device provided in the server, the processor obtains a total power requirement of all computing nodes in the server based on the power requirement of each computing node provided in the server, wherein the device includes at least the computing nodes and a power supply device; Determining that the total required power is greater than the power that can be provided by the power supply device; The allocated power of each of the computing nodes is determined based on the required power of each of the computing nodes, the total required power, and the power supply power.