A method, system and medium for power capping control of a server CPU
By calculating the CPU's high and normal current power supply and junction temperature to determine the capping value and threshold range, and dynamically adjusting the main frequency and core voltage, the problem of inaccurate CPU power capping control in existing technologies is solved, achieving stable and efficient CPU performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU EBOYLAMP ELECTRONICS CO LTD
- Filing Date
- 2023-10-26
- Publication Date
- 2026-07-24
AI Technical Summary
Existing server CPU power capping control strategies suffer from coarse adjustments, complex measurement methods, and insufficient precision, making it impossible to dynamically adjust the balance between power and performance, resulting in CPU performance degradation and inaccurate power capping control.
By calculating the power of the CPU's high-current power supply and general-current power supply, and combining the CPU junction temperature, the capping value and threshold range are determined. The CPU frequency and core voltage are dynamically adjusted to achieve precise power control, forming a capping threshold range. The power capping control method is dynamically determined according to the CPU performance requirements.
It improves the accuracy and stability of CPU power capping control, ensures effective CPU performance, avoids frequent adjustments, and achieves a balance between power and performance.
Smart Images

Figure CN117539618B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of server technology, and specifically to a power capping control method, system, and medium for a server CPU. Background Technology
[0002] With the growth of internet user services, network data throughput is increasing, and the workload of servers, as the basic data processing units of data centers, is also increasing. In particular, the power consumption of the CPU (Central Processing Unit) within the server is rising accordingly. For example, the thermal power of a single domestic CPU in a recent domestic model has reached 400W, leading to a significant increase in the overall power consumption of the server. This places an excessive load on the power supply system, reduces voltage stability, and affects the normal operation of the server. Therefore, to control the power consumption of the equipment within the server and ensure power supply safety, it is necessary to measure the CPU power consumption in real time and implement power capping control.
[0003] Power capping is a method to control server CPU power, limiting the peak power achievable by the server CPU to a specific threshold. Currently, most servers use a Baseboard Management Controller (BMC) to periodically monitor the server CPU power.
[0004] However, current CPU power capping control strategies have the following technical problems:
[0005] 1. The adjustment strategy is rather crude, with the capping value limited to a single value. However, in reality, the measured power usually fluctuates around the capping value, leading to frequent adjustments to the CPU's power capping control strategy, which is not conducive to the effective performance of the CPU.
[0006] 2. Most CPU power measurement methods use either current probe testing or multimeter resistance sampling. However, existing power measurement methods are relatively complex to operate, increasing the operational complexity of power measurement. Furthermore, the measurement range is limited and the measurement accuracy is insufficient, resulting in a large error in the measured CPU power value. Consequently, the power capping control strategy is not accurate enough.
[0007] 3. Existing CPU power capping strategies typically employ a single method of reducing the CPU's clock speed, rather than dynamically adjusting the power capping strategy based on CPU performance requirements, thus limiting their effectiveness in improving power consumption. Specifically, there is a non-linear relationship between CPU power and clock speed; generally, CPU power increases exponentially with clock speed. Therefore, in some cases, even reducing the clock speed may not achieve the desired power improvement. Conversely, there is a positive correlation between CPU performance and clock speed; reducing the clock speed may lead to a decrease in CPU performance, especially under heavy loads. Therefore, simply reducing the CPU clock speed cannot achieve the optimal balance between power and CPU performance. Furthermore, CPU power is not only related to clock speed but also to other factors (such as voltage and load). Therefore, simply reducing the CPU clock speed has limited effectiveness in improving power consumption. Summary of the Invention
[0008] To address the aforementioned technical problems, this invention proposes a power capping control method, system, and medium for server CPUs, aiming to improve the accuracy of CPU power capping control while ensuring effective CPU performance.
[0009] Therefore, the present invention adopts the following technical solution: a power capping control method for a server CPU, comprising the following steps:
[0010] Calculate the CPU high-current power supply power and the CPU general current power supply power, and determine the measured value of CPU power based on the CPU high-current power supply power and the CPU general current power supply power.
[0011] Obtain the power corresponding to the CPU junction temperature, and record the power value corresponding to the CPU junction temperature as the capping value M;
[0012] Calculate the upper limit value L of CPU power capping control based on the capping value M;
[0013] Calculate the lower limit value R of CPU power capping control based on the upper limit value L;
[0014] The measured CPU power value is compared with the cap value M, the upper limit value L, and the lower limit value R respectively. Based on the comparison results of the measured CPU power value with the cap value M, the upper limit value L, and the lower limit value R, the CPU performance level is adjusted, and the CPU frequency and core voltage are adjusted based on the adjusted CPU performance level. The CPU frequency and core voltage correspond to the CPU performance level.
[0015] The CPU, as the core processor of a computer system, has varying power requirements depending on the workload and tasks. High-current CPU power supply refers to the power consumed by the CPU under high load and high performance conditions to support its operation and processing of large amounts of computing tasks. Normal-current CPU power supply refers to the power consumed by the CPU under low load and low power conditions, suitable for low-load, light tasks, achieving energy saving and power reduction. CPU junction temperature refers to the highest internal temperature of the CPU chip, that is, the maximum temperature of the chip's internal structure and circuitry. It is usually controlled and maintained within a safe range by the chip's cooling system and power management controls. The power corresponding to the CPU junction temperature refers to the power threshold at that junction temperature. The CPU performance level is determined by the CPU manufacturer during the product design and manufacturing phase. The setting of the CPU performance level considers multiple factors, including the CPU architecture, clock frequency, number of cores, cache size, etc., which determine the power characteristics corresponding to the CPU's performance level. CPU clock speed refers to the clock frequency of the CPU, and core voltage refers to the voltage level applied to the CPU core. Each CPU performance level corresponds to a specific CPU clock speed and core voltage value, and this correspondence is derived from the debugging results before the CPU leaves the factory.
[0016] This specification's embodiments determine the measured CPU power value based on the CPU's high-current power supply and general-current power supply, improving the accuracy of the measured CPU power calculation and providing a more accurate basis for the subsequent execution of the CPU power capping control method. Furthermore, this specification's embodiments determine the upper limit L and lower limit R of the CPU power capping control based on the power corresponding to the CPU junction temperature, forming a capping threshold range. The measured CPU power value is then compared with the capping value M, the upper limit L, and the lower limit R, respectively. Based on the comparison results, the CPU's performance level is adjusted, and power control is achieved by adjusting the CPU's clock speed and core voltage based on the CPU's performance level. In other words, the power capping control method is dynamically determined according to the CPU's performance needs, achieving a balance between power and CPU performance to a certain extent, ensuring effective CPU performance, and avoiding frequent execution of the CPU power capping control method due to reasonable fluctuations in measured power, thus improving the accuracy and stability of CPU power capping control.
[0017] Preferably, the calculation of the CPU high-current power supply includes:
[0018] The measured current and voltage values of the CPU's high-current power supply are obtained using a multi-phase power management chip.
[0019] The power of the CPU high-current power supply is obtained by multiplying the measured current value and the measured voltage value.
[0020] Preferably, the calculation of the CPU's general current power supply includes:
[0021] The measured voltage value of the CPU's general current power supply is obtained using an ADC sampling chip;
[0022] The current of the CPU's general current power supply is sampled by a resistor, and the sampled voltage is input into an amplifier to output an amplified voltage.
[0023] The measured current value of the CPU's general current power supply is obtained using an ADC sampling chip based on the amplified voltage.
[0024] The power of the CPU's general current power supply is obtained by multiplying the measured current value and the measured voltage value.
[0025] Preferably, the measured value of CPU power is determined based on the CPU high-current power supply power and the CPU general-current power supply power, including:
[0026] The sum of the CPU high-current power supply power and the CPU general-current power supply power is recorded as the measured CPU power value.
[0027] Preferably, the upper limit value L of CPU power capping control is calculated based on the capping value M, including:
[0028] The measured power error is determined based on the measured CPU power value.
[0029] The upper limit value L of CPU power capping control is obtained by subtracting the capping value M from the measured power error.
[0030] Preferably, calculating the upper limit value L of CPU power capping control based on the capping value M further includes:
[0031] The measured power error is determined based on the measured CPU power value.
[0032] The maximum measured power error is determined based on the measured power error.
[0033] The upper limit value L of CPU power capping control is obtained by subtracting the capping value M from the maximum measured power error.
[0034] Preferably, the lower limit value R for CPU power capping control is calculated based on the upper limit value L, including:
[0035] Obtain the power consumption corresponding to several performance levels of the CPU;
[0036] The maximum power difference between adjacent CPU performance levels is determined based on the power corresponding to several power levels of the CPU performance level.
[0037] The lower limit value R of CPU power capping control is obtained by subtracting the upper limit value L from the power difference between the largest adjacent CPU performance level.
[0038] Preferably, the measured CPU power value is compared with the capped value M, the upper limit value L, and the lower limit value R, respectively. Based on the comparison results, the CPU performance level is adjusted, and the CPU frequency and core voltage are adjusted based on the adjusted CPU performance level. The CPU frequency and core voltage correspond to the CPU performance level, including:
[0039] The measured CPU power value is compared with the capped value M. If the measured CPU power value is greater than or equal to the capped value M, a shutdown command is sent to the server. If the measured CPU power value is less than the capped value M, the next step is executed.
[0040] The measured CPU power value is compared with the upper limit value L. If the measured CPU power value is greater than the upper limit value L, the current CPU performance level is obtained, the current CPU performance level is reduced by one level, and the CPU frequency and core voltage are adjusted based on the downgraded CPU performance level. If the measured CPU power value is less than or equal to the upper limit value L, the next step is executed.
[0041] The measured CPU power value is compared with the lower limit value R. If the measured CPU power value is greater than or equal to the lower limit value R, the current CPU performance level is maintained. If the measured CPU power value is less than the lower limit value R, the current CPU performance level is obtained, the current CPU performance level is increased by one level, and the CPU frequency and core voltage are adjusted based on the increased CPU performance level.
[0042] A power capping control system for a server CPU, comprising:
[0043] The measured power value determination module is used to calculate the CPU high current power supply power and the CPU general current power supply power, and determine the measured CPU power value based on the CPU high current power supply power and the CPU general current power supply power.
[0044] The data acquisition module is used to acquire the power corresponding to the CPU junction temperature, and record the power value corresponding to the CPU junction temperature as the capping value M;
[0045] The capping threshold interval calculation module is used to calculate the upper limit value L of CPU power capping control based on the capping value M, and to calculate the lower limit value R of CPU power capping control based on the upper limit value L;
[0046] The power capping control module is used to compare the measured CPU power value with the capping value M, the upper limit value L, and the lower limit value R respectively. Based on the comparison results of the measured CPU power value with the capping value M, the upper limit value L, and the lower limit value R, the CPU performance level is adjusted, and the CPU frequency and core voltage are adjusted based on the adjusted CPU performance level. The CPU frequency and core voltage are both corresponding to the CPU performance level.
[0047] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a power capping control method for a server CPU as described above.
[0048] The beneficial technical effects of this invention include at least the following: It employs a power capping control method, system, and medium for a server CPU. Based on the CPU's high-current power supply and general-current power supply, the measured CPU power value is determined, improving the accuracy of the measured CPU power calculation and providing a more accurate basis for the subsequent execution of the CPU power capping control method. Simultaneously, based on the power corresponding to the CPU junction temperature, the upper limit L and lower limit R of the CPU power capping control are determined, forming a capping threshold range. The measured CPU power value is then compared with the capping value M, the upper limit L, and the lower limit R, respectively. Based on the comparison results, the CPU's performance level is adjusted, and power control is achieved by adjusting the CPU's clock speed and core voltage based on the CPU's performance level. In other words, the power capping control method is dynamically determined according to the CPU's performance requirements, achieving a balance between power and CPU performance to a certain extent, ensuring effective CPU performance, and avoiding frequent execution of the CPU power capping control method due to reasonable fluctuations in the measured power. This improves the accuracy and stability of the CPU power capping control and has high practical value.
[0049] Other features and advantages of the present invention will be disclosed in detail in the following detailed description and accompanying drawings. Attached Figure Description
[0050] The invention will be further described below with reference to the accompanying drawings:
[0051] Figure 1 This is a flowchart of a server CPU power capping control method according to an embodiment of the present invention.
[0052] Figure 2 This is a schematic diagram illustrating a method for calculating the general current power supply of a CPU according to an embodiment of the present invention.
[0053] Figure 3 This is a flowchart of the CPU power capping control execution method according to an embodiment of the present invention.
[0054] Figure 4This is a schematic diagram of the power capping control system for the server CPU in an embodiment of the present invention. Detailed Implementation
[0055] The technical solutions of the embodiments of the present invention will be explained and described below with reference to the accompanying drawings. However, the following embodiments are only preferred embodiments of the present invention and not all of them. Other embodiments obtained by those skilled in the art based on the embodiments in the implementation methods without creative effort are all within the protection scope of the present invention.
[0056] In the following description, terms such as “inner,” “outer,” “upper,” “lower,” “left,” and “right” are used only to indicate orientation or positional relationship for the convenience of describing the embodiments and simplifying the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention.
[0057] This application provides a method for controlling the power capping of a server CPU. Please refer to the appendix. Figure 1 This includes the following steps:
[0058] Step 102: Calculate the CPU high-current power supply power and the CPU general current power supply power, and determine the measured value of CPU power based on the CPU high-current power supply power and the CPU general current power supply power.
[0059] As the core processor of a computer system, the CPU's power requirements vary with different workloads and tasks. High-current CPU power supply refers to the power consumed by the CPU under high load and high performance conditions to support its operation and processing of large amounts of computing tasks. Normal-current CPU power supply refers to the power consumed by the CPU under low load and low power conditions, suitable for low-load, light-task situations, achieving energy saving and power reduction.
[0060] Optionally, in this embodiment, the method for calculating the CPU high-current power supply power and the CPU general current power supply power can be to use a dedicated power meter and connect it to the output terminal of the CPU high-current power supply to directly measure the CPU high-current power supply power value and the CPU general current power supply power value. Alternatively, current sensors and voltage sensors can be connected to the output terminals of the CPU high-current power supply and the CPU general current power supply respectively, and the current and voltage values can be measured through these sensors. Then, the measured current and voltage values can be multiplied accordingly to obtain the CPU high-current power supply power value and the CPU general current power supply power value. This embodiment does not limit this method.
[0061] It is understood that the methods for determining the measured CPU power value based on the CPU high-current power supply and the CPU general-current power supply in this embodiment include, but are not limited to, the following:
[0062] 1. The power of the CPU high-current power supply and the power of the CPU general current power supply are weighted and summed, and the weighted sum is taken as the measured value of CPU power.
[0063] 2. Directly sum the CPU high-current power supply power and the CPU general current power supply power, and use the summed value as the actual measured value of CPU power.
[0064] 3. Sum the CPU high-current power supply power and the CPU general current power supply power, and use the summed value as the initial measured CPU power value. Calculate the initial measured CPU power value multiple times, and take the average of the multiple initial measured CPU power values as the actual measured CPU power value.
[0065] 4. Sum the CPU high-current power supply power and the CPU general current power supply power, and use the summed value as the initial measured CPU power value. The CPU power is obtained several times in a loop at regular intervals (e.g., 100ms), the highest and lowest values are removed, and the average value is calculated using the median value. The average value is used as the measured CPU power value.
[0066] Step 104: Obtain the power corresponding to the CPU junction temperature, and record the power value corresponding to the CPU junction temperature as the capping value M.
[0067] The CPU junction temperature refers to the highest internal temperature of the CPU chip, that is, the maximum temperature of the internal structure and circuitry of the chip. It is typically controlled and maintained within a safe range by the chip's heat dissipation system and power management controls. The power rating corresponding to the CPU junction temperature refers to the power threshold at that temperature.
[0068] For example, in this embodiment, the power corresponding to the CPU junction temperature can be estimated through the following steps:
[0069] 1. Obtain the CPU's thermal resistance value. Thermal resistance represents the temperature increase per unit power consumption per unit temperature difference. Typically, CPU manufacturers provide thermal resistance values or specify them in the technical specifications. The common unit for thermal resistance is °C / W (degrees Celsius per watt).
[0070] 2. Measure the CPU junction temperature. A temperature sensor or thermistor can be used to measure the CPU junction temperature. Ensure the measurement is performed under high load and high performance conditions to obtain the maximum junction temperature value.
[0071] 3. Calculate the power consumption corresponding to the CPU junction temperature using the following formula:
[0072] Power = (Junction Temperature - Ambient Temperature) / Thermal Resistance
[0073] Ambient temperature refers to the temperature around the CPU, measured in degrees Celsius.
[0074] Step 106: Calculate the upper limit value L of CPU power capping control based on the capping value M.
[0075] Step 108: Calculate the lower limit value R of CPU power capping control based on the upper limit value L.
[0076] Step 110: Compare the measured CPU power value with the cap value M, upper limit value L, and lower limit value R respectively. Based on the comparison results of the measured CPU power value with the cap value M, upper limit value L, and lower limit value R, adjust the CPU performance level, and adjust the CPU frequency and core voltage based on the adjusted CPU performance level to achieve power cap control of the server CPU. The CPU frequency and core voltage correspond to the CPU performance level.
[0077] The performance level of a CPU is determined by the CPU manufacturer during the product design and manufacturing phase. The setting of a CPU's performance level considers multiple factors, including the CPU architecture, clock frequency, number of cores, and cache size. These factors determine the power characteristics corresponding to different performance levels. CPU clock speed refers to the CPU's clock frequency, and core voltage refers to the voltage level applied to the CPU core. Each CPU performance level corresponds to a specific CPU clock speed and core voltage value, and this correspondence is derived from the CPU's pre-tuning results.
[0078] Understandably, adjusting a CPU's performance level can be achieved by increasing the performance level, maintaining the current performance level, or decreasing the performance level. By adjusting the CPU's clock speed and core voltage, the CPU's power consumption can be dynamically adjusted according to actual performance needs. For example, under light loads, the clock speed and core voltage can be reduced to save power; while under heavy loads, the clock speed and core voltage can be increased to provide higher performance.
[0079] This embodiment determines the measured CPU power value based on the CPU's high-current power supply and general-current power supply, improving the accuracy of the measured CPU power calculation and providing a more accurate basis for the subsequent execution of the CPU power capping control method. Simultaneously, this embodiment determines the upper limit L and lower limit R of the CPU power capping control based on the power corresponding to the CPU junction temperature, forming a capping threshold range. The measured CPU power value is then compared with the capping value M, the upper limit L, and the lower limit R, respectively. Based on the comparison results, the CPU's performance level is adjusted, and power control is achieved by adjusting the CPU's clock speed and core voltage based on the CPU's performance level. In other words, the power capping control method is dynamically determined according to the CPU's performance requirements, achieving a balance between power and CPU performance to a certain extent, ensuring effective CPU performance, and avoiding frequent execution of the CPU power capping control method due to reasonable fluctuations in the measured power, thus improving the accuracy of CPU power capping control.
[0080] In one embodiment of this specification, calculating the CPU high-current power supply includes:
[0081] The measured current and voltage values of the CPU's high-current power supply are obtained using a multi-phase power management chip.
[0082] The power of the CPU high-current power supply is obtained by multiplying the measured current value and the measured voltage value.
[0083] A multi-phase power management chip is an integrated circuit chip used to manage the power supply and energy conversion in electronic devices. It provides a stable and efficient power supply by converting and transferring electrical energy in stages and according to time sequences. The main functions of a multi-phase power management chip include power conversion and regulation, that is, converting the high-current power input from the CPU into voltage and current suitable for the target device, and adjusting it according to demand.
[0084] Specifically, in this embodiment, the CPU high-current power supply is connected to the input terminal of the multi-phase power management chip, and then the BMC is used to read the internal current register value and internal voltage register value of the multi-phase power management chip through the IIC (Inter-Integrated Circuit) bus to obtain the measured current value and measured voltage value of the CPU high-current power supply.
[0085] By employing a multi-phase power management chip, accurate and real-time measured current and voltage values of the CPU high-current power supply can be obtained, thereby improving the accuracy of CPU high-current power supply power calculation and making the obtained CPU high-current power supply power more reliable.
[0086] In one embodiment of this specification, calculating the CPU's general current power supply includes:
[0087] The measured voltage value of the CPU's general current power supply is obtained using an ADC sampling chip;
[0088] The current of the CPU's general current power supply is sampled by a resistor, and the sampled voltage is input into an amplifier to output an amplified voltage.
[0089] The measured current value of the CPU's general current power supply is obtained by using an ADC sampling chip based on the amplified voltage.
[0090] The power of the CPU's general current power supply is obtained by multiplying the measured current value and the measured voltage value.
[0091] Among them, the ADC (Analog to Digital Converter) sampling chip is a device specifically designed to sample analog voltage signals and convert them into digital signals. It converts analog voltage signals into corresponding digital codes, enabling these digital codes to be processed, stored, and transmitted in digital systems. An amplifier is used to amplify voltage signals; it is typically used in measurement circuits to amplify voltage signals to a range suitable for subsequent processing or measurement.
[0092] Specifically, please refer to the appendix. Figure 2 In this embodiment, the CPU's general current supply voltage is directly connected to the input terminal of the ADC sampling chip. The BMC then reads the internal register value of the ADC sampling chip via the IIC bus to obtain the measured voltage value of the CPU's general current supply. Alternatively, this embodiment uses a resistor sampling method for the CPU's general current supply. The CPU's general current supply current flows through a resistor, generating a voltage drop across it. Since the voltage generated by the CPU's general current supply current flowing through the resistor is very small, an amplifier amplifies the voltage drop across the resistor and outputs an amplified voltage VOUT. This amplified voltage VOUT is then connected to the input terminal of the ADC sampling chip. The BMC reads the internal register value of the ADC sampling chip via the IIC bus, and dividing the internal register value by the resistance value yields the measured current value of the CPU's general current supply.
[0093] This embodiment uses two methods to measure the voltage and current of the CPU's general current power supply. By directly sampling the measured voltage value of the CPU's general current power supply through an ADC chip, the circuit design and wiring are simplified and the operation complexity is reduced. By using a resistance sampling method to convert the current of the CPU's general current power supply into voltage for measurement, the voltage and current of the CPU's general current power supply can be measured simultaneously without the need for an additional current sensor.
[0094] In one embodiment of this specification, determining the measured CPU power value based on the CPU high-current power supply and the CPU general-current power supply includes:
[0095] The sum of the CPU high-current power supply power and the CPU normal-current power supply power is recorded as the measured CPU power value.
[0096] In one embodiment of this specification, calculating the upper limit value L of CPU power capping control based on the capping value M includes:
[0097] Determine the measured power error based on the actual CPU power measurement value;
[0098] The upper limit value L of CPU power capping control is obtained by subtracting the capping value M from the measured power error.
[0099] It is understandable that the measured power error refers to the absolute difference between the measured CPU power value and the theoretical CPU power value. The theoretical CPU power value can be calculated using one of the following methods:
[0100] 1. Calculation based on voltage and impedance: Using the CPU's voltage (V) and impedance (Z) values, the CPU's power (P) can be obtained by dividing the square of the voltage by the impedance, i.e., P = V^2 / Z. This method is suitable when the CPU's voltage and impedance values are known.
[0101] 2. Calculation based on frequency and capacitance: Using the CPU's operating frequency (f) and capacitor value (C), the CPU's power (P) can be obtained by calculating the charging power of the capacitor, i.e., P = 0.5 * C * V^2 * f. This method is suitable when the CPU's operating frequency and capacitor value are known, where V is the voltage value.
[0102] In practice, CPU power is affected by various factors such as load, temperature, and power supply efficiency. Therefore, the measured CPU power value will fluctuate, leading to a continuous change in the measured power error. This error reflects the fluctuations and changes in CPU power under actual operating conditions. By taking the measured power error into account, this embodiment can more accurately determine the upper limit of the CPU power capping control threshold, thereby improving the accuracy of the server CPU power capping control method proposed in this embodiment.
[0103] In one embodiment of this specification, calculating the upper limit value L of CPU power capping control based on the capping value M further includes:
[0104] Determine the measured power error based on the actual CPU power measurement value;
[0105] The maximum measured power error is determined based on the measured power error.
[0106] The upper limit value L of CPU power capping control is obtained by subtracting the capping value M from the error of the maximum measured power.
[0107] It is understandable that the maximum measured power error is the largest measured power error among all measured power errors. This embodiment determines the upper limit L of CPU power capping control based on the maximum measured power error. This ensures that CPU power is controlled within a safe range, avoiding problems such as overheating, damage, or instability caused by excessive power. Furthermore, since the real-time measured CPU power value fluctuates, taking the maximum measured power error into account allows the upper limit L to better adapt to these fluctuations, thus providing more stable power control.
[0108] In one embodiment of this specification, the lower limit value R of CPU power capping control is calculated based on the upper limit value L, including:
[0109] Obtain the power consumption corresponding to several performance levels of the CPU;
[0110] The maximum power difference between adjacent CPU performance levels is determined based on the power corresponding to several levels of CPU performance.
[0111] The lower limit value R of CPU power capping control is obtained by subtracting the upper limit value L from the power difference between the largest adjacent CPU performance level.
[0112] It is understandable that the power difference between adjacent CPU performance levels is not consistent. Therefore, this embodiment determines the lower limit value R of CPU power capping control based on the maximum power difference between adjacent CPU performance levels, which can better adapt to the fluctuation of the measured CPU power value, thereby providing more stable power control.
[0113] In one embodiment of this specification, please refer to the appendix. Figure 3 The measured CPU power is compared with the capped value M, upper limit L, and lower limit R. Based on the comparison results, the CPU performance level is adjusted, and the CPU frequency and core voltage are adjusted accordingly. The CPU frequency and core voltage correspond to the CPU performance level.
[0114] The measured CPU power is compared with the capped value M. If the measured CPU power is greater than or equal to the capped value M, a shutdown command is sent to the server to prevent excessive power from causing the CPU to crash or be damaged. If the measured CPU power is less than the capped value M, the next step is executed.
[0115] The measured CPU power value is compared with the upper limit L. If the measured CPU power value is greater than the upper limit L, the current CPU performance level is obtained, the current CPU performance level is reduced by one level, and the CPU frequency and core voltage are adjusted based on the downgraded CPU performance level. If the measured CPU power value is less than or equal to the upper limit L, the next step is executed.
[0116] The measured CPU power is compared with the lower limit R. If the measured CPU power is greater than or equal to the lower limit R, the current CPU performance level is maintained. If the measured CPU power is less than the lower limit R, the current CPU performance level is obtained, the current CPU performance level is increased by one level, and the CPU frequency and core voltage are adjusted based on the increased CPU performance level.
[0117] Based on the foregoing embodiments, it can be understood that the capped value M is greater than the upper limit value L, and the upper limit value L is greater than the lower limit value R.
[0118] This embodiment sets a cap value M, an upper limit value L, and a lower limit value R, and combines this with adjustments to the CPU performance level, CPU frequency, and core voltage. By dynamically determining the power cap control method according to the CPU's performance requirements and achieving precise control of CPU power, it achieves a balance between power and performance. This helps ensure that the CPU has optimal energy efficiency and performance under different loads, while maintaining the CPU's stability and reliability.
[0119] In one embodiment of this specification, please refer to the appendix. Figure 4 Furthermore, a power capping control system for a server CPU, consistent with the aforementioned technical concept, is provided, including:
[0120] The measured power value determination module 1 is used to calculate the CPU high current power supply power and the CPU general current power supply power, and determine the measured CPU power value based on the CPU high current power supply power and the CPU general current power supply power.
[0121] Data acquisition module 2 is used to acquire the power corresponding to the CPU junction temperature and record the power value corresponding to the CPU junction temperature as the capping value M;
[0122] The capping threshold interval calculation module 3 is used to calculate the upper limit value L of CPU power capping control based on the capping value M, and to calculate the lower limit value R of CPU power capping control based on the upper limit value L;
[0123] The power capping control module 4 is used to compare the measured CPU power value with the capping value M, the upper limit value L, and the lower limit value R respectively. Based on the comparison results of the measured CPU power value with the capping value M, the upper limit value L, and the lower limit value R, the CPU performance level is adjusted, and the CPU frequency and core voltage are adjusted based on the adjusted CPU performance level. The CPU frequency and core voltage are both corresponding to the CPU performance level.
[0124] In one embodiment of this specification, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements a power capping control method for a server CPU as described above.
[0125] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this specification are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., Digital Versatile Discs (DVDs)), or semiconductor media (e.g., Solid State Disks (SSDs)).
[0126] The above description is merely a preferred embodiment disclosed in this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of protection involved in this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-disclosed concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0127] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
Claims
1. A power capping control method for a server CPU, characterized in that, Includes the following steps: Calculate the CPU high-current power supply power and the CPU general current power supply power, and determine the measured value of CPU power based on the CPU high-current power supply power and the CPU general current power supply power. Obtain the power corresponding to the CPU junction temperature, and record the power value corresponding to the CPU junction temperature as the capping value M; Calculate the upper limit value L of CPU power capping control based on the capping value M; Calculate the lower limit value R of CPU power capping control based on the upper limit value L; The measured CPU power value is compared with the cap value M, the upper limit value L, and the lower limit value R respectively. Based on the comparison results of the measured CPU power value with the cap value M, the upper limit value L, and the lower limit value R, the CPU performance level is adjusted, and the CPU frequency and core voltage are adjusted based on the adjusted CPU performance level. The CPU frequency and core voltage are both corresponding to the CPU performance level. The upper limit value L of CPU power capping control is calculated based on the capping value M, including: The measured power error is determined based on the measured CPU power value. The upper limit value L of CPU power capping control is obtained by subtracting the capping value M from the measured power error. The lower limit value R of CPU power capping control is calculated based on the upper limit value L, including: Obtain the power consumption corresponding to several performance levels of the CPU; The maximum power difference between adjacent CPU performance levels is determined based on the power corresponding to several power levels of the CPU performance level. The lower limit value R of CPU power capping control is obtained by subtracting the upper limit value L from the power difference between the largest adjacent CPU performance level.
2. The power capping control method for a server CPU as described in claim 1, characterized in that, The calculation of the CPU's high-current power supply includes: The measured current and voltage values of the CPU's high-current power supply are obtained using a multi-phase power management chip. The power of the CPU high-current power supply is obtained by multiplying the measured current value and the measured voltage value.
3. The power capping control method for a server CPU as described in claim 1, characterized in that, The calculation of the CPU's general current power supply includes: The measured voltage value of the CPU's general current power supply is obtained using an ADC sampling chip; The current of the CPU's general current power supply is sampled by a resistor, and the sampled voltage is input into an amplifier to output an amplified voltage. The measured current value of the CPU's general current power supply is obtained using an ADC sampling chip based on the amplified voltage. The power of the CPU's general current power supply is obtained by multiplying the measured current value and the measured voltage value.
4. The power capping control method for a server CPU as described in claim 1, characterized in that, The measured CPU power value is determined based on the CPU high-current power supply power and the CPU general-current power supply power, including: The sum of the CPU high-current power supply power and the CPU general-current power supply power is recorded as the measured CPU power value.
5. The power capping control method for a server CPU as described in claim 1, characterized in that, The calculation of the upper limit value L for CPU power capping control based on the capping value M also includes: The measured power error is determined based on the measured CPU power value. The maximum measured power error is determined based on the measured power error. The upper limit value L of CPU power capping control is obtained by subtracting the capping value M from the maximum measured power error.
6. The power capping control method for a server CPU as described in claim 1, characterized in that, The measured CPU power value is compared with the cap value M, upper limit value L, and lower limit value R, respectively. Based on the comparison results, the CPU performance level is adjusted, and the CPU frequency and core voltage are adjusted based on the adjusted CPU performance level. The CPU frequency and core voltage correspond to the CPU performance level and include: The measured CPU power value is compared with the capped value M. If the measured CPU power value is greater than or equal to the capped value M, a shutdown command is sent to the server. If the measured CPU power value is less than the capped value M, the next step is executed. The measured CPU power value is compared with the upper limit value L. If the measured CPU power value is greater than the upper limit value L, the current CPU performance level is obtained, the current CPU performance level is reduced by one level, and the CPU frequency and core voltage are adjusted based on the downgraded CPU performance level. If the measured CPU power value is less than or equal to the upper limit value L, the next step is executed. The measured CPU power value is compared with the lower limit value R. If the measured CPU power value is greater than or equal to the lower limit value R, the current CPU performance level is maintained. If the measured CPU power value is less than the lower limit value R, the current CPU performance level is obtained, the current CPU performance level is increased by one level, and the CPU frequency and core voltage are adjusted based on the increased CPU performance level.
7. A power capping control system for a server CPU, characterized in that, include: The measured power value determination module is used to calculate the CPU high current power supply power and the CPU general current power supply power, and determine the measured CPU power value based on the CPU high current power supply power and the CPU general current power supply power. The data acquisition module is used to acquire the power corresponding to the CPU junction temperature, and record the power value corresponding to the CPU junction temperature as the capping value M; The capping threshold interval calculation module is used to calculate the upper limit value L of CPU power capping control based on the capping value M, and to calculate the lower limit value R of CPU power capping control based on the upper limit value L; The power capping control module is used to compare the measured CPU power value with the capping value M, the upper limit value L, and the lower limit value R respectively. Based on the comparison results of the measured CPU power value with the capping value M, the upper limit value L, and the lower limit value R, the CPU performance level is adjusted, and the CPU frequency and core voltage are adjusted based on the adjusted CPU performance level. The CPU frequency and core voltage are both corresponding to the CPU performance level. The upper limit value L of CPU power capping control is calculated based on the capping value M, including: The measured power error is determined based on the measured CPU power value. The upper limit value L of CPU power capping control is obtained by subtracting the capping value M from the measured power error. The lower limit value R of CPU power capping control is calculated based on the upper limit value L, including: Obtain the power consumption corresponding to several performance levels of the CPU; The maximum power difference between adjacent CPU performance levels is determined based on the power corresponding to several power levels of the CPU performance level. The lower limit value R of CPU power capping control is obtained by subtracting the upper limit value L from the power difference between the largest adjacent CPU performance level.
8. A computer-readable storage medium, characterized in that, It stores a computer program, which, when executed by a processor, implements a power capping control method for a server CPU as described in any one of claims 1 to 6.