Power supply efficiency optimization method, device, equipment and storage medium
Patent Information
- Application Number
- CN202210709726.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-21
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2042-06-21
AI Technical Summary
[0005]本发明的主要目的在于提供一种电源效率优化方法、装置、设备及存储介质,旨在解决现有技术无法保证供电效率一直维持在较高水平,能源浪费严重的技术问题
[0045] This invention acquires real-time power consumption data of a target IT device by collecting the data at a preset sampling frequency and duration. Based on this data, it determines whether the target IT device is in a stable power consumption period. If so, it obtains the current system state corresponding to the target IT device and checks if a switching configuration strategy corresponding to the current system state exists in a preset configuration transition graph. If so, it adjusts the PSU power supply in the target IT device according to the switching configuration strategy corresponding to the current system state to optimize power efficiency. Because the optimal switching configuration strategy for adjusting the PSU power supply is found in the preset configuration transition graph based on the system state when the target IT device is in a stable power consumption period, it ensures that the target IT device maintains high power efficiency.
Smart Images

Figure CN115113710B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a power efficiency optimization method, apparatus, device, and storage medium. Background Technology
[0002] Data center IT (Internet Technology) equipment (mainly including CPU (central processing unit) servers, GPU (graphics processing unit) servers, switches, and routers) typically has multiple PSU (Power Supply Unit) modules (also known as redundant power supplies) installed simultaneously. This serves two purposes: firstly, to meet backup power requirements (i.e., dual-path backup), and secondly, to ensure that the peak power consumption demands of the equipment are met. The efficiency of a single PSU power supply generally ranges from 70% to 90%, and fluctuates with changes in server load. When multiple PSU power modules are installed in IT equipment, the energy waste due to low power supply efficiency becomes significant; statistics show that this energy loss can reach up to 17% of total energy consumption.
[0003] In the default power supply configuration, once IT equipment is started, multiple PSUs supply power simultaneously and in a balanced state, meaning the total energy consumption of the IT equipment is roughly evenly distributed among the multiple PSUs (not necessarily precisely). For example, if a server with four PSUs consumes 400 watts at a given moment, each PSU will supply approximately 100 watts. As the server load fluctuates, the efficiency of the PSUs cannot be guaranteed to remain at a consistently high level. The default balanced power supply mode further reduces the load on each individual PSU, resulting in persistently low power efficiency and significant energy waste.
[0004] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] The main objective of this invention is to provide a power efficiency optimization method, apparatus, device, and storage medium, aiming to solve the technical problem that the existing technology cannot guarantee that the power supply efficiency is always maintained at a high level, resulting in serious energy waste.
[0006] To achieve the above objectives, the present invention provides a power efficiency optimization method, the method comprising the following steps:
[0007] Real-time power consumption data of the target IT device is obtained by collecting the real-time power consumption data according to the preset sampling frequency and preset sampling duration.
[0008] Determine whether the target IT device is in a stable power consumption period based on the real-time power consumption data;
[0009] If the target IT device is in a period of stable power consumption, then obtain the current system state corresponding to the target IT device;
[0010] Detect whether the preset configuration transition diagram contains a switch configuration strategy corresponding to the current system state;
[0011] If present, the PSU power supply in the target IT device is adjusted according to the switch configuration policy corresponding to the current system state to optimize power efficiency.
[0012] Optionally, after the step of detecting whether the switch configuration strategy corresponding to the current system state exists in the preset configuration transition diagram, the method further includes:
[0013] If it does not exist, obtain the PSU power information of the target IT device;
[0014] Based on the PSU power information, multiple PSU state combinations are generated, and the system power consumption value corresponding to each PSU state combination is obtained.
[0015] The PSU state combination with the lowest corresponding system power consumption value is used as the target switch configuration strategy;
[0016] The preset configuration conversion diagram is updated based on the target switch configuration strategy and the current system state;
[0017] Upon completion of the update, the PSU power supply in the target IT device is adjusted according to the target switch configuration strategy to optimize power efficiency.
[0018] Optionally, before the step of collecting the real-time power consumption of the target IT device according to a preset sampling frequency and a preset sampling duration to obtain real-time power consumption data, the method further includes:
[0019] Obtain hardware and load information for the target IT device;
[0020] The preset sampling frequency is determined based on the hardware device information, and the preset sampling duration is determined based on the device load information.
[0021] Optionally, the step of determining whether the target IT device is in a stable power consumption period based on the real-time power consumption data includes:
[0022] The data fluctuation score is determined based on the real-time power consumption data;
[0023] If the data fluctuation score is less than or equal to the preset fluctuation threshold, the target IT device is determined to be in a period of stable power consumption.
[0024] If the data fluctuation score is greater than the preset fluctuation threshold, it is determined that the target IT device is not in a period of stable power consumption.
[0025] Optionally, the step of adjusting the PSU power supply in the target IT device according to the switch configuration policy corresponding to the current system state to optimize power efficiency includes:
[0026] The target switch state corresponding to each PSU power supply in the target IT device is determined according to the switch configuration strategy.
[0027] Obtain the corresponding switch control interface for each PSU power supply;
[0028] The switching state of each PSU power supply in the target IT device is adjusted to the corresponding target switching state by calling the switch control interface.
[0029] Optionally, before the step of obtaining the switching control interface corresponding to each PSU power supply, the method further includes:
[0030] Detect whether the target switch state meets the preset safety rules;
[0031] If the conditions are met, then proceed with the step of obtaining the switch control interface corresponding to each PSU power supply.
[0032] Optionally, before the step of collecting the real-time power consumption of the target IT device according to a preset sampling frequency and a preset sampling duration to obtain real-time power consumption data, the method further includes:
[0033] When the target IT equipment is in an idle state, a benchmark test program is run on the target IT equipment.
[0034] Multiple PSU state combinations are constructed based on the PSU power information in the target IT device, and the power consumption range corresponding to the target IT device is obtained;
[0035] The target IT device is tested for power efficiency using the benchmark test program based on the multiple PSU state combinations and the power consumption range, and the test results are obtained.
[0036] A preset configuration conversion diagram is constructed based on the test results.
[0037] Furthermore, to achieve the above objectives, the present invention also proposes a power efficiency optimization device, which includes the following modules:
[0038] The data acquisition module is used to collect the real-time power consumption of the target IT device according to the preset sampling frequency and preset sampling duration, and obtain real-time power consumption data.
[0039] The stability analysis module is used to determine whether the target IT device is in a stable power consumption period based on the real-time power consumption data.
[0040] The status acquisition module is used to acquire the current system status corresponding to the target IT device if the target IT device is in a period of stable power consumption.
[0041] The strategy acquisition module is used to detect whether there is a switch configuration strategy corresponding to the current system state in the preset configuration conversion diagram;
[0042] An efficiency optimization module is used to adjust the PSU power supply in the target IT device according to the switch configuration strategy corresponding to the current system state, if present, in order to optimize power efficiency.
[0043] Furthermore, to achieve the above objectives, the present invention also proposes a power efficiency optimization device, which includes: a switching unit, a measuring unit, a controller, and an automatic transfer switch. The controller is equipped with a power efficiency optimization program, which, when executed, implements the steps of the power efficiency optimization method described above.
[0044] Furthermore, to achieve the above objectives, the present invention also proposes a computer-readable storage medium storing a power efficiency optimization program, wherein the power efficiency optimization program, when executed, implements the steps of the power efficiency optimization method as described above.
[0045] This invention acquires real-time power consumption data of a target IT device by collecting the data at a preset sampling frequency and duration. Based on this data, it determines whether the target IT device is in a stable power consumption period. If so, it obtains the current system state corresponding to the target IT device and checks if a switching configuration strategy corresponding to the current system state exists in a preset configuration transition graph. If so, it adjusts the PSU power supply in the target IT device according to the switching configuration strategy corresponding to the current system state to optimize power efficiency. Because the optimal switching configuration strategy for adjusting the PSU power supply is found in the preset configuration transition graph based on the system state when the target IT device is in a stable power consumption period, it ensures that the target IT device maintains high power efficiency. Attached Figure Description
[0046] Figure 1 This is a schematic diagram of the structure of an electronic device in the hardware operating environment involved in the embodiments of the present invention;
[0047] Figure 2 This is a flowchart illustrating the first embodiment of the power efficiency optimization method of the present invention;
[0048] Figure 3This is a schematic diagram of a preset configuration conversion diagram in one embodiment of the power efficiency optimization method of the present invention;
[0049] Figure 4 This is a flowchart illustrating the second embodiment of the power efficiency optimization method of the present invention;
[0050] Figure 5 This is a structural block diagram of the first embodiment of the power efficiency optimization device of the present invention.
[0051] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0052] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0053] Reference Figure 1 , Figure 1 This is a schematic diagram of the power efficiency optimization device structure for the hardware operating environment involved in the embodiments of the present invention.
[0054] like Figure 1 As shown, the electronic device may include: a controller, at least one switching unit (S1-Sn), at least one measuring unit (L1-Ln), and an automatic transfer switch (ATS), wherein the number of switching units and measuring units is the same as the number of PSU power supplies in the target IT equipment, and one switching unit and one measuring unit are connected in series to form a group and connected to one PSU power supply in the target IT equipment.
[0055] The switching unit can be composed of circuit switching devices, etc. It has a pre-set API interface, through which control signals can be received and the circuit can be connected or blocked according to the control signals, thereby realizing the setting of the PSU power switch state.
[0056] The measurement unit can be composed of electrical signal measuring devices (such as current transformers) to measure real-time power consumption. It has a pre-set API interface, through which other devices can read the measurement data generated by the measurement unit during measurement, thereby obtaining the switching status and power consumption value of each PSU power supply.
[0057] ATS can be connected to multiple external power supplies (such as...). Figure 1 The AC-1 and AC-2 power supplies in the system provide power to the power efficiency optimization equipment.
[0058] The controller can be composed of an arithmetic unit, a memory, I / O devices, etc. It can read and store the measurement data generated during measurement in the measurement unit, and send on / off control signals to each switching unit. The power efficiency optimization device can execute a pre-set power efficiency optimization program through the controller, thereby executing the power efficiency optimization method provided in the embodiments of the present invention.
[0059] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0060] This invention provides a power efficiency optimization method, referring to... Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of a power efficiency optimization method according to the present invention.
[0061] In this embodiment, the power efficiency optimization method includes the following steps:
[0062] Step S10: Collect the real-time power consumption of the target IT device according to the preset sampling frequency and preset sampling duration to obtain real-time power consumption data.
[0063] It should be noted that the executing entity of this embodiment can be the aforementioned power efficiency optimization device, or other electronic devices with the same function. This embodiment does not limit this. In this embodiment and the following embodiments, the power efficiency optimization device is used as an example to describe the power efficiency optimization method of the present invention.
[0064] It should be noted that the target IT device can be any IT device that requires power efficiency optimization. The real-time power consumption of the target IT device is collected according to a preset sampling frequency and preset sampling duration. This real-time power consumption data can be obtained by creating a corresponding sliding window based on the preset sampling duration, and then periodically collecting the real-time power consumption of the target IT device according to the preset sampling frequency and writing it into the sliding window. The size of the sliding window is set according to the preset sampling duration. The preset sampling frequency and preset sampling duration can be preset by the administrator of the power efficiency optimization device according to actual needs. The real-time power consumption data can be data types reflecting the magnitude of power consumption, such as power values (in watts) or current values (in amperes).
[0065] In practical implementation, the following methods can be used to collect real-time power consumption data from the target IT device:
[0066] (1) If each PSU of the target IT device provides an API interface for reading power consumption, the real-time power consumption value of the target IT device (i.e., the sum of the power consumption readings of each PSU) can be obtained by reading the real-time power consumption of each PSU through the API interface.
[0067] (2) If the PDU (Power Distribution Unit) sockets that connect to each PSU provide an API interface for reading power consumption, the real-time power consumption value of the server can be obtained by reading the real-time power consumption of the corresponding PDU socket (i.e., the sum of the power consumption readings of each PDU socket).
[0068] (3) If the target IT equipment is equipped with an energy consumption measurement module, the real-time power consumption data of the target IT equipment can be obtained directly through the energy consumption measurement module.
[0069] In practical use, in order to ensure equipment safety, a safety mechanism can be set up, which is to determine whether the maximum power consumption in the real-time power consumption data of the current PSU is greater than the power consumption value in the sliding window (or exceeds a certain threshold). If not, it can be considered unsafe, and the number of PSU power supplies that can be turned on can be increased.
[0070] Furthermore, to ensure that the preset sampling frequency and preset sampling duration conform to the actual configuration of the target IT device, the following steps may be included before step S10 in this embodiment:
[0071] Obtain hardware and load information for the target IT device;
[0072] The preset sampling frequency is determined based on the hardware device information, and the preset sampling duration is determined based on the device load information.
[0073] It should be noted that hardware device information may include: the allowed sampling frequency of the PSU power supply, PDU interface, or API interface of the power measurement module. For example, assuming the target IT device has a power measurement module, its allowed sampling frequency is set to 0.5–1 Hz. Device load information may include: the maximum load of the target IT device.
[0074] In practical applications, determining the preset sampling frequency based on hardware device information can involve obtaining the power consumption sampling method corresponding to the target IT device, reading the target sampling frequency from the hardware device information based on the power consumption sampling method, and then determining the preset sampling frequency based on the target sampling frequency. For example, assuming the power consumption sampling method corresponding to the target IT device is to collect real-time power consumption through the API interface of the power measurement module in the target IT device, and its corresponding allowed sampling frequency is set to 0.5~1Hz, then the preset sampling frequency can be set to any value between 0.5~1Hz. Determining the preset sampling duration based on device load information can involve looking up the corresponding preset sampling duration in a preset load duration table based on the device load information. This preset load duration table can include the mapping relationship between various device load values and preset sampling durations, and this mapping relationship can be preset by the administrator of the power efficiency optimization equipment.
[0075] Step S20: Determine whether the target IT device is in a stable power consumption period based on the real-time power consumption data.
[0076] It should be noted that determining whether a target IT device is in a stable power consumption period based on real-time power consumption data can be done by judging whether the data within the sliding window is stable. If it is stable, then the target IT device can be determined to be in a stable power consumption period. Specifically, judging whether the data within the sliding window is stable can be done by plotting the data within the sliding window as a curve and judging the stability based on the curvature of the curve.
[0077] In practical implementation, plotting curves may consume a lot of device resources. To avoid consuming too much device resources, step S20 in this embodiment may include:
[0078] The data fluctuation score is determined based on the real-time power consumption data;
[0079] If the data fluctuation score is less than or equal to the preset fluctuation threshold, the target IT device is determined to be in a period of stable power consumption.
[0080] If the data fluctuation score is greater than the preset fluctuation threshold, it is determined that the target IT device is not in a period of stable power consumption.
[0081] It should be noted that determining the data fluctuation score based on real-time power consumption data can be achieved by calculating the variance, standard deviation, or CV (coefficient of variation) of the real-time power consumption data, and then using the calculated value as the data fluctuation score. The preset fluctuation threshold can be pre-set by the administrator of the power efficiency optimization equipment according to actual needs.
[0082] Understandably, if the data fluctuation score is less than or equal to the preset fluctuation threshold, it indicates that the real-time power consumption fluctuation of the target IT device is small, and therefore, it can be determined that the target IT device is in a period of stable power consumption. However, if the data fluctuation score is greater than the preset fluctuation threshold, it can be determined that the real-time power consumption fluctuation of the target IT device is large, and therefore, it can be determined that the target IT device is not in a period of stable power consumption.
[0083] It should be noted that when detecting whether the target IT device is in a period of stable power consumption, other more complex and accurate time series data stationarity detection methods can also be used (e.g., unit root test). This embodiment does not limit this.
[0084] Step S30: If the target IT device is in a period of stable power consumption, then obtain the current system state corresponding to the target IT device.
[0085] It should be noted that if the target IT device is in a period of stable power consumption, it indicates that the device is operating relatively stably. In this case, adjustments can be made to the PSU power supply to improve power efficiency. Therefore, the current system status of the target IT device can be obtained. This system status can include the system power consumption value and the on / off status of each PSU power supply.
[0086] Step S40: Detect whether there is a switch configuration strategy corresponding to the current system state in the preset configuration conversion diagram.
[0087] It should be noted that the preset configuration transition diagram pre-stores various switching configuration strategies that minimize system energy consumption for different system states. These switching configuration strategies can include the switching states of each PSU power supply. Therefore, it is possible to detect whether a switching configuration strategy corresponding to the current system state exists in the preset configuration transition diagram, thereby determining whether adjustments to the PSU power supplies in the target IT equipment are necessary.
[0088] For ease of understanding, please refer to Figure 3 This explanation does not limit the scope of this solution. Figure 3 This is a schematic diagram of the preset configuration conversion diagram of the present invention. The preset configuration conversion diagram consists of nodes (state combinations of each PSU) and edges (connections between state combinations of each PSU). It represents the PSU configuration conversion that minimizes the system energy consumption (i.e., maximizes the energy efficiency of the power module) under different system states (including energy consumption state and PSU switching state). Figure 3 In the diagram, the node number represents the number of PSUs in the "on" state, and the set on each edge and the values it contains represent the conditions for PSU state transitions, i.e., the system power consumption value corresponding to the transition.
[0089] Step S50: If it exists, adjust the PSU power supply in the target IT device according to the switch configuration strategy corresponding to the current system state to optimize power efficiency.
[0090] It is understood that if the preset configuration conversion diagram contains a switch configuration strategy corresponding to the current system state, it means that the preset configuration conversion diagram records a switch configuration strategy that minimizes the system power consumption value under the current system state, i.e., the optimal switch configuration strategy. Therefore, the switch configuration strategy corresponding to the current system state can be read from the preset configuration conversion diagram, and then the PSU power supply in the target IT device can be adjusted according to the switch configuration strategy corresponding to the current system state, thereby optimizing the power efficiency of the target IT device.
[0091] Furthermore, in order to accurately adjust the power supplies of each PSU in the target IT equipment, step S50 in this embodiment may include:
[0092] The target switch state corresponding to each PSU power supply in the target IT device is determined according to the switch configuration strategy.
[0093] Obtain the corresponding switch control interface for each PSU power supply;
[0094] The switching state of each PSU power supply in the target IT device is adjusted to the corresponding target switching state by calling the switch control interface.
[0095] It should be noted that determining the target switch state of each PSU power supply in the target IT device based on the switch configuration policy can be achieved by parsing the switch configuration policy, reading the switch states of each PSU power supply recorded in the switch configuration policy, and using the read switch states as the target switch states of the PSU power supplies. For example, assuming there are 4 PSU power supplies, parsing the switch configuration policy and obtaining the switch state data for each PSU power supply as [1, 1, 0, 0] indicates that the target switch state for PSU power supplies 1 and 2 is on, and the target switch state for PSU power supplies 3 and 4 is off.
[0096] In practical use, different PSU power supplies may have different control methods depending on their specifications. Obtaining the corresponding switch control interface for each PSU power supply can be done by determining the corresponding switch control interface for each PSU power supply based on its hardware specifications. For example, if each PSU power supply provides an API interface for controlling the switch, the switch state of the corresponding PSU power supply can be set through this API interface, and in this case, the API interface can be used as the switch control interface for that PSU power supply. If the PDU interface connecting each PSU provides an API interface for controlling the switch, the switch state of the corresponding PSU power supply can also be set by controlling the switch of the PDU interface, and in this case, the API interface provided by the PDU interface can be used as the switch control interface for that PSU power supply.
[0097] It is understandable that by passing in the interface parameters to call the switch control interface, the switching state of the PSU power supply can be adjusted to the corresponding target switching state.
[0098] Furthermore, to avoid errors in the switch configuration strategy that could affect the operation of the target IT equipment, this embodiment may include the following step before obtaining the switch control interface corresponding to each PSU power supply:
[0099] Detect whether the target switch state meets the preset safety rules;
[0100] If the conditions are met, then proceed with the step of obtaining the switch control interface corresponding to each PSU power supply.
[0101] It should be noted that the preset security rules can be set according to the minimum number of PSUs that the target IT device is allowed to have on. For example, if the target IT device needs to ensure that at least one PSU is on, the preset security rule can be set to: prohibit all PSUs from being turned off at the same time.
[0102] Understandably, detecting whether the target switch state meets the preset safety rules can be done by checking whether there are any prohibited items in the preset safety rules for the target switch state corresponding to each PSU power supply. If there are, it is determined that the target switch state does not meet the preset safety rules, and the subsequent steps can be stopped; if there are no, it is determined that the target switch state meets the preset safety rules, and the subsequent steps can be executed.
[0103] For example: Suppose the preset safety rule is: Do not turn off all PSU power supplies at the same time. If the obtained data on the switch status of each PSU power supply is [0, 0, 0, 0], it means that the target switch status of all PSU power supplies is off. In this case, it can be determined that the target switch status does not meet the preset safety rule.
[0104] Furthermore, to ensure that power efficiency optimization can still be performed normally even when there is no switch configuration strategy corresponding to the current system state in the preset configuration transition diagram, this embodiment may further include the following after step S40:
[0105] If it does not exist, obtain the PSU power information of the target IT device;
[0106] Based on the PSU power information, multiple PSU state combinations are generated, and the system power consumption value corresponding to each PSU state combination is obtained.
[0107] The PSU state combination with the lowest corresponding system power consumption value is used as the target switch configuration strategy;
[0108] The preset configuration conversion diagram is updated based on the target switch configuration strategy and the current system state;
[0109] Upon completion of the update, the PSU power supply in the target IT device is adjusted according to the target switch configuration strategy to optimize power efficiency.
[0110] It should be noted that PSU power information can include the quantity and model of the PSU power supplies. Constructing multiple PSU state combinations based on the PSU power information in the target IT equipment can be achieved by arranging and combining each PSU power supply according to its on / off state. If all PSU power supplies have the same model, they can be considered identical, and the number of PSU state combinations is equal to the number of PSU power supplies. For example, a 4-PSU power supply has 4 on / off state combinations (excluding the fully off state combination). However, if the PSU power supplies have different models, they can be considered different, and the number of PSU state combinations needs to be calculated based on the number of PSU power supplies. For example, a 4-PSU power supply has 4 on / off state combinations.
[0111] In practical use, the system power consumption value corresponding to each PSU state combination can be obtained by adjusting the switching state of the PSU power supply of the target IT device according to the PSU state combination, obtaining the system power consumption value of the target IT device, and using the obtained system power consumption value as the system power consumption value corresponding to the PSU state combination.
[0112] It is understandable that the PSU state combination with the lowest system power consumption among multiple PSU state combinations is the optimal PSU power configuration under the current system state. Therefore, the PSU state combination with the lowest system power consumption can be used as the target switch configuration strategy. Then, the preset configuration transition diagram is updated according to the target switch configuration strategy and the current system state. This ensures that power efficiency optimization can be performed quickly when the system state of the target IT device is consistent with the current system state. After the update is completed, the PSU power supply in the target IT device is adjusted according to the target switch configuration strategy. This ensures that power efficiency optimization can still be performed normally even when there is no switch configuration strategy corresponding to the current system state in the preset configuration transition diagram.
[0113] This embodiment acquires real-time power consumption data of the target IT device by collecting the data at a preset sampling frequency and duration. Based on this data, it determines whether the target IT device is in a stable power consumption period. If so, it obtains the current system state corresponding to the target IT device and checks if a switching configuration strategy corresponding to the current system state exists in the preset configuration transition graph. If so, it adjusts the PSU power supply in the target IT device according to the switching configuration strategy corresponding to the current system state to optimize power efficiency. Because the optimal switching configuration strategy is found in the preset configuration transition graph based on the system state when the target IT device is in a stable power consumption period, the PSU power supply can be adjusted to ensure that the target IT device maintains high power efficiency.
[0114] refer to Figure 4 , Figure 4 This is a flowchart illustrating a second embodiment of a power efficiency optimization method according to the present invention.
[0115] Based on the first embodiment described above, the power efficiency optimization method of this embodiment further includes, before step S10:
[0116] Step S01: When the target IT equipment is in an idle state, run the benchmark test program in the target IT equipment.
[0117] It should be noted that when no services are running in the target IT device other than the most basic system, the target IT device can be determined to be in an idle state. At this time, a comprehensive test can be performed on the target IT device. Therefore, a benchmark test program can be run on the target IT device. The benchmark test program can test the target IT device and can traverse the entire power consumption range of the target IT device (from idle power consumption to peak power consumption) under each PSU power supply configuration.
[0118] Step S02: Construct multiple PSU state combinations based on the PSU power information in the target IT device, and obtain the power consumption range corresponding to the target IT device.
[0119] It should be noted that PSU power information can include the number of PSUs, their models, etc. Constructing multiple PSU state combinations based on the PSU power information in the target IT equipment can be done by arranging and combining each PSU according to its on / off state. If all PSUs have the same model, they can be considered identical, and the number of PSU state combinations is equal to the number of PSUs. For example, a 4-PSU configuration has 4 on / off state combinations (excluding the fully off state). However, if the PSUs do not have identical models, they are considered different, and the number of PSU state combinations needs to be calculated based on the number of PSUs. For example, a 4-PSU configuration has 4 on / off state combinations.
[0120] Step S03: Perform power efficiency testing on the target IT device using the benchmark test program based on the multiple PSU state combinations and the power consumption range, and obtain the test results.
[0121] It should be noted that the benchmark test program performs power efficiency tests on the target IT device based on multiple PSU state combinations and power consumption ranges. The test results can be obtained by traversing multiple PSU state combinations, taking the traversed PSU state combination as the current state combination, adjusting the switching state of the PSU power supply in the target IT device according to the current state combination, traversing the entire power consumption range of the target IT device after adjustment, and continuing to traverse multiple PSU state combinations after the power consumption range traversal is completed. The test results can be obtained when the traversal is completed.
[0122] For example: Suppose a server is configured with N g GPUs and N c The additional power generated by different numbers of CPUs running at full load is {P1, P2, ..., P...}. Ng The additional power generated by different numbers of CPUs running at full load is {p1, p2, ..., p}. Nc By enabling different numbers of GPUs and CPUs, the system can be configured to roughly traverse its entire power consumption range. Specifically, under a given PSU configuration, the system power consumption obtained by enabling different numbers of CPUs and GPUs can be represented by the following matrix:
[0123]
[0124] Where P0 represents the power value of the system under no-load conditions, and if the number of PSU state combinations is N, the test results will include N power consumption matrix information, which can be represented as {M1, M2, ..., M...} N}
[0125] Step S04: Construct a preset configuration conversion diagram based on the test results.
[0126] It should be noted that constructing a preset configuration conversion diagram based on test results can be done by determining the PSU state combination that minimizes the system power consumption value for each power consumption within each power consumption range based on the test results, and then constructing the preset configuration conversion diagram based on the PSU state combination that minimizes the system power consumption value for each power consumption within each power consumption range.
[0127] In practical applications, a preset configuration conversion diagram can be constructed based on test results using a preset conversion algorithm. This preset conversion algorithm can be represented by the following pseudocode:
[0128] Input: {M1, M2, ..., M} N}
[0129] Output: PSU optimal configuration transformation diagram G
[0130] for g = 0: N g do
[0131] for c = 0: N c do
[0132] p=min(M1|g||c|, M2|g||c|,...,M N |g||c|)
[0133] N = index(p) # Then n is the matrix number with the lowest power, which is also the PSU configuration with the lowest power consumption in the power system;
[0134] For m = 0: N do
[0135] Add a new edge M→N to G;
[0136] Add Mm|g||c| to the set of transition conditions for edge M→N;
[0137] In other words, a double loop is performed on the additional power consumption of the CPU and GPU. During the loop, the PSU state combination that minimizes the system power consumption value is continuously obtained from N power consumption matrices. This lowest-power PSU state combination is then added to the transition condition set as a new condition. Finally, at the end of the double loop, the optimal configuration transition graph, i.e., the preset configuration transition graph, is obtained. The preset configuration transition graph G can be implemented using an adjacency matrix, with the matrix elements filled with transition conditions, such as element A. ij ={a,b} represents the optimal PSU configuration j for system power consumption of a and b, given that the current PSU power supply switching state is the i-th PSU state combination.
[0138] This embodiment involves running a benchmark test program on the target IT device when it is in an idle state; constructing multiple PSU state combinations based on the PSU power information of the target IT device and obtaining the corresponding power consumption range of the target IT device; performing a power efficiency test on the target IT device using the benchmark test program based on the multiple PSU state combinations and the power consumption range, and obtaining the test results; and constructing a preset configuration conversion diagram based on the test results. Because the benchmark test program is run to perform the power efficiency test on the target IT device while it is in an idle state, and a preset configuration conversion diagram is constructed in advance, the impact on application services is avoided, and the test results are ensured to be unaffected by other programs, thus guaranteeing the accuracy of the power efficiency optimization method of this invention.
[0139] Furthermore, embodiments of the present invention also propose a storage medium storing a power efficiency optimization program, wherein when the power efficiency optimization program is executed by a processor, it implements the steps of the power efficiency optimization method described above.
[0140] Reference Figure 5 , Figure 5 This is a structural block diagram of the first embodiment of the power efficiency optimization device of the present invention.
[0141] like Figure 5 As shown, the power efficiency optimization device proposed in this embodiment of the invention includes:
[0142] The data acquisition module 10 is used to collect the real-time power consumption of the target IT device according to the preset sampling frequency and preset sampling duration, and obtain real-time power consumption data.
[0143] Stability analysis module 20 is used to determine whether the target IT device is in a stable power consumption period based on the real-time power consumption data;
[0144] The status acquisition module 30 is used to acquire the current system status corresponding to the target IT device if the target IT device is in a power consumption stable period.
[0145] The strategy acquisition module 40 is used to detect whether there is a switch configuration strategy corresponding to the current system state in the preset configuration conversion diagram;
[0146] The efficiency optimization module 50 is used to adjust the PSU power supply in the target IT device according to the switch configuration strategy corresponding to the current system state, if present, in order to optimize power efficiency.
[0147] This embodiment acquires real-time power consumption data of the target IT device by collecting the data at a preset sampling frequency and duration. Based on this data, it determines whether the target IT device is in a stable power consumption period. If so, it obtains the current system state corresponding to the target IT device and checks if a switching configuration strategy corresponding to the current system state exists in the preset configuration transition graph. If so, it adjusts the PSU power supply in the target IT device according to the switching configuration strategy corresponding to the current system state to optimize power efficiency. Because the optimal switching configuration strategy is found in the preset configuration transition graph based on the system state when the target IT device is in a stable power consumption period, the PSU power supply can be adjusted to ensure that the target IT device maintains high power efficiency.
[0148] Furthermore, the efficiency optimization module 50 is also used to: if the PSU power information of the target IT device does not exist, obtain the PSU power information; generate multiple PSU state combinations based on the PSU power information, and obtain the system power consumption value corresponding to each PSU state combination; use the PSU state combination with the lowest corresponding system power consumption value as the target switch configuration strategy; update the preset configuration conversion diagram according to the target switch configuration strategy and the current system state; and when the update is complete, adjust the PSU power supply of the target IT device according to the target switch configuration strategy to optimize power efficiency.
[0149] Furthermore, the data acquisition module 10 is also used to acquire hardware device information and device load information corresponding to the target IT device; determine a preset sampling frequency based on the hardware device information; and determine a preset sampling duration based on the device load information.
[0150] Furthermore, the stability analysis module 20 is also used to determine a data fluctuation score based on the real-time power consumption data; if the data fluctuation score is less than or equal to a preset fluctuation threshold, the target IT device is determined to be in a power consumption stable period; if the data fluctuation score is greater than the preset fluctuation threshold, the target IT device is determined not to be in a power consumption stable period.
[0151] Furthermore, the efficiency optimization module 50 is also used to determine the target switch state corresponding to each PSU power supply in the target IT device according to the switch configuration strategy; obtain the switch control interface corresponding to each PSU power supply; and adjust the switch state of each PSU power supply in the target IT device to the corresponding target switch state by calling the switch control interface.
[0152] Furthermore, the efficiency optimization module 50 is also used to detect whether the target switch state meets the preset safety rules; if it does, the step of obtaining the switch control interface corresponding to each PSU power supply is executed.
[0153] Furthermore, the data acquisition module 10 is also used to run a benchmark test program in the target IT device when the target IT device is in an idle state; construct multiple PSU state combinations based on the PSU power information in the target IT device, and obtain the power consumption range corresponding to the target IT device; perform power efficiency tests on the target IT device according to the multiple PSU state combinations and the power consumption range through the benchmark test program, and obtain test results; and construct a preset configuration conversion diagram based on the test results.
[0154] It should be understood that the above are merely illustrative examples and do not constitute any limitation on the technical solution of the present invention. In specific applications, those skilled in the art can make settings as needed, and the present invention does not impose any restrictions on this.
[0155] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this invention. In practical applications, those skilled in the art can select some or all of the workflow to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.
[0156] In addition, for technical details not described in detail in this embodiment, please refer to the power efficiency optimization method provided in any embodiment of the present invention, which will not be repeated here.
[0157] Furthermore, it should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0158] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0159] 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 the present invention, 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 read-only memory (ROM) / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0160] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A power efficiency optimization method, characterized in that, The power efficiency optimization method includes the following steps: Real-time power consumption data of the target IT device is obtained by collecting the real-time power consumption data according to the preset sampling frequency and preset sampling duration. Determine whether the target IT device is in a stable power consumption period based on the real-time power consumption data; If the target IT device is in a period of stable power consumption, then obtain the current system state corresponding to the target IT device; Detect whether the preset configuration transition diagram contains a switch configuration strategy corresponding to the current system state; If present, the PSU power supply in the target IT device is adjusted according to the switch configuration policy corresponding to the current system state to optimize power efficiency; Prior to the step of collecting the real-time power consumption of the target IT device according to a preset sampling frequency and a preset sampling duration to obtain real-time power consumption data, the method further includes: When the target IT equipment is in an idle state, a benchmark test program is run on the target IT equipment. Multiple PSU state combinations are constructed based on the PSU power information in the target IT device, and the power consumption range corresponding to the target IT device is obtained; The target IT device is tested for power efficiency using the benchmark test program based on the multiple PSU state combinations and the power consumption range, and the test results are obtained. A preset configuration conversion diagram is constructed based on the test results.
2. The power efficiency optimization method as described in claim 1, characterized in that, After the step of detecting whether the preset configuration conversion diagram contains the switch configuration strategy corresponding to the current system state, the method further includes: If it does not exist, obtain the PSU power information of the target IT device; Based on the PSU power information, multiple PSU state combinations are generated, and the system power consumption value corresponding to each PSU state combination is obtained. The PSU state combination with the lowest corresponding system power consumption value is used as the target switch configuration strategy; The preset configuration conversion diagram is updated based on the target switch configuration strategy and the current system state; Upon completion of the update, the PSU power supply in the target IT device is adjusted according to the target switch configuration strategy to optimize power efficiency.
3. The power efficiency optimization method as described in claim 1, characterized in that, Before the step of collecting the real-time power consumption of the target IT device according to a preset sampling frequency and a preset sampling duration to obtain real-time power consumption data, the method further includes: Obtain hardware and load information for the target IT device; The preset sampling frequency is determined based on the hardware device information, and the preset sampling duration is determined based on the device load information.
4. The power efficiency optimization method as described in claim 1, characterized in that, The step of determining whether the target IT device is in a stable power consumption period based on the real-time power consumption data includes: The data fluctuation score is determined based on the real-time power consumption data; If the data fluctuation score is less than or equal to the preset fluctuation threshold, the target IT device is determined to be in a period of stable power consumption. If the data fluctuation score is greater than the preset fluctuation threshold, it is determined that the target IT device is not in a period of stable power consumption.
5. The power efficiency optimization method as described in claim 1, characterized in that, The step of adjusting the PSU power supply in the target IT device according to the switch configuration policy corresponding to the current system state to optimize power efficiency includes: The target switch state corresponding to each PSU power supply in the target IT device is determined according to the switch configuration strategy. Obtain the corresponding switch control interface for each PSU power supply; The switching state of each PSU power supply in the target IT device is adjusted to the corresponding target switching state by calling the switch control interface.
6. The power efficiency optimization method as described in claim 5, characterized in that, Before the step of obtaining the switching control interface corresponding to each PSU power supply, the method further includes: Detect whether the target switch state meets the preset safety rules; If the conditions are met, then proceed with the step of obtaining the switch control interface corresponding to each PSU power supply.
7. A power efficiency optimization device, characterized in that, The power efficiency optimization device includes the following modules: The data acquisition module is used to collect the real-time power consumption of the target IT device according to the preset sampling frequency and preset sampling duration, and obtain real-time power consumption data. The stability analysis module is used to determine whether the target IT device is in a stable power consumption period based on the real-time power consumption data. The status acquisition module is used to acquire the current system status corresponding to the target IT device if the target IT device is in a period of stable power consumption. The strategy acquisition module is used to detect whether there is a switch configuration strategy corresponding to the current system state in the preset configuration conversion diagram; An efficiency optimization module is used to adjust the PSU power supply in the target IT device according to the switch configuration strategy corresponding to the current system state, if present, in order to optimize power efficiency. The data acquisition module is further configured to: run a benchmark test program on the target IT device when the target IT device is in an idle state; construct multiple PSU state combinations based on the PSU power information in the target IT device and obtain the power consumption range corresponding to the target IT device; perform power efficiency tests on the target IT device based on the multiple PSU state combinations and the power consumption range using the benchmark test program to obtain test results; and construct a preset configuration conversion diagram based on the test results.
8. A power efficiency optimization device, characterized in that, The power efficiency optimization device includes: a switching unit, a measuring unit, a controller, and an automatic transfer switch. The controller is equipped with a power efficiency optimization program, which, when executed, implements the steps of the power efficiency optimization method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a power efficiency optimization program, which, when executed, implements the steps of the power efficiency optimization method as described in any one of claims 1-6.
Citation Information
Patent Citations
Power supply with switch control function
CN103873037A
Method for testing dynamic power consumption of servers
CN104572419A
structure and method for guaranteeing stability of a server power supply system based on a CPLD
CN109582115A
Power supply module working mode control method
CN111475008A