Component power consumption management method and computer equipment

By working together with BMC, CPLD and BIOS, and employing dual backup storage and multi-layer security locking mechanisms, the problem of low power consumption management efficiency of large-scale server components is solved, and efficient and secure power configuration management is achieved.

CN120973639AActive Publication Date: 2025-11-18INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511519726.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-23
Publication Date
2025-11-18
Estimated Expiration
2045-10-23

AI Technical Summary

Technical Problem

In large-scale server deployment scenarios, existing technologies suffer from inefficient component power consumption management, complex configurations, and a lack of effective data protection mechanisms, resulting in low management efficiency and insufficient security.

Method used

By working together with BMC, CPLD and BIOS, and using dual backup storage and intelligent verification algorithms, a complete process from configuration distribution to power consumption limit execution is achieved. Combined with a multi-layer security locking mechanism, the reliability and security of configuration data are ensured.

Benefits of technology

It improves the efficiency and reliability of component power consumption management, ensures that configuration data is not lost in abnormal situations, provides flexible management methods and end-to-end visualization, and enhances the convenience of operation and maintenance management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120973639A_ABST
    Figure CN120973639A_ABST
Patent Text Reader

Abstract

The invention discloses a component power consumption management method and computer equipment, and relates to the technical field of data centers, and the method comprises the following steps: writing a power consumption threshold into first storage equipment, second storage equipment and third storage equipment; data in the first storage device can be used for repairing data in other storage devices; and when the power consumption thresholds of the second storage device and the third storage device are the same, setting the power consumption threshold as a target power consumption threshold of the to-be-managed component. The problems that the BIOS of each server needs to be accessed to limit the power consumption of the parts of the server, the management efficiency is low, and an effective data protection mechanism is lacked can be solved. The system uses the component configuration command to instruct the three controllers to realize power consumption configuration of the components, and configuration is not required to be performed on the servers one by one. Double-backup storage is achieved through the second storage device and the third storage device, when data have problems, the first storage device is used for repairing, and it is ensured that the data cannot be lost or damaged.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data center technology, and more specifically to a component power consumption management method and a computer device. Background Technology

[0002] In the process of power management of servers, it is necessary to manage the power consumption of various components in the server. For example, in order to meet the needs of different application scenarios, the CPU (Central Processing Unit) usually needs to find a balance between performance and power consumption.

[0003] Currently, power management for components primarily relies on RAPL (Runtime Average Power Limit) technology. As a hardware-level power limiting mechanism, RAPL can dynamically control the CPU's power consumption limit during runtime. However, existing RAPL configuration methods mainly limit component power consumption through the BIOS (Basic Input Output System) Setup interface or operating system tools, which suffers from problems such as complex configuration operations, easy accidental modification of configuration parameters, and inability to achieve centralized management. Especially in large-scale server deployment scenarios, administrators need to manually configure and manage the power consumption of components in thousands of servers, resulting in low management efficiency.

[0004] Therefore, the relevant technologies suffer from the problems of requiring access to the BIOS of each server to limit the power consumption of server components, resulting in low management efficiency and a lack of effective data protection mechanisms. Summary of the Invention

[0005] In view of this, the present invention provides a component power consumption management method and a computer device to solve the problems of low management efficiency and lack of effective data protection mechanisms, which require entering the BIOS of each server to limit the power consumption of server components.

[0006] In a first aspect, this application provides a component power consumption management method, the method comprising: Upon receiving a component configuration command, the power consumption threshold is determined based on the component configuration command; Write the power consumption threshold to the first storage device, the second storage device, and the third storage device; If the data in the second storage device and the data in the third storage device do not meet the preset conditions, the data in the second storage device and the data in the third storage device are repaired using the data in the first storage device. When the power consumption threshold in the second storage device is the same as the power consumption threshold in the third storage device, the power consumption threshold in the second or third storage device is written to a preset register, and the power consumption threshold in the preset register is set as the target power consumption threshold of the component to be managed.

[0007] Secondly, this application provides a component power consumption management system, which includes: a first controller, a first storage device, a second controller, a second storage device, a third storage device, and a third controller; The first controller is configured to determine a power consumption threshold based on a component configuration command upon receiving a component configuration command, and write the power consumption threshold into a first storage device. The second controller is used to obtain the power consumption threshold from the first storage device and write the power consumption threshold to the second storage device and the third storage device. The second controller is also used to repair the data in the second storage device and the data in the third storage device using the data in the first storage device when neither the data in the second storage device nor the data in the third storage device meets the preset conditions. The third controller is used to write the power consumption threshold in the second storage device or the third storage device into a preset register when the power consumption threshold in the second storage device is the same as the power consumption threshold in the third storage device, and set the power consumption threshold in the preset register as the target power consumption threshold of the component to be managed.

[0008] Thirdly, this application provides a component power consumption management device, the device comprising: The threshold determination module is used to determine the power consumption threshold based on the component configuration command when a component configuration command is received. The data writing module is used to write the power consumption threshold to the first storage device, the second storage device, and the third storage device; The data repair module is used to repair the data in the second storage device and the data in the third storage device using the data in the first storage device when neither the data in the second storage device nor the data in the third storage device meets the preset conditions. The power consumption threshold setting module is used to write the power consumption threshold of the second storage device or the third storage device into a preset register when the power consumption threshold in the second storage device is the same as the power consumption threshold in the third storage device, and set the power consumption threshold in the preset register as the target power consumption threshold of the component to be managed.

[0009] Fourthly, this application provides a computer device, including: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the component power management method of the first aspect or any corresponding embodiment described above.

[0010] Fifthly, this application provides a computer-readable storage medium storing computer instructions for causing a computer to execute the component power management method of the first aspect or any corresponding embodiment described above.

[0011] In a sixth aspect, this application provides a computer program product, including computer instructions for causing a computer to execute the component power management method described in the first aspect or any corresponding embodiment thereof.

[0012] This application addresses the problem of low management efficiency and lack of effective data protection mechanisms by requiring access to the BIOS of each server to limit the power consumption of server components. The method utilizes component configuration commands to instruct three controllers to configure the power consumption of components, eliminating the need for individual server configuration. It achieves dual backup storage using the second and third storage devices, and uses the first storage device to repair data if the data does not meet preset conditions, thus improving the reliability of configuration data and the system's fault tolerance. The first and third storage devices provide backup, and the first storage device is used to repair data when preset conditions are not met, ensuring no data loss or corruption and improving the reliability of configuration data and the system's fault tolerance. Furthermore, the first controller writes the power consumption threshold into a preset register and sets it as the target power consumption threshold for the managed component when the power consumption threshold values ​​in the second and third storage devices are the same. Attached Figure Description

[0013] To more clearly illustrate the technical solutions in the specific embodiments or related technologies of this application, the drawings used in the description of the specific embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0014] Figure 1 This is a flowchart illustrating a component power consumption management method according to an embodiment of this application; Figure 2 This is a flowchart of a multi-level fault recovery strategy according to an embodiment of this application; Figure 3 This is a schematic diagram of the component power consumption management system according to an embodiment of this application; Figure 4 This is a schematic diagram of the data flow according to an embodiment of this application; Figure 5This is a schematic diagram of a security locking process according to an embodiment of this application; Figure 6 This is a schematic diagram of a multi-layer locking architecture according to an embodiment of this application; Figure 7 This is a structural block diagram of a component power consumption management device according to an embodiment of this application; Figure 8 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of this application. Detailed Implementation

[0015] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0016] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0017] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0018] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0019] With the rapid development of data centers and cloud computing, the number of servers is increasing, necessitating power management. In this process, server CPUs typically need to find a balance between performance and power consumption to meet the demands of different application scenarios. Currently, RAPL (Runtime Average Power Limit) technology is a hardware-level power limiting mechanism that dynamically controls the CPU's power consumption limit during runtime. However, existing RAPL configuration methods primarily rely on BIOS Setup interfaces or operating system tools, which suffer from complex configuration, susceptibility to accidental modification, and the inability to achieve centralized management. Especially in large-scale server deployments where unified power configuration management is required for thousands of servers, traditional methods are extremely time-consuming.

[0020] Currently, mainstream CPU power consumption limiting technologies mainly include: 1. RAPL configuration based on BIOS Setup: This method provides RAPL power consumption limiting settings through the BIOS Setup interface. Administrators need to manually configure this by entering the BIOS interface when each server starts up, modifying the relevant RAPL options, and then restarting the server. The configuration takes effect during the server restart process. 2. Operating system-based power management tools: This method configures CPU RAPL parameters at the operating system level. This approach allows for dynamic adjustment but carries security risks. First, it may be maliciously modified after an attack; second, there may be unexpected user modifications. 3. Centralized management solutions based on BMC (Baseboard Management Controller): Some manufacturers provide remote power consumption management functions through BMC. Setting power consumption limits using BMC requires interrupting services and restarting the server for the changes to take effect. Furthermore, the persistent storage and reliability mechanisms for configuration data are not robust.

[0021] However, the above-mentioned technical solutions are highly complex to configure, requiring access to the server's BIOS interface or complex command-line tools for configuration, resulting in low efficiency during large-scale deployments. The data persistence of these solutions is unreliable; configuration parameters are easily lost due to BIOS updates and other operations, and there is a lack of effective data protection mechanisms. Furthermore, these solutions suffer from insufficient security, poor visibility, and lack of flexibility. Configuration parameters are easily modified accidentally or maliciously tampered with, and there is a lack of effective locking and protection mechanisms. The current power consumption limit configuration cannot be intuitively viewed from system information, impacting operational efficiency and hindering the implementation of differentiated power management strategies based on different business scenarios and hardware configurations.

[0022] Based on the above, this application provides a component power consumption management system. Through the collaborative work of the BMC, CPLD (Complex Programmable Logic Device), and BIOS, it achieves a complete process from configuration issuance to power consumption limit execution. Utilizing the CPLD's UFM (User Flash Memory) area for dual-backup storage, coupled with intelligent verification algorithms, significantly improves the reliability of configuration data and the system's fault tolerance. A multi-layered security locking mechanism, from the hardware MSR register to the software interface, ensures configuration security while providing flexible management methods, solving the security deficiencies of traditional solutions. Dynamically embedding power consumption configuration information into the CPU model string enables end-to-end visualization from the BIOS to the operating system, greatly improving the convenience of operation and maintenance management.

[0023] According to an embodiment of this application, a component power consumption management method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in the above-mentioned component power consumption management system. Although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than that shown here.

[0024] This embodiment provides a component power consumption management method. Figure 1 This is a flowchart of a component power consumption management method according to an embodiment of this application, such as... Figure 1 As shown, the process includes the following steps: Step S101: Upon receiving a component configuration command, determine the power consumption threshold based on the component configuration command.

[0025] Specifically, when the management terminal performs network management operations, it sends a component configuration command to the first controller to configure the target power consumption threshold of the component to be managed.

[0026] Upon receiving a component configuration command, the first controller determines a power consumption threshold based on the command and writes the threshold to the first storage device. For example, the BMC writes a configuration value of 165W (0x00A5, the hexadecimal representation of 165) to a designated area of ​​the motherboard EEPROM. Additionally, the first controller can transmit the power consumption threshold from the first storage device to the second controller via IPMI (Intelligent Platform Management Interface) commands.

[0027] Step S102: Write the power consumption threshold to the first storage device, the second storage device, and the third storage device.

[0028] Specifically, the second controller is used to obtain the power consumption threshold from the first storage device and write the power consumption threshold to the second and third storage devices.

[0029] Step S103: If the data in the second storage device and the data in the third storage device do not meet the preset conditions, the data in the second storage device and the data in the third storage device are repaired using the data in the first storage device.

[0030] Specifically, the second controller is also used to determine whether the data in the second storage device and the data in the third storage device meet preset conditions. These preset conditions include: data exists in the second and third storage devices; the data in the second and third storage devices is not corrupted, is readable, and is numerical; and the power consumption threshold in the second and third storage devices is within a set range, such as 1-4095W. If the data in the second and third storage devices does not meet the preset conditions, the second controller obtains data from the first storage device and uses this data to repair the data in the second and third storage devices. For example, it may clear the second and third storage devices and rewrite the power consumption threshold from the first storage device into the second and third storage devices.

[0031] Step S104: When the power consumption threshold in the second storage device is the same as the power consumption threshold in the third storage device, write the power consumption threshold in the second storage device or the third storage device into a preset register, and set the power consumption threshold in the preset register as the target power consumption threshold of the component to be managed.

[0032] Specifically, the third controller needs to perform data consistency verification. During system startup, it reads two power consumption thresholds from the second and third storage devices respectively, compares them, and considers the data valid only if the two thresholds are completely identical. During system startup, the third controller controls the BIOS to read the power consumption thresholds from the second and third storage devices via the eSPI (Enhanced Serial Peripheral Interface) interface. When the power consumption thresholds in the second and third storage devices are the same, the third controller writes the power consumption threshold from either the second or third storage device into a preset register, sets the power consumption threshold in the preset register as the target power consumption threshold for the managed component (e.g., the CPU's MSR register), and after verifying data consistency, writes the power consumption threshold into the CPU's MSR register. By leveraging the collaborative configuration of PpmPolicy (Processor Power Management Policy) and the MSR register, and through the combination of PpmPolicy and direct MSR register operations, the power consumption threshold in the MSR register is set to the CPU's target power consumption threshold, enabling precise control of the CPU's power consumption while ensuring compatibility with the native power management mechanism.

[0033] The component power consumption management method provided in this embodiment flashes the RAPL configuration data to each server before shipment and performs dual backup storage of the RAPL configuration data in the UFM area of ​​the CPLD in the server. Combined with CRC (Cyclic Redundancy Check) and version management, this ensures that the configuration data is not lost under abnormal conditions such as power outages or restarts. Therefore, after server power outages or restarts, there is no need to configure each server individually. Furthermore, this method designs a multi-level fault recovery strategy. When the main configuration data is corrupted, the system can automatically recover the RAPL configuration data from backup data, EEPROM default configuration, or safe mode, ensuring server availability without requiring administrator reconfiguration. This solves the problems of needing to enter the BIOS of each server to limit the power consumption of server components, resulting in low management efficiency and a lack of effective data protection mechanisms.

[0034] As an optional embodiment, after writing the power consumption threshold to the first storage device, the second storage device, and the third storage device, the method further includes: If the power consumption threshold in the second storage device is different from the power consumption threshold in the third storage device, determine whether the power consumption threshold in the second storage device and the power consumption threshold in the third storage device are within a preset range; If the power consumption threshold in the second storage device is within a preset range, the data in the third storage device is repaired using the data in the second storage device. If the power consumption threshold in the third storage device is within a preset range, the data in the second storage device is repaired using the data in the third storage device.

[0035] Specifically, if the power consumption threshold in the second storage device is different from that in the third storage device, the power consumption threshold in either the second or third storage device needs to be corrected. This involves determining whether the power consumption thresholds in the second and third storage devices are valid. For example, a preset range can be set, such as 1-4095W. If the power consumption threshold falls within this preset range, it indicates that the preset threshold is valid.

[0036] If the power consumption threshold in the second storage device is within a preset range, then the power consumption threshold in the second storage device is valid. The data in the third storage device is repaired using the data in the second storage device. For example, the third storage device is cleared, and the power consumption threshold in the second storage device is written to the corresponding location in the third storage device.

[0037] If the power consumption threshold in the third storage device is within the preset range, then the power consumption threshold in the third storage device is valid. The data in the second storage device is repaired using the data in the third storage device. For example, the second storage device is cleared, and the power consumption threshold in the third storage device is written to the corresponding location in the second storage device.

[0038] The above process is as follows Figure 2 As shown, the system reads the backup data from the complex programmable logic device (CPL) and performs a data consistency check to determine if the two sets of data are identical. If they are not identical, a single data verification is performed. The system checks if the first set of data is valid. If valid, it uses the first set of data to repair the second set of data. If invalid, it checks if the second set of data is valid. If valid, it uses the second set of data to repair the first set of data.

[0039] In this embodiment, a second and a third storage device in the user flash memory using complex programmable logic devices are used for dual backup storage. Combined with an intelligent verification algorithm, the second and third storage devices can mutually repair data, improving the reliability of configuration data and the fault tolerance of the system.

[0040] As an optional embodiment, when neither the data in the second storage device nor the data in the third storage device meets the preset conditions, the data in the second storage device and the data in the third storage device are repaired using the data in the first storage device, including: If the power consumption threshold values ​​in the second storage device and the power consumption threshold values ​​in the third storage device do not meet the preset conditions, determine whether the data in the first storage device meets the preset conditions. If the data in the first storage device meets the preset conditions, the data in the second and third storage devices is repaired using the data in the first storage device. If the data in the first storage device does not meet the preset conditions, obtain the thermal design power threshold of the component to be managed, generate a new power consumption threshold based on the thermal design power threshold and a preset ratio, and write the new power consumption threshold into the second and third storage devices.

[0041] Specifically, the fault recovery strategy in this embodiment is as follows: when one of the power consumption thresholds in the second storage device and the third storage device is damaged, the damaged data is repaired using the other intact data; when the power consumption thresholds in both the second and third storage devices are damaged, the power consumption threshold is read from the first storage device to repair the data in the second and third storage devices; if the power consumption thresholds in the first, second, and third storage devices are all damaged, 80% of the maximum TDP (thermal design power) of the managed device is used as a safety value.

[0042] Preset conditions include: data exists on both the second and third storage devices; the data on both devices is intact, readable, and numerical; and the power consumption thresholds on both devices are within a set range, such as 1-4095W. If neither the power consumption threshold on the second nor the third storage device meets the preset conditions, it means that the power consumption thresholds for both devices are unavailable, and data repair using the first storage device is required.

[0043] Determine whether the data in the first storage device meets the above preset conditions. If the data in the first storage device meets the preset conditions, use the data in the first storage device to repair the data in the second storage device and the data in the third storage device. For example, clear the data in the second storage device and the data in the third storage device, and write the power consumption threshold in the first storage device to the corresponding position in the second storage device and the third storage device.

[0044] If the data in the first storage device does not meet the preset conditions, it means that the power consumption threshold of the first storage device is also unavailable. The thermal design power (TDP) threshold of the component to be managed is obtained, for example, the maximum TDP of the CPU. A preset percentage is used, for example, 80%, 85%, or other percentages. A new power consumption threshold is generated based on the TDP threshold and the preset percentage, and this new power consumption threshold is written to the second and third storage devices. The above process is as follows: Figure 2As shown, the process involves reading default values ​​from an electrically erasable programmable read-only memory; updating the dual backup data of the complex programmable logic device using the default values; applying configuration; configuring the model's dedicated registers; and updating the display information.

[0045] In this embodiment, a multi-level fault recovery strategy is designed. When the data in the second and third storage devices is damaged, the second controller can automatically use the data in the first storage device to repair the data in the second and third storage devices, ensuring that the configuration data will not be lost in abnormal situations such as power outages and restarts, and guaranteeing the availability of the system.

[0046] As an optional embodiment, after setting the power consumption threshold in the preset register to the target power consumption threshold of the component to be managed, the method further includes: Lock the preset register and start the interface locking function, which is used to abort the first configuration operation on the preset register; Hide the first configuration option corresponding to the preset register and lock the second configuration option corresponding to the preset register; Obtain first operation information for the first configuration operation and second operation information for the second configuration operation on the target power consumption threshold, and generate audit logs based on the first operation information and the second operation information.

[0047] Specifically, the locking process is initiated after the power consumption threshold of the managed component is detected to be set to the target power consumption threshold.

[0048] After the locking process begins, the hardware-level locking unit locks the preset register and initiates an interface locking function. This interface locking function may include, for example, a function to enable TPMI (Thermal and Power Management Interface) lock protection. The interface locking function is used to abort the first configuration operation on the preset register, preventing the target power consumption threshold from being modified at the hardware level. Figure 6 As shown, the hardware layer locking unit is used to perform hardware layer locking, including register locking and thermal management and power management interface locking.

[0049] After the locking process is initiated, the software-layer locking unit hides the first configuration option corresponding to the preset register and locks the second configuration option corresponding to the preset register. Examples of the first configuration option include: Package PL1 Power Limit and Package PL2 Power Limit. Examples of the second configuration option include: the RAPL Lock option under the RAPL configuration page. The software-layer locking unit prevents accidental user operations at the software level by hiding configuration options and controlling access. Figure 6As shown, the software layer locking unit is used to perform software layer locking, including hiding configuration options, setting read-only permissions, and disabling operating system interfaces.

[0050] After the locking process is initiated, the monitoring unit acquires the first operation information of the first configuration operation and the second operation information of the second configuration operation on the target power consumption threshold, and generates an audit log based on the first and second operation information. The monitoring unit implements a complete audit log and anomaly monitoring mechanism, ensuring the effectiveness of the security policy by generating audit logs. Figure 6 As shown, the monitoring unit is used for monitoring layer protection, including audit log recording, anomaly detection, and alarm mechanisms.

[0051] In this embodiment, a multi-layer security locking mechanism is designed, from the preset registers at the hardware layer to the configuration options at the software layer. This not only ensures the security of the configuration but also provides a flexible management method, thus solving the problem of insufficient security in traditional solutions.

[0052] As an optional embodiment, locking a preset register and initiating an interface locking function includes: Get the current value of the preset register; Perform a bitwise OR operation between the current value and the preset lock bit mask to obtain the target value. The lock bit of the target value is the preset value, and the lock bit is used to lock the preset register. Write the target value to the preset register; The interface locking function is started. If the interface locking function fails to start, an alarm message is generated.

[0053] Specifically, the preset registers include: Package RAPL Limit MSR (0x610) register, PP0 RAPLLimit MSR (0x638) register, and DRAM RAPL Limit MSR (0x618) register.

[0054] A preset lock bitmask, such as the lock bit (LIMIT_LOCK_BIT) of the RAPL Limit register, is used as a bitmask, typically bit 63. This preset lock bitmask is set to 1. The current value of the preset register is then bitwise ORed with the preset lock bitmask to obtain the target value. In this target value, the lock bit is modified to 1, indicating that the hardware locking function of that register is to be enabled.

[0055] Write the target value to a preset register. For example, write the target value (with the lock bit set) back to the MSR 0x610 register. This register will become read-only, and any subsequent attempts to modify it will be ignored.

[0056] The interface locking function is started. If the interface locking function fails to start, an alarm message is generated. For example, the interface locking function is the EnableTpmiRaplLock function.

[0057] In this embodiment, by locking a preset register and activating an interface locking function, the power consumption threshold is prevented from being modified at the hardware level.

[0058] As an optional embodiment, the first configuration option corresponding to the preset register is hidden, and the second configuration option corresponding to the preset register is locked, including: Obtain the interface resource corresponding to the preset register, and obtain the first identifier of the first configuration option and the second identifier of the second configuration option from the interface resource; Call the first preset interface, and hide the first configuration option based on the first preset interface and the first identifier; Call the second preset interface, set the second configuration option to the preset value according to the second preset interface and the second identifier, and lock the second configuration option.

[0059] Specifically, the interface resources corresponding to the preset registers are obtained. These interface resources include all interfaces that can configure the preset registers and contain preset register information. The first identifier of the first configuration option and the second identifier of the second configuration option are then obtained from the interface resources.

[0060] Calling the first preset interface, for example: calling an Application Programming Interface (API) to dynamically update the state of the first configuration option and hide the first configuration option.

[0061] Calling a second preset interface, for example: calling an application programming interface to dynamically update the state of the second configuration option, setting the second configuration option to a preset value and locking the second configuration option, or graying out the second configuration option to make it unmodifiable on the interface (read-only state).

[0062] In this embodiment, a software locking strategy is designed to prevent user error and avoid modification of power consumption thresholds by hiding the first configuration option and locking the second configuration option at the software level. A multi-layered security locking mechanism from hardware to software is designed, ensuring configuration security while providing a flexible management approach, thus solving the security deficiencies of traditional solutions.

[0063] As an optional embodiment, first operation information of a first configuration operation and second operation information of a second configuration operation on a target power consumption threshold are obtained, and an audit log is generated based on the first and second operation information, including: Based on preset fields, obtain target field information from the first operation information and the second operation information; Generate the timestamp corresponding to the target field information; Generate audit logs based on the target field information and timestamp; Generate a log index corresponding to the audit log, and write the audit log and log index to the preset storage area.

[0064] Specifically, the preset fields include: Timestamp (operation timestamp), OperationType (operation type), SourceId (operation source ID), OldValue (value before modification), NewValue (value after modification), and ResultCode (operation result code). The values ​​corresponding to these preset fields are retrieved from the first and second operation information and used as the target field information.

[0065] Generate timestamps corresponding to the target field information. For example, call the GetCurrentTimestamp function to obtain the current system time and use the current system time as the timestamp for the target field information. Generate logs containing all target field information and timestamps as audit logs.

[0066] Generate a log index corresponding to the audit log. For example, declare a static 32-bit unsigned integer RecordIndex and initialize it to 0. Use RecordIndex to record how many audit records have been written so far, and use it as a log index or record number.

[0067] A preset storage area is defined, such as the NVRAM audit log area. The audit logs and log indexes are then written to the preset storage area.

[0068] In this embodiment, a complete audit log and anomaly monitoring mechanism is designed. By monitoring the first operation information and the second operation information, an audit log is generated. Operation-related data is recorded in the audit log, and fault alarms are issued to ensure the effectiveness of the security policy.

[0069] As an optional embodiment, after setting the power consumption threshold in the preset register to the target power consumption threshold of the component to be managed, the method further includes: Create a character array of a preset length; Obtain the component model and performance level of the component to be managed; Write the component model, performance level, and target power consumption threshold into a character array; In the character array, obtain the performance level and target power consumption threshold; determine whether the performance level is greater than the preset threshold, and determine whether the target power consumption threshold is within the preset range; If the performance level is greater than the preset threshold and the target power consumption threshold is within the preset range, the information to be displayed is generated based on the component model, performance level and target power consumption threshold in the character array. If the performance level is less than or equal to a preset threshold and the target power consumption threshold is within a preset range, generate the information to be displayed based on the component model and the target power consumption threshold in the character array. If the performance level is less than or equal to the preset threshold and the target power consumption threshold is not within the preset range, generate the information to be displayed based on the component model in the character array. Display the information to be displayed on the preset interface.

[0070] Specifically, the preset length is, for example, 64 bytes, 128 bytes, or other lengths. A character array (BaseBrand) of the preset length is created.

[0071] Obtain the component model and performance level (SstLevel) of the component to be managed. Component model is, for example, CPU M, GPU N, etc. Performance level is, for example, Level 1, Level 2, Level 3, or others. The higher the performance level, the stronger the device's performance.

[0072] Write the component model, performance level, and target power consumption threshold into a character array. Generate the information to be displayed based on the data in the character array. For example, concatenate the component model, performance level, and target power consumption threshold from the character array to form the information to be displayed; or concatenate the component model and target power consumption threshold from the character array to form the information to be displayed.

[0073] Specifically, this embodiment sets basic rules for generating information to be displayed, including rule 1, the information to be displayed only contains the component model; rule 2, the information to be displayed contains the component model + performance level; rule 3, the information to be displayed contains the component model + target power consumption threshold; and rule 4, the information to be displayed contains the component model + performance level + target power consumption threshold.

[0074] Preset threshold, for example: Level 0. Preset range, for example: 1-4095W. If the performance level is greater than the preset threshold and the target power consumption threshold is within the preset range, the information to be displayed will be component model + performance level + target power consumption threshold. If the performance level is less than or equal to the preset threshold and the target power consumption threshold is within the preset range, the information to be displayed will be component model + target power consumption threshold. If the performance level is less than or equal to the preset threshold and the target power consumption threshold is not within the preset range, the information to be displayed will be component model.

[0075] Preset interfaces include: Early VGA interface, POST self-test interface, BIOS Setup interface, etc. Each preset interface displays the same information to be displayed.

[0076] In this embodiment, performance level and target power consumption threshold are dynamically embedded in the component model string, realizing end-to-end visual management from BIOS to operating system. The system supports unified display and updates of multiple interfaces, making it easy for maintenance personnel to quickly understand the current power consumption configuration status of the components to be managed.

[0077] As an optional embodiment, after setting the power consumption threshold in the preset register to the target power consumption threshold of the component to be managed, the method further includes: Obtain the occupancy rate of a preset number of components in the parts to be managed, and determine the average occupancy rate; Components are classified according to average occupancy rate, occupancy rate, and preset threshold to obtain idle components, first-class components, and second-class components. Idle components are those with an occupancy rate less than or equal to the preset threshold, first-class components are those with an occupancy rate greater than the preset threshold but less than the average occupancy rate, and second-class components are those with an occupancy rate greater than or equal to the average occupancy rate. If the first current power consumption of the managed component is greater than the target power consumption threshold, the idle component is downclocked and the second current power consumption is obtained. If the second current power consumption is greater than the target power consumption threshold, the frequency of the first type of component is reduced, and the third current power consumption of the component to be managed is obtained. If the current power consumption is greater than the target power consumption threshold, the second type of component is frequency-reduced until the power consumption of the managed component is less than or equal to the target power consumption threshold.

[0078] Specifically, the component to be managed is, for example, a CPU. There is a preset number of components within the component to be managed; for example, a component is a CPU core, and a 24-core CPU has 24 cores, which is 24 components. The preset number indicates multiple components; no specific limit is imposed here. The utilization rate of each component in the component to be managed is obtained, and the average utilization rate is calculated.

[0079] Preset thresholds include, for example, 1%, 2%, or other smaller values. Taking an average occupancy rate of 50% and a preset threshold of 1% as an example, components are categorized based on the average occupancy rate, the occupancy rate, and the preset threshold, resulting in idle components, Category 1 components, and Category 2 components. Idle components are those with an occupancy rate less than 1%, Category 1 components are those with an occupancy rate between 1% and 50%, and Category 2 components are those with an occupancy rate greater than 50%.

[0080] A higher utilization rate indicates that the component is performing more business operations. Reducing the frequency of components with high utilization rates would impact business operations. Therefore, if the current power consumption of the managed component exceeds the target power consumption threshold, the frequency of idle components is reduced first, then the frequency of the first type of components is reduced, and finally the frequency of the second type of components is reduced. Specifically, if the first current power consumption of the managed component exceeds the target power consumption threshold, the frequency of idle components is reduced; if the second current power consumption exceeds the target power consumption threshold, the frequency of the first type of components is reduced; if the third current power consumption exceeds the target power consumption threshold, the frequency of idle components is reduced, until the power consumption of the managed component is less than or equal to the target power consumption threshold. The frequency reduction can be performed according to a pre-set ratio, for example, reducing the current frequency by 5% each time.

[0081] In this embodiment, the components in the managed device are classified according to their occupancy rate, resulting in idle components, first-class components, and second-class components. If the power consumption of the managed device exceeds the target power consumption threshold, the frequency of the idle components is reduced first, then the frequency of the first-class components is reduced, and finally the frequency of the second-class components is reduced. This reduces the power consumption of the managed device while ensuring the normal operation of its services.

[0082] As an optional embodiment, before step S101 "determine the power consumption threshold according to the component configuration command", it is necessary to determine a suitable power consumption threshold in order to generate a component configuration command and send it to the first controller. If the component to be managed is a CPU, the process of determining a suitable power consumption threshold may include steps A1 to A3.

[0083] Step A1: Obtain the maximum clock frequency that the CPU can support, as well as the safe power consumption threshold and safe heat dissipation parameter threshold of the CPU.

[0084] Specifically, the maximum clock frequency that the CPU can support is obtained, along with parameter information for predetermined safety parameters such as the CPU's safe power consumption threshold and safe heat dissipation parameter threshold, providing the necessary safety reference information for optimizing CPU power consumption limits.

[0085] Step A2: While ensuring that the CPU's heat dissipation parameters are not lower than the safe heat dissipation parameter threshold, gradually increase the CPU's clock frequency until the CPU's clock frequency reaches the maximum clock frequency or the CPU's power consumption reaches the safe power consumption threshold, at which point stop increasing the voltage.

[0086] Specifically, when optimizing the CPU power consumption limit corresponding to the maximum turbo frequency of the CPU, it is necessary to first check whether the current heat dissipation parameter value of the CPU is lower than the safe heat dissipation parameter threshold. If it is lower, then for safety reasons, the CPU power consumption limit will no longer be optimized. Conversely, if it is not lower than the safe heat dissipation parameter threshold, then this embodiment will obtain the optimal CPU power consumption limit by continuously increasing the pressure on the CPU.

[0087] If the CPU's current thermal parameters are not lower than the safe thermal threshold, the CPU clock frequency can be gradually increased by gradually increasing the CPU voltage. As the CPU clock frequency is gradually increased by continuously increasing the CPU voltage, the CPU power consumption will also gradually increase accordingly. This embodiment uses this method to dynamically test the optimal limit that the CPU power consumption can reach.

[0088] The optimal CPU power consumption limit needs to be able to support the CPU turbo boost to higher frequencies, and it should not exceed the CPU's safe power consumption threshold. Therefore, when the CPU clock frequency reaches the maximum clock frequency, or the CPU power consumption value reaches the safe power consumption threshold, the voltage will be stopped. Since the CPU power consumption value corresponding to the cessation of voltage increase is either able to support the CPU to reach its maximum clock frequency, or has reached the CPU's safe power consumption threshold (further voltage increase would cause the CPU to operate under unsafe power conditions), the CPU power consumption value at this time is considered to be the appropriate power consumption threshold.

[0089] Step A3: Obtain the CPU power consumption value when the voltage is stopped, and use the CPU power consumption value when the voltage is stopped as an appropriate power consumption threshold.

[0090] Specifically, by using the CPU power consumption value at which voltage increase stops as a suitable power consumption threshold, the CPU power consumption limit corresponding to the maximum turbo frequency is optimized. Subsequently, based on this suitable power consumption threshold, not only can the CPU turbo boost to higher frequencies be supported, but the CPU can also operate under safe power consumption conditions.

[0091] In this embodiment, by combining the maximum clock frequency, the safe power consumption threshold, and the safe heat dissipation parameter threshold, a suitable power consumption threshold can be easily determined. Furthermore, the parameter information of the CPU's predetermined safety parameters is taken into account, thereby effectively preventing the CPU from operating in an unsafe condition and ensuring the safety of the CPU.

[0092] According to an embodiment of this application, a component power consumption management system is provided, such as... Figure 3 As shown, the system includes: a first controller, a first storage device, a second controller, a second storage device, a third storage device, and a third controller; The first controller is configured to determine a power consumption threshold based on a component configuration command upon receiving a component configuration command, and write the power consumption threshold into a first storage device. The second controller is used to obtain the power consumption threshold from the first storage device and write the power consumption threshold to the second storage device and the third storage device. The second controller is also used to repair the data in the second storage device and the data in the third storage device using the data in the first storage device when neither the data in the second storage device nor the data in the third storage device meets the preset conditions. The third controller is used to write the power consumption threshold in the second storage device or the third storage device into a preset register when the power consumption threshold in the second storage device is the same as the power consumption threshold in the third storage device, and set the power consumption threshold in the preset register as the target power consumption threshold of the component to be managed.

[0093] Specifically, such as Figure 3 As shown, the system includes: a first controller, a first storage device, a second controller, a second storage device, a third storage device, and a third controller. The first controller is, for example, a board management controller. The second controller is, for example, a complex programmable logic device (CPL). The third controller is a component for operating a basic input / output system. The first storage device is, for example, an electrically erasable programmable read-only memory (EEPROM). The first and second storage devices can be different registers in the user flash memory; for example, the first storage device can be registers 0x01-0x02 in the user flash memory, and the second storage device can be registers 0x03-0x04 in the user flash memory.

[0094] like Figure 3As shown, when the management terminal performs network management operations, it issues component configuration commands to the first controller to configure the target power consumption threshold for the component to be managed. For example, a data center needs to configure processor M, requiring the CPU to be configured in a 24-core operating mode with a power consumption limit of 165W. The component to be managed is processor M, with a power consumption threshold of 165W. Since the original SST-PP (Speed ​​Select Technology - Performance Profile) configuration of processor M only corresponds to 16 cores at 165W, it cannot meet the business requirements. Therefore, the component power consumption management system is used to configure the target power consumption threshold for processor M. The administrator issues component configuration commands, such as RAPL configuration commands, to the first controller through the network management interface on the management terminal. A dual-backup data storage mechanism is created using the second and third storage devices. In this dual-backup data storage mechanism, to ensure the reliability of the configuration data, each RAPL configuration value is set to use 16 bits for storage, occupying 2 bytes.

[0095] Upon receiving a component configuration command, the first controller determines a power consumption threshold based on the command and writes the threshold to the first storage device. For example, the BMC writes a configuration value of 165W (0x00A5, the hexadecimal representation of 165) to a designated area of ​​the motherboard's EEPROM. Additionally, the first controller can transmit the power consumption threshold from the first storage device to the second controller via IPMI (Intelligent Platform Management Interface) commands. Figure 4 As shown, the first controller sends an intelligent platform management interface command to the second controller.

[0096] The second controller is used to obtain the power consumption threshold from the first storage device and write the power consumption threshold to the second and third storage devices.

[0097] The second controller is also used to determine whether the data in the second and third storage devices meet preset conditions. These preset conditions include: data exists in both storage devices; the data in both storage devices is not corrupted, is readable, and is numerical; and the power consumption threshold in both storage devices is within a set range, such as 1-4095W. If neither the data in the second nor the third storage device meets the preset conditions, the second controller retrieves data from the first storage device and uses this data to repair the data in the second and third storage devices. For example, it might clear the second and third storage devices and rewrite the power consumption threshold from the first storage device into both storage devices. Figure 3As shown, the second controller can read and write to the second and third storage devices to perform data verification, fault recovery, and intelligent retry operations.

[0098] The third controller needs to perform data consistency verification. During system startup, it reads two power threshold values ​​from the second and third storage devices respectively, compares them, and considers the data valid only if the two power threshold values ​​are completely identical. During system startup, the third controller controls the BIOS to read the power threshold values ​​from the second and third storage devices via the eSPI (Enhanced Serial Peripheral Interface) interface. When the power threshold values ​​in the second and third storage devices are the same, the third controller writes the power threshold value from either the second or third storage device into a preset register, setting the power threshold value in the preset register as the target power threshold value for the managed component. For example, if the preset register is the CPU's MSR register, after verifying data consistency, the power threshold value is written into the CPU's MSR register. By utilizing the coordinated configuration of PpmPolicy (Processor Power Management Policy) and the MSR register, and through a combination of PpmPolicy and direct MSR register operations, the power threshold value in the MSR register is set as the CPU's target power threshold, enabling precise control of the CPU's power consumption while ensuring compatibility with the native power management mechanism. like Figure 3 As shown, the third controller writes the power consumption threshold into a preset register, and configures the power consumption limit of the managed component through the register.

[0099] Based on the above, it can be seen that the data flow of the component power management system in this embodiment is as follows: Figure 4 As shown, in order, they are electrically erasable programmable read-only memory, user flash memory, basic input / output system readout, and model dedicated register.

[0100] The component power consumption management system provided in this embodiment involves a first controller writing a power consumption threshold to a first storage device; a second controller writing the power consumption threshold to a second and a third storage device; if the data in both the second and third storage devices does not meet preset conditions, the second controller uses the data in the first storage device to repair the data in both storage devices; when the power consumption threshold values ​​in the second and third storage devices are the same, the third controller writes the power consumption threshold to a preset register and sets it as the target power consumption threshold for the component to be managed. This system uses component configuration commands to instruct the three controllers to configure the power consumption of components, eliminating the need for configuration on each server individually. The use of the second and third storage devices achieves dual backup storage, and when data does not meet preset conditions, the first storage device is used for repair, ensuring that data is not lost or corrupted, thus improving the reliability of configuration data and the system's fault tolerance. This solves the problems of needing to enter the BIOS of each server to limit the power consumption of server components, resulting in low management efficiency and a lack of effective data protection mechanisms.

[0101] As an optional embodiment, the third controller includes: a hardware layer locking unit, a software layer locking unit, and a monitoring unit; The third controller is used to initiate a locking process when the power consumption threshold of the managed component is detected to be the target power consumption threshold. The hardware layer locking unit is used to lock the preset register and start the interface locking function after the locking process is started. The interface locking function is used to abort the first configuration operation on the preset register. The software layer locking unit is used to hide the first configuration option corresponding to the preset register and lock the second configuration option corresponding to the preset register after the locking process is started. The monitoring unit is used to obtain the first operation information of the first configuration operation and the second operation information of the second configuration operation on the target power consumption threshold after the locking process is started, and to generate an audit log based on the first operation information and the second operation information.

[0102] Specifically, this embodiment implements a multi-layered security locking mechanism from hardware to software, ensuring that once the power consumption threshold in the preset register is set to the target power consumption threshold of the managed component, the target power consumption threshold cannot be accidentally or maliciously modified, thus guaranteeing the consistency and reliability of system power consumption management. The multi-layered security locking mechanism includes a security locking process, such as... Figure 5 As shown, the security locking process includes hardware locking, software locking, and auditing and monitoring.

[0103] The explanation will take the third controller as an example, which is used to run the basic input / output system. Figure 6As shown, the basic input / output system performs a detection operation to determine whether a valid power threshold configuration value is read from the CPLD, i.e., whether the power threshold of the managed component is set to the target power threshold. If no power threshold configuration is detected, the locking process is skipped. If a power threshold configuration is detected, the power threshold of the managed component is set to the target power threshold, and the locking process is initiated.

[0104] After the locking process begins, the hardware-level locking unit locks the preset register and initiates the interface locking function. The interface locking function is used to abort the first configuration operation on the preset register, preventing the target power consumption threshold from being modified at the hardware level. For example... Figure 6 As shown, the hardware layer locking unit is used to perform hardware layer locking, including register locking and thermal management and power management interface locking, and disabling the operating system interface.

[0105] After the locking process is initiated, the software-layer locking unit hides the first configuration option corresponding to the preset register and locks the second configuration option corresponding to the preset register. Examples of the first configuration option include: Package PL1 Power Limit and Package PL2 Power Limit. Examples of the second configuration option include: the RAPL Lock option under the RAPL configuration page. The software-layer locking unit prevents accidental user operations at the software level by hiding configuration options and controlling access. Figure 6 As shown, the software layer locking unit is used to perform software layer locking, including hiding configuration options and setting read-only permissions.

[0106] After the locking process is initiated, the monitoring unit acquires the first operation information of the first configuration operation and the second operation information of the second configuration operation on the target power consumption threshold, and generates an audit log based on the first and second operation information. The monitoring unit implements a complete audit log and anomaly monitoring mechanism, ensuring the effectiveness of the security policy by generating audit logs. Figure 6 As shown, the monitoring unit is used for monitoring layer protection, including audit log recording, anomaly detection, and alarm mechanisms.

[0107] In this embodiment, a multi-layered security locking mechanism is designed, extending from the preset registers at the hardware layer to the configuration options at the software layer. This multi-layered security locking mechanism locks the configuration options, ensuring that the RAPL configuration cannot be illegally or maliciously modified once set, thus guaranteeing the consistency and reliability of system power management. It not only ensures configuration security but also provides a flexible management method, solving the security deficiencies of traditional solutions.

[0108] This embodiment also provides a component power management device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, hardware implementations, or a combination of software and hardware, are also possible and contemplated.

[0109] This embodiment provides a component power consumption management device, such as... Figure 7 As shown, it includes: The threshold determination module 701 is used to determine the power consumption threshold according to the component configuration command when a component configuration command is received. The data writing module 702 is used to write the power consumption threshold to the first storage device, the second storage device, and the third storage device; The data repair module 703 is used to repair the data in the second storage device and the data in the third storage device using the data in the first storage device when neither the data in the second storage device nor the data in the third storage device meets the preset conditions. The power consumption threshold setting module 704 is used to write the power consumption threshold in the second storage device or the third storage device into a preset register when the power consumption threshold in the second storage device is the same as the power consumption threshold in the third storage device, and set the power consumption threshold in the preset register as the target power consumption threshold of the component to be managed.

[0110] Further functional descriptions of the above modules are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0111] In this embodiment, the component power management device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0112] This application also provides a computer device having the above-described features. Figure 7 The component shown is a power management device.

[0113] Please see Figure 8 , Figure 8 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of this application, such as... Figure 8As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 8 Take a processor 10 as an example.

[0114] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include an integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field-programmable gate array (FPGA), a general-purpose array logic (GPA), or any combination thereof.

[0115] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.

[0116] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0117] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0118] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.

[0119] This application also provides a computer-readable storage medium. The methods described in this application can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code downloaded over a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and subsequently stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the methods shown in the above embodiments are implemented.

[0120] A portion of this application can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to this application through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0121] Although embodiments of this application have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of this application, and such modifications and variations all fall within the scope defined by this application.

Claims

1. A component power consumption management method, characterized in that, The method includes: Upon receiving a component configuration command, a power consumption threshold is determined based on the component configuration command; The power consumption threshold is written to the first storage device, the second storage device, and the third storage device; If neither the data in the second storage device nor the data in the third storage device meets the preset conditions, the data in the second storage device and the data in the third storage device are repaired using the data in the first storage device; When the power consumption threshold in the second storage device is the same as the power consumption threshold in the third storage device, the power consumption threshold in the second storage device or the third storage device is written into a preset register, and the power consumption threshold in the preset register is set as the target power consumption threshold of the component to be managed.

2. The method according to claim 1, characterized in that, After writing the power consumption threshold to the first storage device, the second storage device, and the third storage device, the method further includes: If the power consumption threshold in the second storage device is different from the power consumption threshold in the third storage device, determine whether the power consumption threshold in the second storage device and the power consumption threshold in the third storage device are within a preset range; If the power consumption threshold in the second storage device is within the preset range, the data in the third storage device is repaired using the data in the second storage device. If the power consumption threshold in the third storage device is within the preset range, the data in the second storage device is repaired using the data in the third storage device.

3. The method according to claim 1, characterized in that, When neither the data in the second storage device nor the data in the third storage device meets the preset conditions, the data in the second storage device and the data in the third storage device are repaired using the data in the first storage device, including: If neither the power consumption threshold in the second storage device nor the power consumption threshold in the third storage device meets the preset condition, determine whether the data in the first storage device meets the preset condition. If the data in the first storage device meets the preset conditions, the data in the second storage device and the data in the third storage device are repaired using the data in the first storage device. If the data in the first storage device does not meet the preset conditions, the thermal design power threshold of the component to be managed is obtained, a new power consumption threshold is generated according to the thermal design power threshold and a preset ratio, and the new power consumption threshold is written to the second storage device and the third storage device.

4. The method according to claim 1, characterized in that, After setting the power consumption threshold in the preset register to the target power consumption threshold of the component to be managed, the method further includes: Lock the preset register and start the interface locking function, wherein the interface locking function is used to abort the first configuration operation on the preset register; Hide the first configuration option corresponding to the preset register and lock the second configuration option corresponding to the preset register; Obtain first operation information of the first configuration operation and second operation information of the second configuration operation of the target power consumption threshold, and generate audit logs based on the first operation information and the second operation information.

5. The method according to claim 4, characterized in that, The step of locking the preset register and activating the interface locking function includes: Obtain the current value of the preset register; The current value is bitwise ORed with a preset lock bit mask to obtain a target value, wherein the lock bit of the target value is a preset value and the lock bit is used to lock the preset register; Write the target value into the preset register; The interface locking function is started. If the interface locking function fails to start, an alarm message is generated.

6. The method according to claim 4, characterized in that, The step of hiding the first configuration option corresponding to the preset register and locking the second configuration option corresponding to the preset register includes: Obtain the interface resource corresponding to the preset register, and obtain the first identifier of the first configuration option and the second identifier of the second configuration option from the interface resource; Call the first preset interface, and hide the first configuration option based on the first preset interface and the first identifier; Call the second preset interface, set the second configuration option to a preset value according to the second preset interface and the second identifier, and lock the second configuration option.

7. The method according to claim 4, characterized in that, The step of obtaining first operation information of the first configuration operation and second operation information of the second configuration operation on the target power consumption threshold, and generating audit logs based on the first operation information and the second operation information, includes: Based on preset fields, obtain target field information from the first operation information and the second operation information; Generate the timestamp corresponding to the target field information; The audit log is generated based on the target field information and the timestamp; Generate a log index corresponding to the audit log, and write the audit log and the log index into a preset storage area.

8. The method according to claim 1, characterized in that, After setting the power consumption threshold in the preset register to the target power consumption threshold of the component to be managed, the method further includes: Create a character array of a preset length; Obtain the component model and performance level of the component to be managed; Write the component model, the performance level, and the target power consumption threshold into the character array; From the character array, obtain the performance level and the target power consumption threshold; Determine whether the performance level is greater than a preset threshold, and determine whether the target power consumption threshold is within a preset range; If the performance level is greater than the preset threshold and the target power consumption threshold is within the preset range, information to be displayed is generated based on the component model, the performance level, and the target power consumption threshold in the character array. If the performance level is less than or equal to the preset threshold and the target power consumption threshold is within the preset range, the information to be displayed is generated based on the component model in the character array and the target power consumption threshold. If the performance level is less than or equal to the preset threshold, and the target power consumption threshold is not within the preset range, the information to be displayed is generated according to the component model in the character array. The information to be displayed is shown on the preset interface.

9. The method according to claim 1, characterized in that, After setting the power consumption threshold in the preset register to the target power consumption threshold of the component to be managed, the method further includes: Obtain the occupancy rate of a preset number of components in the managed components, and determine the average occupancy rate of the occupancy rate; The components are classified according to the average occupancy rate, the occupancy rate, and a preset threshold to obtain idle components, first-class components, and second-class components. The idle components are those with an occupancy rate less than or equal to the preset threshold, the first-class components are those with an occupancy rate greater than the preset threshold and less than the average occupancy rate, and the second-class components are those with an occupancy rate greater than or equal to the average occupancy rate. If the first current power consumption of the managed component is greater than the target power consumption threshold, the idle component is frequency-reduced, and the second current power consumption is obtained. If the second current power consumption is greater than the target power consumption threshold, the first type of component is frequency-reduced, and the third current power consumption of the component to be managed is obtained. If the third current power consumption is greater than the target power consumption threshold, the second type of component is frequency-reduced until the power consumption of the managed component is less than or equal to the target power consumption threshold.

10. A computer device, characterized in that, include: A memory and a processor are interconnected, the memory stores computer instructions, and the processor executes the computer instructions to perform the component power management method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Device and method for promoting disaster resumption

    CN101127000A

  • Apparatus and method to reconfigure a storage array

    CN101322105A

  • On-chip power consumption management method, electronic equipment and storage medium

    CN113886196A

  • Server power consumption management and control method and system and storage medium

    CN114880192A

  • Power source consumption management apparatus for four-way server

    US20240220385A1