Server power supply master-slave dynamic management method, storage medium, device and system
By initializing the power range array (PIA) in the server system and dynamically managing the primary and backup power configuration, the energy waste and low efficiency caused by fixed configuration are solved, thereby improving power efficiency and reducing power consumption.
Patent Information
- Application Number
- CN202610393448.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-27
- Publication Date
- 2026-06-12
AI Technical Summary
In existing server systems, fixed primary and backup power supply configurations lead to energy waste under low load, lack the ability to actively sense the overall power demand of the machine, lack flexible adjustment capabilities, and have poor dynamic efficiency.
The power range array PIA is initialized by BMC to record the optimal number of main power supplies under different overall power levels. The overall power stability is periodically checked, the optimal number of main power supplies is queried or iterated, and the main and backup power supplies are configured. Power usage is optimized by combining real-time power data.
It enables dynamic power supply configuration based on the actual power requirements of the entire machine, thereby improving power supply efficiency, reducing overall power consumption, balancing power supply health, and reducing energy waste.
Smart Images

Figure CN122195781A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of server power efficiency technology, specifically to a method, storage medium, device, and system for dynamic management of server power supply master and backup. Background Technology
[0002] Currently, server systems typically employ multiple power supply modules for redundancy, ensuring stable system operation even in the event of a single power supply failure. For example... Figure 1 As shown, in a typical server system, the BMC (Baseboard Management Controller) communicates with multiple power modules. The BMC acts as the system's "manager," managing the multiple power modules it communicates with. However, the traditional fixed primary / backup power supply configuration has the following drawbacks: (1) Fixed main and backup power supply configuration, so that load balancing at low load will lead to energy waste; (2) It cannot actively sense the overall power and the status of similar power supplies, and lacks the ability to flexibly adjust according to real-time power requirements; (3) Existing methods for predicting power efficiency based on assumed power efficiency curves or historical data are all theoretical values and are tied to specific models, resulting in poor dynamic flexibility.
[0003] Therefore, how to achieve dynamic optimization of the power supply primary and backup configuration is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0004] The purpose of this invention is to provide a method, storage medium, device, and system for dynamic management of server power supply master and backup, which can dynamically configure the power supply master and backup according to the power consumption of the whole machine, so as to match it with the actual power demand of the whole machine, thereby effectively improving the overall power efficiency, reducing the power consumption of the whole server, and reducing energy waste.
[0005] To achieve the above objectives, in a first aspect, embodiments of the present invention provide a method for dynamic management of server power supply master / slave, the method comprising: When the BMC starts, it initializes the power range array PIA, which is used to record the optimal number of main power supplies for different overall power levels. During operation, the overall power is periodically checked or under specified trigger conditions to see if it is stable. When the overall power is stable, the optimal number of main power supplies corresponding to the current power is queried in the initialized PIA. If a valid optimal number of main power supplies is found, the found optimal number of main power supplies will be determined as the desired optimal number of main power supplies; if an invalid optimal number of main power supplies is found, the desired optimal number of main power supplies will be obtained by iterating through the main power supply settings on the actual machine with the goal of maximizing the average power efficiency of the entire machine, and then added to the PIA for persistent storage. Based on the desired optimal number of main power supplies, randomly select the corresponding number of main power supplies and issue the corresponding main / standby configuration instructions to them to complete the main / standby power supply configuration.
[0006] In conjunction with the first aspect, in one implementation, the PIA is defined as A =[ a 1, a 2, … , a i , … a m ];in, a i Indicates the first i Power range [ p start_i , p end_i The optimal number of main power supplies, m The length of the array; p start_i For the first i The lower limit of power for each power range p end_i For the first i The upper limit of power for each power range.
[0007] In conjunction with the first aspect, in one implementation, when detecting whether the overall power is stable, the stability of the overall power is determined based on historical power data; the historical power data is data formed by continuously acquiring the real-time power information of the entire machine during operation.
[0008] In conjunction with the first aspect, in one implementation method, determining whether the overall power is stable based on historical power data includes: The historical power data sequence is composed of the acquired historical power data and denoted as follows: P=[p 1 ,p 2 ,…,p w ] ,in p j Indicates the first j The total power of the machine at any given time, with a time window length of [missing information]. w , indicating the number of data points selected; Based on historical power data sequences P Calculate the mean μ The calculation formula is: ; Based on historical power data sequences P Calculate the standard deviation σ The calculation formula is: ; If and only if μ and p w All fall into the same power range. p start_i , p end_i ) inside and σ≤ Standard deviation threshold σ threshold If the power output is stable, the overall power is determined to be stable; otherwise, the overall power is determined to be unstable.
[0009] In conjunction with the first aspect, in one implementation, with the goal of maximizing the average power efficiency of the entire machine, the desired optimal number of main power supplies is obtained by traversing the settings of the main power supply count on a real machine, including: First, calculate the maximum and minimum values of the number of main power supplies. Then, set the number of main power supplies in descending order of their values. Calculate the average power efficiency of the entire machine when setting the number of main power supplies each time. Select the number of main power supplies with the highest average power efficiency as the desired optimal number of main power supplies.
[0010] In conjunction with the first aspect, in one embodiment, the formula for calculating the overall average power efficiency is: ; in, This represents the average power efficiency of the entire system. P out For single power supply output power, P in This refers to the input power of a single power supply.
[0011] In conjunction with the first aspect, in one implementation, the method further includes: after initializing the PIA, resetting the preset power supply aging count to zero; after determining the desired optimal number of main power supplies, comparing the desired optimal number of main power supplies with the current actual number of main power supplies; if the two are equal, incrementing the power supply aging count by one, determining whether the power supply aging count exceeds a specified threshold; if it exceeds, performing main power supply selection and configuration, resetting the power supply aging count to zero, and waiting for the next test to check whether the overall power is stable; if the two are not equal, directly performing main power supply selection and configuration, resetting the power supply aging count to zero, and waiting for the next test to check whether the overall power is stable.
[0012] Secondly, embodiments of the present invention also provide a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method in the first aspect embodiment.
[0013] Thirdly, embodiments of the present invention also provide an electronic device, the electronic device including a processor, a memory, and a server power primary / standby dynamic management program stored in the memory and executable by the processor, wherein when the server power primary / standby dynamic management program is executed by the processor, it implements the steps of the method in the first aspect embodiment.
[0014] Fourthly, embodiments of the present invention also provide a server power supply primary / standby dynamic management system that implements the method in the first aspect embodiment, comprising: an initialization module, a query module, a determination module, and a configuration module; The initialization module is used to: initialize the PIA when the BMC starts up, and the PIA is used to record the optimal number of main power supplies under different overall power levels; The query module is used to: periodically detect whether the overall power is stable during operation or under specified trigger conditions; when the overall power is stable, query the optimal number of main power supplies corresponding to the current power in the initialized PIA; The determining module is used to: if the query module finds a valid optimal number of main power supplies, then determine the found optimal number of main power supplies as the expected optimal number of main power supplies; if the query module finds an invalid optimal number of main power supplies, then with the goal of maximizing the average power efficiency of the whole machine, obtain the expected optimal number of main power supplies by traversing the set number of main power supplies on the actual machine, and add it to the PIA for persistent storage. The configuration module is used to: randomly select a corresponding number of main power supplies according to the desired optimal number of main power supplies, and send corresponding main / standby configuration instructions to them to complete the main / standby power supply configuration.
[0015] The beneficial effects of the technical solutions provided in this application include: In this embodiment, a Power Interval Array (PIA) is maintained to record the optimal number of main power supplies for different overall system power levels. When the overall system power consumption is stable, the existing PIA can be used for quick lookup. When a valid optimal number of main power supplies is found, this data can be directly used for subsequent power supply configuration, thus achieving the goal of rapid configuration. When an invalid optimal number of main power supplies is found, the desired optimal number of main power supplies is calculated by iterating through the set number of main power supplies on the actual system, with the goal of maximizing the average power efficiency of the entire system. The desired optimal number of main power supplies obtained in this way can make the power supply operate in the high-efficiency range of the load as much as possible. Finally, based on the desired optimal number of main power supplies, a corresponding number of main power supplies are randomly selected, and corresponding master / slave configuration commands are issued to them to complete the master / slave power supply configuration, thereby maximizing power efficiency, balancing power supply health, reducing overall system power consumption, and meeting the needs of practical applications. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of a typical server system architecture in the existing technology; Figure 2 This is a flowchart illustrating an embodiment of the server power supply primary / backup dynamic management method of this application; Figure 3 This is a schematic diagram showing the optimal number of main power supplies for different overall system power levels, as recorded by PIA in an example. Figure 4 This is a flowchart illustrating a server power supply primary / standby dynamic management method in an example. Figure 5 This is a schematic diagram of the hardware structure of an embodiment of the electronic device of this application; Figure 6 This is a schematic diagram of the functional modules of an embodiment of the server power supply master / slave dynamic management system of this application. Detailed Implementation
[0017] To make the technical problems, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0018] However, it should be noted that the examples described below are merely specific examples and are not intended to limit the embodiments of the present invention to the specific steps, values, conditions, data, order, etc. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0019] In a first aspect, embodiments of this application provide a method for dynamic management of server power supply master and backup.
[0020] In one embodiment, reference is made to Figure 2 , Figure 2 This is a flowchart illustrating an embodiment of the server power supply master / slave dynamic management method of this application. Figure 2 As shown, a method for dynamic primary / standby power management of a server includes: Step S10: When the BMC starts, initialize the power range array PIA. PIA is used to record the optimal number of main power supplies for different overall system power requirements.
[0021] In some possible implementations, persistent data can be used to initialize the PIA when the BMC starts up. It is understood that the persistent data used refers to historical PIA data that has been persisted. This operation ensures that the system can perform an initial power configuration assessment based on past power data at the initial startup stage, providing a foundational data support for subsequent dynamic adjustments.
[0022] For example, as an optional implementation, step S10 may specifically include: S101. When the BMC starts, check the power configuration related to the power supply model; if the power configuration has changed, proceed to step S102; if the power configuration has not changed, proceed to step S103. S102. Clean up the current persistent data and initialize each element in PIA to 0; S103. Directly load the current persistent data and initialize it into PIA.
[0023] In some possible implementations, the above PIA can be defined as: A =[ a 1, a 2, … , a i , … a m ].in, a i Indicates the first i Power range [ p start_i , p end_i The optimal number of main power supplies, m Let this be the array length (i.e., the number of power ranges). Let the total number of power sources be... N The rated power of each power supply is P r ,but: The rated power of the whole machine is: P total =NP r ; The overall power range is: [0,P total ); The width of each power range is: Δp = P total / m ; No. i The lower limit of the power range is: p start_i =( i - 1) Δp The upper limit is: p end_i = iΔp.
[0024] For example, see Figure 3 As shown, taking a total of 4 power supplies, each with a rated power of 1000W, as an example, the optimal number of main power supplies for different overall system power requirements can be found as follows: Figure 3 As shown. The array length is... m The value is 100; the rated power of the whole machine is 4×1000=4000W; the power range of the whole machine is [0, 4000); the width of each interval is 4000 / 100=40; the first power interval is [0, 40), the second power interval is [40, 80), ..., the 100th power interval is [3960, 4000).
[0025] Step S20: During operation, periodically or under specified trigger conditions, check whether the overall power is stable; when the overall power is stable, query the optimal number of main power supplies corresponding to the current power in the initialized PIA.
[0026] Understandably, in order to effectively determine whether the overall power consumption is stable, some possible implementations will continuously acquire real-time power information of the entire system during operation and generate historical power data. This is a key data input for achieving dynamic power management. Based on the aforementioned historical power data, it can be determined whether the overall power consumption is stable.
[0027] Furthermore, in some possible implementations, determining whether the overall power is stable based on historical power data may include: Step 1: Based on the acquired historical power data, construct a historical power data sequence, denoted as... P=[p 1 ,p 2 ,…,p w ] ,in p j Indicates the first j The total power of the machine at any given time, with a time window length of [missing information]. w , indicating the number of data points selected; Step 2: Based on historical power data sequences P Calculate the mean μ The calculation formula is: ; Step 3: Based on historical power data sequences P Calculate the standard deviation σ The calculation formula is: ; Step 4, if and only if μ and p w All fall into the same power range. p start_i , p end_i ) inside and σ ≤ standard deviation threshold σ threshold If the power output is stable, the overall power is determined to be stable; otherwise, the overall power is determined to be unstable.
[0028] Once the overall system power is determined to be stable, the optimal number of main power supplies corresponding to the current overall system power can be queried in the initialized PIA. This power range-based query method can quickly locate a relatively reasonable range for the number of main power supplies, providing direction for subsequent precise adjustments.
[0029] Step S30: If a valid optimal number of main power supplies is found, the found optimal number of main power supplies is determined as the desired optimal number of main power supplies; if an invalid optimal number of main power supplies is found, the desired optimal number of main power supplies is obtained by iterating through the main power supply settings on the actual machine with the goal of maximizing the average power efficiency of the entire machine, and then added to the PIA for persistent storage.
[0030] It is understood that a query result of 0 for the optimal number of main power supplies is generally considered an invalid optimal number, while a non-zero result is considered a valid optimal number. In this embodiment, when a valid optimal number of main power supplies is found, this data can be directly used for subsequent power supply configuration, thereby achieving the goal of rapid configuration. When an invalid optimal number of main power supplies is found, the desired optimal number of main power supplies is calculated by iterating through the set number of main power supplies on the actual machine, with the goal of maximizing the average power efficiency of the entire system. The desired optimal number of main power supplies obtained in this way can make the power supplies operate in the high-efficiency range of the load as much as possible, thereby maximizing power efficiency. Furthermore, by adding this data to the PIA for persistent storage, this optimized configuration data can continue to be used in subsequent system operation, achieving continuous improvement in power management.
[0031] In some possible implementations, with the goal of maximizing the average power efficiency of the entire machine, the desired optimal number of main power supplies is obtained by iterating through the actual machine to set the number of main power supplies. This may include: first calculating the maximum and minimum values of the number of main power supplies, then setting the number of main power supplies in descending order, calculating the average power efficiency of the entire machine each time the number of main power supplies is set, and selecting the number of main power supplies with the highest average power efficiency as the desired optimal number of main power supplies.
[0032] For example, assuming the current real-time power of the entire machine is P; the range of the number of main power supplies that need to be traversed is [ a min , a max ],in a min The minimum number of main power supplies. a max The maximum number of main power supplies; the number of main power supplies configured each time is... a The average power efficiency at that time is η The power supply's cooling standby threshold is... ζ (The power supply's cooling-off threshold is related to the power supply model and backup power supply parameters.) Therefore, the minimum and maximum values for calculating the number of main power supplies can be as follows: The minimum number of main power supplies is: a min = P / ( ζP r ) ; The maximum number of main power supplies is: a max =N ,in This is for rounding up.
[0033] when p start_i ≤P<p end_i Iterate through and set the number of main power supplies. a , a ∈[ a min , a max ]; like a=a ’ hour, η Taking the maximum value, the expected number of power sources at the current power level is: a ’ At the same time, the desired number of power sources will be obtained. a ’Add to PIA for persistent storage. That is, update the power range [ p start_i , p end_i Optimal number of main power supplies a i = a ’ .
[0034] Furthermore, in some possible implementations, the overall average power efficiency... η The calculation formula is: ; in, P out For single power supply output power, P in This refers to the input power of a single power supply.
[0035] Step S40: Based on the desired optimal number of main power supplies, randomly select the corresponding number of main power supplies and send corresponding main / standby configuration commands to them to complete the main / standby power supply configuration. In practical applications, the main / standby configuration can be completed by sending corresponding main / standby configuration commands to each randomly selected main power supply through a power communication protocol.
[0036] Understandably, in step S40, based on the final determined optimal number of main power supplies, a corresponding main power supply is randomly selected, and a primary / standby configuration command is issued to it to complete the specific configuration of the main power supply. This enables the system to operate according to the optimized power configuration scheme (i.e., the number of power supplies configured to maximize power efficiency), thereby improving the system's power utilization efficiency and overall performance. Furthermore, the random configuration strategy avoids losses from a single main power supply, thus achieving a balance in power health.
[0037] Furthermore, in some possible implementations, power supply health can be balanced through aging counts to address the issue of power imbalance aging under long-term power stability. Specifically, this server power supply primary / backup dynamic management method also includes: After initializing PIA, the preset power aging count will be reset to zero. After determining the expected optimal number of main power supplies, compare the expected optimal number of main power supplies with the current actual number of main power supplies; If the two are equal, increment the power supply aging count by one, and determine whether the power supply aging count exceeds the specified threshold (for example, the specified threshold is set to 1000). If it exceeds the threshold, proceed to step S30 to select and configure the main power supply, then clear the power supply aging count to zero and wait for the next test to check whether the overall power is stable. If it does not exceed the threshold, do not perform any operation and wait for the next test to check whether the overall power is stable. If the two are not equal, proceed directly to step S30 to select and configure the main power supply, then reset the power supply aging counter to zero and wait for the next test to check whether the overall power is stable.
[0038] Through the above operations, the dynamic management of server power supply master / slave can be completed. In this embodiment, a power range array (PIA) is maintained to record the optimal number of master power supplies for different overall system power levels. When the overall system power consumption is stable, the existing PIA can be used for quick querying. When a valid optimal number of master power supplies is found, this data can be directly used for subsequent power supply configuration, thereby achieving the purpose of rapid configuration. When an invalid optimal number of master power supplies is found, the desired optimal number of master power supplies is calculated by iterating through the set master power supply numbers on the actual machine, with the goal of maximizing the average power efficiency of the entire system. The desired optimal number of master power supplies obtained in this way can make the power supply operate in the high-efficiency range of the load as much as possible. Finally, according to the desired optimal number of master power supplies, a corresponding number of master power supplies are randomly selected, and corresponding master / slave configuration commands are issued to them to complete the master / slave power supply configuration, thereby maximizing power efficiency, balancing power health, and reducing overall system power consumption.
[0039] To better understand the server power supply master / slave dynamic management method of this application, the method of this application will be described in detail below with reference to the above embodiments and accompanying drawings: Reference Figure 4 As shown, Figure 4 This is a flowchart illustrating a server power supply master / slave dynamic management method in an example. Figure 4 As shown, a method for dynamic primary / standby power management of a server includes: Step 401: When the BMC starts, it queries the power configuration related to the power supply model; Step 402: Determine if the power configuration has been changed. If yes, proceed to step 403; otherwise, proceed to step 404. Step 403: Clean up the current persistent data and initialize each element in PIA to 0, then proceed to step 405; Step 404: Directly load the current persistent data and initialize it into PIA, then proceed to step 405; Step 405: Reset the preset power supply aging count to zero, and proceed to step 406; Step 406: Determine whether the cycle has ended or the specified trigger condition has been met. If yes, proceed to step 407; otherwise, wait for the next determination. Step 407: Check if the overall power is stable. If yes, proceed to step 408; otherwise, return to step 406. Step 408: Query the optimal number of main power supplies corresponding to the current power in the initialized PIA, and proceed to step 409; Step 409: Determine if the number of optimal main power supplies found is valid. If invalid, proceed to step 410; if valid, proceed to step 417. Step 410: Set the number of main power supplies to the total number of power supplies. N Proceed to step 411; Step 411, according to the formula a max =N, Calculate the maximum number of main power supplies a max Proceed to step 412; Step 412, according to the formula a min = P / ( ζP r ) Calculate the minimum number of main power supplies. a min Proceed to step 413; Step 413: Set the number of main power supplies in descending order, then proceed to step 414; Step 414, according to the formula Calculate the average power efficiency of the entire machine each time the number of main power supplies is set. , Proceed to step 415; Step 415: Select the number of main power supplies that achieves the highest average power efficiency for the entire machine as the desired optimal number of main power supplies, and proceed to step 416. Step 416: Add the desired optimal number of main power supplies to the PIA for persistent storage, then proceed to step 417; Step 417: Obtain the current actual number of main power supplies, then proceed to step 418; Step 418: Determine whether the expected optimal number of main power supplies is equal to the current actual number of main power supplies. If yes, proceed to step 419; otherwise, proceed to step 421. Step 419: Increment the power supply aging test result by one, then proceed to step 420; Step 420: Determine if the power supply aging test count exceeds 1000. If yes, proceed to step 421; otherwise, return to step 406. Step 421: Based on the desired optimal number of main power supplies, randomly select the corresponding number of main power supplies and issue the corresponding main / standby configuration instructions to them to complete the main / standby power supply configuration and proceed to step 422. Step 422: Reset the power supply aging timer to zero and return to step 406.
[0040] Secondly, embodiments of this application also provide a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a server power supply primary / standby dynamic management method as provided in any embodiment of this invention. The server power supply primary / standby dynamic management method can be found in various embodiments of the server power supply primary / standby dynamic management method of this application, and will not be repeated here.
[0041] The computer storage medium in this application embodiment can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0042] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0043] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0044] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0045] Thirdly, embodiments of this application also provide an electronic device, which may be a personal computer (PC), a laptop computer, a server, or other device with data processing capabilities.
[0046] In one embodiment, reference is made to Figure 5 , Figure 5 This is a schematic diagram of the hardware structure of the electronic device of this application. In the embodiments of this application, the electronic device may include a processor, a memory, a communication interface, and a communication bus.
[0047] The communication bus can be of any type and is used to interconnect the processor, memory, and communication interface.
[0048] Communication interfaces include input / output (I / O) interfaces, physical interfaces, and logical interfaces used to interconnect devices within an electronic device, as well as interfaces used to interconnect the electronic device with other devices (such as other computing devices or user equipment). Physical interfaces can be Ethernet interfaces, fiber optic interfaces, ATM interfaces, etc.; user equipment can be displays, keyboards, etc.
[0049] Memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), and non-volatile RAM (non-volatile RAM). Volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.
[0050] The processor can be a general-purpose processor, which can call the server power primary / standby dynamic management program stored in the memory and execute the server power primary / standby dynamic management method provided in the embodiments of this application. For example, the general-purpose processor can be a central processing unit. The method executed when the server power primary / standby dynamic management program is called can be referred to in the various embodiments of the server power primary / standby dynamic management method of this application, and will not be repeated here.
[0051] Fourthly, embodiments of this application also provide a server power supply master / slave dynamic management system.
[0052] In one embodiment, reference is made to Figure 6 , Figure 6 This is a functional module diagram of an embodiment of the server power supply master / slave dynamic management system of this application. Figure 6 As shown, a server power supply master / slave dynamic management system includes: an initialization module, a query module, a determination module, and a configuration module.
[0053] The initialization module is used to initialize the PIA when the BMC starts up; the PIA is used to record the optimal number of main power supplies for different overall power levels.
[0054] Specifically, in some possible implementations, the initialization module may use persistent data to initialize the PIA. It is understood that the persistent data used refers to historical PIA data that has been persisted. This operation ensures that the system can perform a preliminary power configuration assessment based on past power data at the initial startup stage, providing foundational data support for subsequent dynamic adjustments.
[0055] The query module is used to: periodically check whether the overall power is stable during operation or under specified trigger conditions; when the overall power is stable, query the optimal number of main power supplies corresponding to the current power in the initialized PIA.
[0056] Specifically, in some possible implementations, the query module continuously acquires the real-time power information of the entire machine and generates historical power data during system operation. This is a key data input for realizing dynamic power management. Based on the aforementioned historical power data, it can be determined whether the overall power is stable.
[0057] The determination module is used to: if the query module finds a valid optimal number of main power supplies, then determine the found optimal number of main power supplies as the desired optimal number of main power supplies; if the query module finds an invalid optimal number of main power supplies, then with the goal of maximizing the average power efficiency of the entire machine, obtain the desired optimal number of main power supplies by traversing the set number of main power supplies on the actual machine, and add it to the PIA for persistent storage.
[0058] Specifically, in some possible implementations, the determining module aims to maximize the average power efficiency of the entire machine. It obtains the desired optimal number of main power supplies by iterating through the actual machine and setting the number of main power supplies. This may include the following operations: first, calculating the maximum and minimum values of the number of main power supplies; then, setting the number of main power supplies in descending order of value; calculating the average power efficiency of the entire machine each time the number of main power supplies is set; and selecting the number of main power supplies with the highest average power efficiency as the desired optimal number of main power supplies.
[0059] The configuration module is used to: randomly select the corresponding number of main power supplies according to the desired optimal number of main power supplies, and issue corresponding main / standby configuration commands to them to complete the main / standby power supply configuration.
[0060] Specifically, in some possible implementations, the configuration module can send corresponding primary / backup configuration commands to each randomly selected primary power supply via a power communication protocol, thereby completing the primary / backup power supply configuration.
[0061] As described above, the system in this embodiment can realize dynamic management of server power supply master / slave configuration. During the entire process, the system maintains a power range array (PIA) to record the optimal number of master power supplies for different overall system power levels. When the overall system power consumption is stable, the existing PIA can be used for quick lookup. When a valid optimal number of master power supplies is found, this data can be directly used for subsequent power supply configuration, achieving rapid configuration. When an invalid optimal number of master power supplies is found, the system aims to maximize the average power efficiency of the entire system and calculates the desired optimal number of master power supplies by iterating through the set number of master power supplies on the actual machine. This method ensures that the power supplies operate within the most efficient range of the load. Finally, based on the desired optimal number of master power supplies, a corresponding number of master power supplies are randomly selected, and corresponding master / slave configuration commands are issued to them to complete the master / slave power supply configuration, thereby maximizing power efficiency, balancing power supply health, and reducing overall system power consumption.
[0062] It should be noted that the various variations and specific examples in the foregoing method embodiments are also applicable to the system in this embodiment. Through the detailed description of the foregoing method, those skilled in the art can clearly understand the implementation method of the system in this embodiment. Therefore, for the sake of brevity, they will not be described in detail here.
[0063] Note: The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0064] The terms "comprising" and "having," and any variations thereof, in the specification, claims, and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus.
[0065] In the description of the embodiments of this application, terms such as "exemplary," "for example," or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplary," "for example," or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary," "for example," or "for instance" is intended to present the relevant concepts in a concrete manner.
[0066] In some processes described in the embodiments of this application, multiple operations or steps are included in a specific order. However, it should be understood that these operations or steps may not be executed in the order they appear in the embodiments of this application, or they may be executed in parallel. The sequence number of the operation is only used to distinguish different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed sequentially or in parallel, and these operations or steps may be combined.
[0067] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device to execute the methods described in the various embodiments of this application.
[0068] The above are merely various embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made based on the description and drawings of this application, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application. Furthermore, any content not described in detail in this specification is prior art known to those skilled in the art.
Claims
1. A method for dynamic management of server power supply master / slave, characterized in that, The method includes: When the BMC starts, it initializes the power range array PIA, which is used to record the optimal number of main power supplies for different overall power levels. During operation, the overall power is periodically checked or under specified trigger conditions to see if it is stable. When the overall power is stable, the optimal number of main power supplies corresponding to the current power is queried in the initialized PIA. If a valid optimal number of main power supplies is found, the found optimal number of main power supplies will be determined as the desired optimal number of main power supplies; if an invalid optimal number of main power supplies is found, the desired optimal number of main power supplies will be obtained by iterating through the main power supply settings on the actual machine with the goal of maximizing the average power efficiency of the entire machine, and then added to the PIA for persistent storage. Based on the desired optimal number of main power supplies, randomly select the corresponding number of main power supplies and issue the corresponding main / standby configuration instructions to them to complete the main / standby power supply configuration.
2. The server power supply primary / standby dynamic management method as described in claim 1, characterized in that, The PIA is defined as A =[ a 1, a 2, … , a i , … a m ]; in, a i Indicates the first i Power range [ p start_i , p end_i The optimal number of main power supplies, m The length of the array; p start_i For the first i The lower limit of power for each power range p end_i For the first i The upper limit of power for each power range.
3. The server power supply primary / standby dynamic management method as described in claim 2, characterized in that, When checking whether the overall power is stable, the stability of the overall power is determined based on historical power data; the historical power data is data formed by continuously acquiring the real-time power information of the entire machine during operation.
4. The server power supply primary / standby dynamic management method as described in claim 3, characterized in that, Determine whether the overall power output is stable based on historical power data, including: The historical power data sequence is composed of the acquired historical power data and denoted as follows: P=[p 1 ,p 2 ,…,p w ] ,in p j Indicates the first j The total power of the machine at any given time, with a time window length of [missing information]. w , indicating the number of data points selected; Based on historical power data sequences P Calculate the mean μ The calculation formula is: ; Based on historical power data sequences P Calculate the standard deviation σ The calculation formula is: ; If and only if μ and p w All fall into the same power range. p start_i , p end_i ) inside and σ≤ Standard deviation threshold σ threshold If the power output is stable, the overall power is determined to be stable; otherwise, the overall power is determined to be unstable.
5. The server power supply primary / standby dynamic management method as described in claim 2, characterized in that, With the goal of maximizing the average power efficiency of the entire system, the optimal number of main power supplies was determined by iterating through the settings of the main power supply on a real machine, including: First, calculate the maximum and minimum values of the number of main power supplies. Then, set the number of main power supplies in descending order of their values. Calculate the average power efficiency of the entire machine when setting the number of main power supplies each time. Select the number of main power supplies with the highest average power efficiency as the desired optimal number of main power supplies.
6. The server power supply primary / standby dynamic management method as described in claim 5, characterized in that, The formula for calculating the average power efficiency of the entire machine is as follows: ; in, This represents the average power efficiency of the entire system. P out For single power supply output power, P in This refers to the input power of a single power supply.
7. The server power supply primary / standby dynamic management method as described in claim 1, characterized in that, The method also includes: After initializing PIA, the preset power aging count will be reset to zero. After determining the expected optimal number of main power supplies, compare the expected optimal number of main power supplies with the current actual number of main power supplies; If the two are equal, increment the power supply aging count by one, and then determine whether the power supply aging count exceeds the specified threshold. If it does, after selecting and configuring the main power supply, reset the power supply aging count to zero and wait for the next test to check whether the overall power is stable. If the two are not equal, then after selecting and configuring the main power supply, the power supply aging count will be reset to zero, and the system will wait for the next test to check whether the overall power is stable.
8. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 7.
9. An electronic device, characterized in that, The electronic device includes a processor, a memory, and a server power primary / standby dynamic management program stored in the memory and executable by the processor, wherein when the server power primary / standby dynamic management program is executed by the processor, it implements the steps of the server power primary / standby dynamic management method as described in any one of claims 1 to 7.
10. A server power supply master / slave dynamic management system implementing the method of any one of claims 1 to 7, characterized in that: The system includes an initialization module, a query module, a determination module, and a configuration module; The initialization module is used to: initialize the PIA when the BMC starts up, and the PIA is used to record the optimal number of main power supplies under different overall power levels; The query module is used to: periodically detect whether the overall power is stable during operation or under specified trigger conditions; when the overall power is stable, query the optimal number of main power supplies corresponding to the current power in the initialized PIA; The determining module is used to: if the query module finds a valid optimal number of main power supplies, then determine the found optimal number of main power supplies as the expected optimal number of main power supplies; If the query module finds an invalid optimal number of main power supplies, then with the goal of maximizing the average power efficiency of the entire machine, the desired optimal number of main power supplies is obtained by iterating through the set number of main power supplies on the actual machine, and added to the PIA for persistent storage. The configuration module is used to: randomly select a corresponding number of main power supplies according to the desired optimal number of main power supplies, and send corresponding main / standby configuration instructions to them to complete the main / standby power supply configuration.