Component power consumption management method and computer device

The component power management system, which works in concert with BMC, CPLD and BIOS, achieves dual backup storage and multi-layer security locking, solving the problem of low power management efficiency in large-scale server deployments and ensuring data reliability and security.

CN120973639BActive Publication Date: 2025-12-16INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511519726.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-23
Publication Date
2025-12-16
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, lack effective data protection mechanisms, are complex to configure, are easily modified by accident, and cannot achieve centralized management.

Method used

The component power management system employs BMC, CPLD, and BIOS working in tandem. It uses the CPLD's UFM area for dual backup storage and combines intelligent verification algorithms to implement a multi-layer security locking mechanism from the hardware MSR register to the software interface, ensuring the reliability and security of configuration data.

Benefits of technology

It improves the efficiency of component power consumption management and data protection capabilities, ensures that configuration data is not lost in abnormal situations, provides a flexible management method, and solves the problem of insufficient security in traditional solutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120973639B_ABST
    Figure CN120973639B_ABST
Patent Text Reader

Abstract

The application discloses a component power consumption management method and computer equipment, and relates to the technical field of data centers.The method writes a power consumption threshold into a first storage device, a second storage device and a third storage device; data in the first storage device can be used to repair data in other storage devices; when the power consumption thresholds of the second storage device and the third storage device are the same, the power consumption threshold is set as a target power consumption threshold of a component to be managed. The method can solve the problems that it is necessary to enter the BIOS of each server to limit the power consumption of components of the server, the management efficiency is low, and there is a lack of an effective data protection mechanism. The system uses a component configuration command to instruct three controllers to realize power consumption configuration of components, and configuration is not needed for servers one by one. Double backup storage is realized by using the second storage device and the third storage device, and when data is problematic, the first storage device is used for repair, so that data loss or damage is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data centers, and particularly relates to a component power consumption management method and computer equipment. BACKGROUND

[0002] In the process of power consumption management of a server, various components in the server need to be managed in terms of power consumption. For example, in order to meet the requirements of different application scenarios, a CPU (Central Processing Unit) usually needs to find a balance point between performance and power consumption.

[0003] Currently, power consumption management of components mainly relies on RAPL (Runtime Average Power Limit) technology. RAPL technology, as a hardware-level power consumption limiting mechanism, can dynamically control the upper limit of power consumption of a CPU at runtime. However, the existing RAPL configuration mode mainly limits the power consumption of components through a BIOS (Basic Input Output System) Setup interface or an operating system tool, which has problems such as complex configuration operation, easy accidental modification of configuration parameters, and inability to realize centralized management. In particular, in a large-scale server deployment scenario, an administrator needs to configure and manage the power consumption of components in thousands of servers one by one, which is low in management efficiency.

[0004] Therefore, the related art has the problem of low management efficiency and lack of effective data protection mechanism for limiting the power consumption of components of a server by entering the BIOS of each server. SUMMARY

[0005] Therefore, the present application provides a component power consumption management method and computer equipment to solve the problem of low management efficiency and lack of effective data protection mechanism for limiting the power consumption of components of a server by entering the BIOS of each server.

[0006] In a first aspect, the present application provides a component power consumption management method, which comprises:

[0007] In the case of receiving a component configuration command, determining a power consumption threshold according to the component configuration command;

[0008] writing the power consumption threshold into a first storage device, a second storage device and a third storage device;

[0009] In the case that the data in the second storage device and the data in the third storage device do not satisfy a preset condition, repairing the data in the second storage device and the data in the third storage device by using the data in the first storage device;

[0010] 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 the 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.

[0011] In a second aspect, the present application provides a component power consumption management system, which comprises a first controller, a first storage device, a second controller, a second storage device, a third storage device, and a third controller.

[0012] The first controller is configured to, when a component configuration command is received, determine a power consumption threshold according to the component configuration command, and write the power consumption threshold into the first storage device.

[0013] The second controller is configured to obtain the power consumption threshold from the first storage device, and write the power consumption threshold into the second storage device and the third storage device.

[0014] The second controller is further configured to, when neither the data in the second storage device nor the data in the third storage device satisfies a preset condition, repair the data in the second storage device and the data in the third storage device by using the data in the first storage device.

[0015] The third controller is configured to, 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.

[0016] In a third aspect, the present application provides a component power consumption management apparatus, which comprises:

[0017] The threshold determination module is configured to, when a component configuration command is received, determine a power consumption threshold according to the component configuration command.

[0018] The data writing module is configured to write the power consumption threshold into the first storage device, the second storage device, and the third storage device.

[0019] The data repair module is configured to, when neither the data in the second storage device nor the data in the third storage device satisfies a preset condition, repair the data in the second storage device and the data in the third storage device by using the data in the first storage device.

[0020] The power consumption threshold setting module is configured to, 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.

[0021] In a fourth aspect, the present application provides a computer device, comprising a memory and a processor, the memory and the processor being communicatively connected with each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the component power consumption management method of the first aspect or any of the corresponding embodiments thereof.

[0022] In a fifth aspect, the present application provides a computer readable storage medium, storing computer instructions for causing a computer to perform the component power consumption management method of the first aspect or any of the corresponding embodiments thereof.

[0023] In a sixth aspect, the present application provides a computer program product, comprising computer instructions for causing a computer to perform the component power consumption management method of the first aspect or any of the corresponding embodiments thereof.

[0024] According to the present application, the first controller writes the power consumption threshold into the first storage device, the second controller writes the power consumption threshold into the second storage device and the third storage device, the second controller repairs the data in the second storage device and the third storage device by using the data in the first storage device if the data in the second storage device and the third storage device do not meet the preset condition, and the third controller writes the power consumption threshold into the preset register and sets it as the target power consumption threshold of the component to be managed when the power consumption threshold values in the second storage device and the third storage device are the same. The problem that the power consumption of the components of the server needs to be limited by entering the BIOS of each server, the management efficiency is low, and the effective data protection mechanism is lacking can be solved. The method uses the component configuration command to instruct the three controllers to implement the power consumption configuration of the components, and does not need to configure each server. The second storage device and the third storage device are used to implement double backup storage, and the first storage device is used for repair when the data does not meet the preset condition, so that the data is ensured not to be lost or damaged, and the reliability of the configuration data and the fault tolerance of the system are improved. BRIEF DESCRIPTION OF DRAWINGS

[0025] In order to more clearly illustrate the technical solutions in the specific embodiments or the related art, the following will briefly introduce the drawings needed to be used in the specific embodiments or the related art description. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.

[0026] Figure 1 is a flowchart of the component power consumption management method according to the embodiments of the present application;

[0027] Figure 2is a flow chart of a multi-level failure recovery strategy according to an embodiment of the present application;

[0028] Figure 3 is a structural schematic diagram of a component power consumption management system according to an embodiment of the present application;

[0029] Figure 4 is a schematic diagram of data flow according to an embodiment of the present application;

[0030] Figure 5 is a schematic diagram of a secure lock procedure according to an embodiment of the present application;

[0031] Figure 6 is a schematic diagram of a multi-layer lock architecture according to an embodiment of the present application;

[0032] Figure 7 is a structural block diagram of a component power consumption management apparatus according to an embodiment of the present application;

[0033] Figure 8 is a hardware structural schematic diagram of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION

[0034] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the protection scope of the present application.

[0035] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the protection scope of the present application.

[0036] It should be noted that, in the description of the present application, the terms “comprise”, “contain” or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. The terms “first”, “second” and the like in the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence.

[0037] For those skilled in the art of the present technology, the present application will be better understood in the following detailed description of the application, combined with the accompanying drawings and specific embodiments.

[0038] With the rapid development of data centers and cloud computing, the number of servers is increasing, and power consumption management of the servers is needed. In the process of power consumption management of the servers, the CPU of the server usually needs to find a balance point between performance and power consumption in order to meet the needs of different application scenarios. At present, the RAPL (Runtime Average Power Limit, runtime average power limit) technology is a hardware-level power consumption limiting mechanism, which can dynamically control the upper limit of the power consumption of the CPU at runtime. However, the existing RAPL configuration method mainly sets through the BIOS Setup interface or the operating system tool, which has the problems of complex configuration, easy to be modified accidentally, and unable to realize centralized management. Especially in the large-scale server deployment scenario, when thousands of servers need to be uniformly managed in terms of power consumption configuration, the traditional method needs to spend a lot of time.

[0039] The current mainstream CPU power consumption limiting technical solution mainly includes: 1. RAPL configuration based on BIOS Setup, which provides RAPL power consumption limiting setting options through the BIOS Setup interface. The administrator needs to manually configure the BIOS interface at the start of each server. The RAPL related options are configured by entering the BIOS interface, and after the configuration is completed, the server needs to be restarted, and the configuration takes effect during the server restart process to realize power consumption limitation. 2. Power consumption management tool based on operating system, which configures CPU RAPL parameters at the operating system level. This solution can realize dynamic adjustment, but has security risks. First, it may be maliciously modified after being attacked, and second, it may be modified by unintended users. 3. Centralized management solution based on BMC (Baseboard Management Controller, baseboard management controller), which provides remote power consumption management function through BMC. The BMC method sets the power consumption limit, which needs to interrupt the business, restart the server to take effect, and the persistent storage and reliability protection mechanism of the configuration data is not perfect.

[0040] However, the above technical solution has high configuration complexity, needs to enter the BIOS interface of the server one by one or configure through a complex command line tool, and is low in efficiency in large-scale deployment. The data persistence of the above technical solution is unreliable, and the configuration parameters are easy to be lost due to BIOS update and the like, and the effective data protection mechanism is lacked. The above technical solution is insufficient in security, poor in visibility, and insufficient in flexibility, the configuration parameters are easy to be modified or tampered with maliciously, the effective locking and protection mechanism is lacked, the current power consumption limit configuration cannot be directly seen from the system information, the operation and maintenance efficiency is affected, and the differentiated power consumption management strategy cannot be implemented according to different business scenarios and hardware configurations.

[0041] Based on the above, the embodiment of the application provides a component power consumption management system, which realizes a complete process from configuration issuing to power consumption limit execution through the cooperative work of BMC, CPLD (Complex Programmable Logic Device) and BIOS. The UFM (User Flash Memory) area of the CPLD is used for double backup storage, and the intelligent verification algorithm is used, so that the reliability of the configuration data and the fault tolerance of the system are significantly improved. The multi-layer security locking mechanism from the hardware MSR register to the software interface ensures the security of the configuration and provides a flexible management mode, and solves the problem of insufficient security of the traditional scheme. The power consumption configuration information is dynamically embedded in the CPU model string, full-link visualization from BIOS to the operating system is realized, and the convenience of operation and maintenance is greatly improved.

[0042] According to the embodiment of the application, a component power consumption management method embodiment is provided. It should be noted that the steps shown in the flowchart of the drawings can be executed in the above component power consumption management system, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that here.

[0043] In the embodiment, a component power consumption management method is provided, Figure 1 is a flowchart of the component power consumption management method according to the embodiment of the application, as Figure 1 shown, the flow includes the following steps:

[0044] Step S101, in the case of receiving a component configuration command, determining a power consumption threshold according to the component configuration command.

[0045] Specifically, the management end issues a component configuration command to the first controller when performing a network management operation, and configures the target power consumption threshold of the to-be-managed component.

[0046] The first controller, upon receiving the component configuration command, determines the power consumption threshold according to the component configuration command, and writes the power consumption threshold into the first storage device. For example, the BMC writes a configuration value of 165W (0x00A5, which is the hexadecimal representation of 165) into a specified area of the motherboard EEPROM. In addition, the first controller can pass the power consumption threshold in the first storage device to the second controller through an IPMI (Intelligent Platform Management Interface) command.

[0047] Step S102, write the power consumption threshold into the first storage device, the second storage device and the third storage device.

[0048] Specifically, the second controller is configured to obtain the power consumption threshold from the first storage device, and write the power consumption threshold into the second storage device and the third storage device.

[0049] Step S103, in the case that the data in the second storage device and the data in the third storage device do not satisfy the preset condition, repair the data in the second storage device and the data in the third storage device by using the data in the first storage device.

[0050] Specifically, the second controller is further configured to judge whether the data in the second storage device and the data in the third storage device satisfy the preset condition. The preset condition may be, for example, that the second storage device and the third storage device have data; the data in the second storage device and the third storage device is not damaged, is readable data and is a numerical value; and the power consumption threshold in the second storage device and the third storage device is within a set range, such as 1-4095W. If the data in the second storage device and the data in the third storage device do not satisfy the preset condition, the second controller obtains the data in the first storage device, and repairs the data in the second storage device and the data in the third storage device by using the data in the first storage device. For example, the second controller empties the second storage device and the third storage device, and rewrites the power consumption threshold in the first storage device into the second storage device and the third storage device.

[0051] Step S104, in the case that the power consumption threshold in the second storage device and the power consumption threshold in the third storage device are the same, 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.

[0052] Specifically, the third controller needs to perform data consistency verification, and reads two copies of the power consumption threshold from the second storage device and the third storage device respectively when the system starts, compares the two copies of the power consumption threshold, and only when the two copies of the power consumption threshold are completely consistent, the data is considered valid. The third controller controls the BIOS to read the power consumption threshold in the second storage device and the power consumption threshold in the third storage device from the second controller through the eSPI (Enhanced Serial Peripheral Interface, Enhanced Serial Peripheral Interface) interface when the system starts. When the power consumption threshold in the second storage device and the power consumption threshold in the third storage device are the same, the third controller writes the power consumption threshold in the second storage device or the third storage device into a preset register, and sets the power consumption threshold in the preset register as the target power consumption threshold of the component to be managed, for example, the preset register is the MSR register of the CPU, and after verifying the data consistency, the power consumption threshold is written into the MSR register of the CPU. By cooperating the PpmPolicy (Processor Power Management Policy, Processor Power Management Policy) and the MSR register, the power consumption threshold in the MSR register is set as the target power consumption threshold of the CPU through the combination of the PpmPolicy and the direct MSR register operation, the power consumption of the CPU is accurately controlled, and the compatibility with the original power consumption management mechanism is ensured.

[0053] The component power consumption management method provided by the embodiment writes the RAPL configuration data to each server before leaving the factory, and stores the RAPL configuration data in the UFM area of the CPLD in the server for double backup, cooperates with CRC (Cyclic Redundancy Check, Cyclic Redundancy Check) and version management, and ensures that the configuration data will not be lost under abnormal conditions such as power failure and restart, so that it is not necessary to configure the servers one by one after the servers are powered off, restarted or the like. In addition, the method designs a multi-level fault recovery strategy, when the main configuration data is damaged, the system can automatically recover the RAPL configuration data from the backup data, the EEPROM default configuration or the safe mode, ensure the availability of the server, and also do not need to be reconfigured by the administrator. The problem that it is necessary to enter the BIOS of each server to limit the power consumption of the components of the server, the management efficiency is low, and there is no effective data protection mechanism.

[0054] As an optional embodiment, after the power consumption threshold is written into the first storage device, the second storage device and the third storage device, the method further comprises:

[0055] In the case that the power consumption threshold in the second storage device and the power consumption threshold in the third storage device are not the same, it is judged 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;

[0056] If the power consumption threshold in the second storage device is within the preset range, the data in the second storage device is used to repair the data in the third storage device;

[0057] If the power consumption threshold in the third storage device is within the preset range, the data in the third storage device is used to repair the data in the second storage device.

[0058] Specifically, if the power consumption threshold in the second storage device is not 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 needs to be repaired. It is judged whether the power consumption threshold in the second storage device and the power consumption threshold in the third storage device are valid, for example: a preset range is set, such as 1-4095W, if the power consumption threshold is within the preset range, it means that the preset threshold is valid.

[0059] If the power consumption threshold in the second storage device is within the preset range, the power consumption threshold in the second storage device is valid, and the data in the second storage device is used to repair the data in the third storage device, for example: emptying the third storage device, and writing the power consumption threshold in the second storage device into the corresponding position of the third storage device.

[0060] If the power consumption threshold in the third storage device is within the preset range, the power consumption threshold in the third storage device is valid, and the data in the third storage device is used to repair the data in the second storage device, for example: emptying the second storage device, and writing the power consumption threshold in the third storage device into the corresponding position of the second storage device.

[0061] The above process is shown in Figure 2 Read the complex programmable logic device backup data, check the data consistency, judge whether the two data are the same, if the two data are not the same, verify the single data. It is judged whether the first data is valid, if the first data is valid, the second data is repaired by the first data; if the first data is invalid, it is judged whether the second data is valid, if the second data is valid, the first data is repaired by the second data.

[0062] In this embodiment, the second storage device and the third storage device in the user flash memory of the complex programmable logic device are used for double backup storage, and the intelligent verification algorithm is used to realize that the second storage device and the third storage device can repair each other's data, thereby improving the reliability of the configuration data and the fault tolerance of the system.

[0063] As an optional embodiment, in the case that the data in the second storage device and the data in the third storage device do not meet the preset condition, the data in the first storage device is used to repair the data in the second storage device and the data in the third storage device, comprising:

[0064] if the data in the first storage device does not satisfy the preset condition, obtaining a thermal design power threshold of the component to be managed, generating a new power consumption threshold according to the thermal design power threshold and a preset ratio, and writing the new power consumption threshold into the second storage device and the third storage device.

[0065] if the data in the first storage device does not satisfy the preset condition, obtaining a thermal design power threshold of the component to be managed, generating a new power consumption threshold according to the thermal design power threshold and a preset ratio, and writing the new power consumption threshold into the second storage device and the third storage device.

[0066] if the data in the first storage device does not satisfy the preset condition, obtaining a thermal design power threshold of the component to be managed, generating a new power consumption threshold according to the thermal design power threshold and a preset ratio, and writing the new power consumption threshold into the second storage device and the third storage device.

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

[0068] The preset condition is, for example, that the second storage device and the third storage device exist data; the data in the second storage device and the third storage device is not damaged, is readable data and is a numerical value; and the power consumption thresholds in the second storage device and the third storage device are within a set range, such as 1-4095W. If the power consumption threshold in the second storage device and the power consumption threshold in the third storage device do not satisfy the preset condition, it indicates that the power consumption thresholds in the second storage device and the third storage device are both unusable, and the data needs to be repaired by using the first storage device.

[0069] if the data in the first storage device does not satisfy the preset condition, obtaining a thermal design power threshold of the component to be managed, generating a new power consumption threshold according to the thermal design power threshold and a preset ratio, and writing the new power consumption threshold into the second storage device and the third storage device.

[0070] If the data in the first storage device does not meet the preset condition, it indicates that the power consumption threshold of the first storage device is also unavailable, the thermal design power consumption threshold of the to-be-managed component is acquired, and the thermal design power consumption threshold is, for example, the maximum TDP of the CPU. The preset proportion is, for example, 80%, 85%, or another proportion. A new power consumption threshold is generated according to the thermal design power consumption threshold and the preset proportion, and the new power consumption threshold is written into the second storage device and the third storage device. The above process is as shown in Figure 2 The default value is read from the electrically erasable programmable read-only memory; the default value is used to update the complex programmable logic device double backup data; the configuration is applied; the model-specific register is configured; and the display information is updated.

[0071] In the embodiment, a multi-level fault recovery strategy is designed. When the data of the second storage device and the third storage device is damaged, the second controller can automatically repair the data of the second storage device and the third storage device by using the data in the first storage device, ensure that the configuration data will not be lost in abnormal conditions such as power failure and restart, and ensure the availability of the system.

[0072] As an optional embodiment, after the power consumption threshold in the preset register is set as the target power consumption threshold of the to-be-managed component, the method further includes:

[0073] The preset register is locked, and an interface locking function is started, where the interface locking function is used to abort the first configuration operation on the preset register.

[0074] The first configuration option corresponding to the preset register is hidden, and the second configuration option corresponding to the preset register is locked.

[0075] First operation information of the first configuration operation and second operation information of a second configuration operation on the target power consumption threshold are acquired, and an audit log is generated according to the first operation information and the second operation information.

[0076] Specifically, after it is detected that the power consumption threshold of the to-be-managed component is set as the target power consumption threshold, a locking process is started.

[0077] After the locking process is started, a hardware layer locking unit locks the preset register, and an interface locking function is started. The interface locking function is, for example, a function for enabling TPMI (Thermal and Power Management Interface) locking protection. The interface locking function is used to abort the first configuration operation on the preset register, and prevent the target power consumption threshold from being modified from a hardware layer. As shown in Figure 6 The hardware layer locking unit is used to perform hardware layer locking, including register locking and thermal and power management interface locking.

[0078] After the lock process is started, 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. The first configuration option is, for example, a Package PL1 Power Limit (PL1 power consumption limit option) option, a Package PL2 Power Limit (PL2 power consumption limit option) option, and the like. The second configuration option is, for example, a RAPL Lock (RAPL lock) option under a RAPL configuration page. The software layer locking unit prevents user misoperation by hiding the configuration option and permission control at the software layer. As shown in Figure 6 The software layer locking unit is configured to perform software layer locking, including hiding the configuration option, setting the read-only permission, and disabling the operating system interface.

[0079] After the lock process is started, the monitoring unit obtains first operation information of the first configuration operation and second operation information of the second configuration operation on the target power consumption threshold, and generates an audit log according to the first operation information and the second operation information. The monitoring unit implements a complete audit log and an abnormality monitoring mechanism. By generating the audit log, the effectiveness of the security policy is ensured. As shown in Figure 6 The monitoring unit is configured to monitor the layer protection, including audit log recording, abnormality detection, and an alarm mechanism.

[0080] In this embodiment, a multi-layer security locking mechanism is designed from the preset register at the hardware layer to the configuration option at the software layer, which not only ensures the security of the configuration, but also provides a flexible management method, and solves the problem of insufficient security of the traditional scheme.

[0081] As an optional embodiment, the preset register is locked, and an interface locking function is started, including:

[0082] obtaining a current value of the preset register;

[0083] performing a bitwise OR operation on the current value and a preset locking bit mask to obtain a target value, wherein a locking bit of the target value is a preset value, and the locking bit is used to lock the preset register;

[0084] writing the target value into the preset register;

[0085] starting the interface locking function, and if the interface locking function fails to start, generating an alarm information.

[0086] Specifically, the preset register is, for example, a Package RAPL Limit MSR (0x610) register, a PP0 RAPL Limit MSR (0x638) register, and a DRAM RAPL Limit MSR (0x618) register.

[0087] A preset lock bit mask, for example, a lock bit (LIMIT_LOCK_BIT) of a RAPL Limit register, is taken as a bit mask, usually bit 63, and the preset lock bit mask is set to 1. The preset register is subjected to a bitwise OR operation with the preset lock bit mask to obtain a target value, and the lock bit in the target value is modified to 1, indicating that the hardware lock function of the register is enabled.

[0088] The target value is written into the preset register, for example, the target value (with the lock bit set) is written back to the MSR 0x610 register, which will become read-only, and any subsequent attempt to modify it will be ignored.

[0089] The interface lock function is started, and if the interface lock function fails to start, an alarm is generated, for example, the interface lock function is the EnableTpmiRaplLock function.

[0090] In this embodiment, the preset register is locked, and the interface lock function is started, to prevent the power consumption threshold from being modified from the hardware level.

[0091] 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:

[0092] An interface resource corresponding to the preset register is obtained, and a first identifier of the first configuration option and a second identifier of the second configuration option are obtained in the interface resource.

[0093] A first preset interface is called, and the first configuration option is hidden according to the first preset interface and the first identifier.

[0094] A second preset interface is called, and the second configuration option is set to a preset value and locked according to the second preset interface and the second identifier.

[0095] Specifically, an interface resource corresponding to the preset register is obtained, and the interface resource contains all interfaces that can configure the preset register and contain information of the preset register. A first identifier of the first configuration option and a second identifier of the second configuration option are obtained in the interface resource.

[0096] A first preset interface, for example, an application programming interface (API), is called to dynamically update the state of the first configuration option and hide the first configuration option.

[0097] calling a second preset interface, for example, calling an application programming interface, to dynamically update the state of the second configuration option, set the second configuration option to a preset value and lock the second configuration option, gray the second configuration option, and make the second configuration option unmodifiable (in a read-only state) on the interface.

[0098] In the embodiment, a software locking strategy is designed, and the first configuration option is hidden and the second configuration option is locked at the software level to prevent user misoperation and avoid modification of the power consumption threshold. A multi-layer security locking mechanism from hardware to software is designed, which not only guarantees the security of the configuration but also provides a flexible management mode, and solves the problem of insufficient security of the traditional scheme.

[0099] As an optional embodiment, first operation information of a first configuration operation and second operation information of a second configuration operation on the target power consumption threshold are obtained, and an audit log is generated according to the first operation information and the second operation information, including:

[0100] According to a preset field, target field information is obtained from the first operation information and the second operation information;

[0101] A timestamp corresponding to the target field information is generated;

[0102] According to the target field information and the timestamp, an audit log is generated;

[0103] A log index corresponding to the audit log is generated, and the audit log and the log index are written into a preset storage area.

[0104] Specifically, the preset field is, for example, 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 the preset fields in the first operation information and the second operation information are obtained as the target field information.

[0105] A timestamp corresponding to the target field information is generated, for example, a GetCurrentTimestamp function is called to obtain the current system time, and the current system time is taken as the timestamp corresponding to the target field information. A log containing all target field information and timestamps is generated as an audit log.

[0106] A log index corresponding to the audit log is generated, for example, a static 32-bit unsigned integer RecordIndex is declared and initialized to 0, RecordIndex is used to record how many audit records have been written, and is taken as a log index or record number.

[0107] A preset storage area, for example, an NVRAM audit log area, is set, and the audit log and log index are written into the preset storage area.

[0108] In the embodiment, a complete audit log and exception monitoring mechanism is designed, the audit log is generated by monitoring the first operation information and the second operation information, the operation related data is recorded in the audit log, and the fault alarm is performed, so as to ensure the effectiveness of the security policy.

[0109] As an optional embodiment, after the power consumption threshold in the preset register is set as the target power consumption threshold of the component to be managed, the method further includes:

[0110] A character array of a preset length is created.

[0111] The component model and performance level of the component to be managed are obtained.

[0112] The component model, performance level, and target power consumption threshold are written into the character array.

[0113] In the character array, the performance level and the target power consumption threshold are obtained, it is judged whether the performance level is greater than a preset threshold, and it is judged whether the target power consumption threshold is within a preset range.

[0114] In the case that the performance level is greater than the preset threshold and the target power consumption threshold is within the preset range, the component model, performance level, and target power consumption threshold in the character array are used to generate the display information to be displayed.

[0115] In the case that the performance level is less than or equal to the preset threshold and the target power consumption threshold is within the preset range, the component model and target power consumption threshold in the character array are used to generate the display information to be displayed.

[0116] In the case that 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 component model in the character array is used to generate the display information to be displayed.

[0117] The display information to be displayed is displayed on a preset interface.

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

[0119] The component model and performance level (SstLevel) of the component to be managed are obtained. The component model is, for example, CPU M, GPU N, etc. The performance level is, for example, level 1, level 2, level 3, or other levels. The greater the performance level, the stronger the performance of the device.

[0120] The component model, performance level and target power threshold are written into a character array. According to the data in the character array, the to-be-displayed information is generated, for example, the component model, performance level and target power threshold in the character array are spliced into the to-be-displayed information; the component model and target power threshold in the character array are spliced into the to-be-displayed information.

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

[0122] The preset threshold is, for example, 0 level. The preset range is, for example, 1-4095W. If the performance level is greater than the preset threshold and the target power threshold is within the preset range, the to-be-displayed information is generated as the component model + performance level + target power threshold. If the performance level is less than or equal to the preset threshold and the target power threshold is within the preset range, the to-be-displayed information is generated as the component model + target power threshold. If the performance level is less than or equal to the preset threshold and the target power threshold is not within the preset range, the to-be-displayed information is generated as the component model.

[0123] The preset interface is, for example, an Early VGA interface, a POST self-checking interface, a BIOS Setup interface and the like. Unified to-be-displayed information is displayed on each preset interface.

[0124] In the embodiment, the performance level and target power threshold are dynamically embedded in the component model string, realizing full-link visual management from the BIOS to the operating system, and the system supports unified display and update of multiple interfaces, facilitating the operation and maintenance personnel to quickly understand the current power consumption configuration state of the to-be-managed component.

[0125] As an optional embodiment, after setting the power threshold in the preset register as the target power threshold of the to-be-managed component, the method further includes:

[0126] The occupancy rates of a preset number of components in the to-be-managed component are obtained, and an average occupancy rate of the occupancy rates is determined;

[0127] The components are classified according to the average occupancy rate, the occupancy rates and a preset threshold, to obtain idle components, first-type components and second-type components, wherein the idle components are components with an occupancy rate less than or equal to the preset threshold, the first-type components are components with an occupancy rate greater than the preset threshold and less than the average occupancy rate, and the second-type components are components with an occupancy rate greater than or equal to the average occupancy rate;

[0128] In a case where the first current power consumption of the component to be managed is greater than the target power consumption threshold, the idle component is subjected to frequency reduction processing, and a second current power consumption is obtained;

[0129] In a case where the second current power consumption is greater than the target power consumption threshold, the first type component is subjected to frequency reduction processing, and a third current power consumption of the component to be managed is obtained;

[0130] In a case where the third current power consumption is greater than the target power consumption threshold, the second type component is subjected to frequency reduction processing until the power consumption of the component to be managed is less than or equal to the target power consumption threshold.

[0131] Specifically, the component to be managed is, for example, a CPU. A preset number of components in the component to be managed are, for example, cores of the CPU, and a 24-core CPU has 24 cores, i.e., 24 components. The preset number represents a plurality, and no specific number is limited here. The occupancy rate of each component in the component to be managed is obtained, and the average occupancy rate is calculated.

[0132] The preset threshold is, for example, 1%, 2%, or other smaller values. Taking an example of an average occupancy rate of 50% and a preset threshold of 1%, the components are classified according to the average occupancy rate, the occupancy rate, and the preset threshold to obtain idle components, first type components, and second type components. The idle components are components with an occupancy rate less than 1%, the first type components are components with an occupancy rate between 1% and 50%, and the second type components are components with an occupancy rate greater than 50%.

[0133] The higher the occupancy rate, the more business the component is executing. If the component with a high occupancy rate is subjected to frequency reduction processing, it will affect the operation of the business. Therefore, if the current power consumption of the component to be managed is greater than the target power consumption threshold, the idle component is subjected to frequency reduction first, then the first type component is subjected to frequency reduction, and finally the second type component is subjected to frequency reduction. Therefore, if the first current power consumption of the component to be managed is greater than the target power consumption threshold, the idle component is subjected to frequency reduction processing; if the second current power consumption is greater than the target power consumption threshold, the first type component is subjected to frequency reduction processing; and if the third current power consumption is greater than the target power consumption threshold, the idle component is subjected to frequency reduction processing until the power consumption of the component to be managed is less than or equal to the target power consumption threshold. The frequency reduction processing can be performed according to a preset proportion, for example, a reduction of 5% of the current frequency each time.

[0134] In this embodiment, the components in the component to be managed are classified according to the occupancy rate to obtain idle components, first type components, and second type components. If the power consumption of the component to be managed is greater than the target power consumption threshold, the idle component is subjected to frequency reduction first, then the first type component is subjected to frequency reduction, and finally the second type component is subjected to frequency reduction, thereby reducing the power consumption of the component to be managed while ensuring the normal operation of the business of the component to be managed.

[0135] As an optional embodiment, before the step S101 of determining the power consumption threshold according to the component configuration command, a suitable power consumption threshold needs to be determined to generate the component configuration command and issue it to the first controller. If the component to be managed is a CPU, the process of determining the suitable power consumption threshold can include steps A1 to A3.

[0136] Step A1, obtain the maximum clock frequency that the CPU can support, and obtain the safety power consumption threshold and safety heat dissipation parameter threshold of the CPU.

[0137] Specifically, the maximum clock frequency that the CPU can support is obtained, and the safety power consumption threshold and safety heat dissipation parameter threshold of the CPU and other predetermined safety parameters are obtained. The parameter information provides the required safety reference information for optimizing the CPU power consumption limit.

[0138] Step A2, gradually pressurize the CPU when the heat dissipation parameter value of the CPU is not lower than the safety heat dissipation parameter threshold, so as to gradually increase the clock frequency of the CPU, until the clock frequency of the CPU reaches the maximum clock frequency, or the pressurization is stopped when the CPU power consumption value reaches the safety power consumption threshold.

[0139] Specifically, when optimizing the CPU power consumption limit corresponding to the maximum turbo frequency of the CPU, it is necessary to first detect whether the current heat dissipation parameter value of the CPU is lower than the safety heat dissipation parameter threshold. If it is lower, the CPU power consumption limit will not be optimized for safety reasons. Otherwise, if it is not lower than the safety heat dissipation parameter threshold, the embodiment realizes the optimal CPU power consumption limit by continuously pressurizing the CPU.

[0140] In the case where the current heat dissipation parameter value of the CPU is not lower than the safety heat dissipation parameter threshold, the clock frequency of the CPU can be gradually increased by gradually pressurizing the CPU. In the process of continuously pressurizing the CPU to gradually increase the clock frequency of the CPU, the CPU power consumption value will also gradually increase. The embodiment dynamically tests the optimal limit of the CPU power consumption that can be reached in this way.

[0141] The optimal CPU power consumption limit needs to be able to support the CPU turbo to a higher frequency, and should not exceed the safety power consumption threshold of the CPU. Therefore, the pressurization will be stopped when the clock frequency of the CPU reaches the maximum clock frequency, or the CPU power consumption value reaches the safety power consumption threshold. Since the CPU power consumption value corresponding to the stop of the pressurization either supports the CPU to reach its maximum clock frequency or has reached the safety power consumption threshold of the CPU (further pressurization will cause the CPU to run in an unsafe power consumption condition), the CPU power consumption value at this time is considered to be a suitable power consumption threshold.

[0142] Step A3, obtain the CPU power consumption value when the pressurization is stopped, and take the CPU power consumption value when the pressurization is stopped as the appropriate power consumption threshold.

[0143] Specifically, the CPU power consumption value when the pressurization is stopped is taken as the appropriate power consumption threshold, so that the CPU power consumption limit corresponding to the maximum turbo frequency of the CPU is optimized. Subsequently, based on the appropriate power consumption threshold, not only can the CPU turbo be supported to a higher frequency, but also the CPU can be operated in a safe power consumption condition.

[0144] In the embodiment, the appropriate power consumption threshold is conveniently determined in combination with the maximum clock frequency, the safe power consumption threshold and the safe heat dissipation parameter threshold, and the parameter information of the predetermined safety parameters of the CPU is considered, so that the CPU can be effectively prevented from running in an unsafe condition, and the safety of the CPU is ensured.

[0145] According to the embodiments of the present application, a component power consumption management system is provided, as shown in Figure 3 The system comprises a first controller, a first storage device, a second controller, a second storage device, a third storage device and a third controller.

[0146] The first controller is configured to, in a case where a component configuration command is received, determine a power consumption threshold according to the component configuration command, and write the power consumption threshold into the first storage device.

[0147] The second controller is configured to obtain the power consumption threshold from the first storage device, and write the power consumption threshold into the second storage device and the third storage device.

[0148] The second controller is further configured to, in a case where the data in the second storage device and the data in the third storage device do not satisfy a preset condition, repair the data in the second storage device and the data in the third storage device by using the data in the first storage device.

[0149] The third controller is configured to, in a case where the power consumption threshold in the second storage device and the power consumption threshold in the third storage device are the same, 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 a target power consumption threshold of the component to be managed.

[0150] Specifically, as shown in Figure 3As 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.

[0151] like Figure 3 As 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.

[0152] 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.

[0153] The second controller is configured to obtain the power consumption threshold from the first storage device and write the power consumption threshold into the second storage device and the third storage device.

[0154] The second controller is further configured to determine whether the data in the second storage device and the data in the third storage device meet preset conditions, for example, the second storage device and the third storage device have data; the data in the second storage device and the third storage device is not damaged, is readable data, and is a numerical value; and the power consumption threshold in the second storage device and the third storage device is within a set range, such as 1-4095 W. If the data in the second storage device and the data in the third storage device do not meet the preset conditions, the second controller obtains the data in the first storage device, repairs the data in the second storage device and the data in the third storage device by using the data in the first storage device, for example, clears the second storage device and the third storage device, and rewrites the power consumption threshold in the first storage device into the second storage device and the third storage device. Figure 3 As shown in FIG. 2, the second controller can read and write the second storage device and the third storage device, perform data verification, fault recovery, and intelligent retry operations.

[0155] The third controller needs to perform data consistency verification. When the system starts, the third controller reads two power consumption thresholds from the second storage device and the third storage device respectively, and compares the two power consumption thresholds. Only when the two power consumption thresholds are completely consistent, the data is considered valid. When the system starts, the third controller controls the BIOS to read the power consumption threshold in the second storage device and the power consumption threshold in the third storage device from the second controller through the eSPI (Enhanced Serial Peripheral Interface) interface. When the power consumption threshold in the second storage device and the power consumption threshold in the third storage device are the same, the third controller writes the power consumption threshold in the second storage device or the third storage device into a preset register, and sets the power consumption threshold in the preset register as a target power consumption threshold of a component to be managed, for example, the preset register is an MSR register of a CPU, and after verifying the data consistency, the power consumption threshold is written into the MSR register of the CPU. By cooperating the PpmPolicy (Processor Power Management Policy) and the MSR register, the power consumption threshold in the MSR register is set as the target power consumption threshold of the CPU through the combination of the PpmPolicy and the direct MSR register operation, the power consumption of the CPU is accurately controlled, and the compatibility with the original power consumption management mechanism is ensured. Figure 3 As shown in FIG. 3, the third controller writes the power consumption threshold into the preset register to limit the power consumption of the component to be managed through the register configuration.

[0156] Based on the above, the data flow of the component power consumption management system in the embodiment is shown in the figure, in sequence, the electrically erasable programmable read-only memory, the user flash memory, the basic input / output system reading, and the model-specific register. Figure 4

[0157] The component power consumption management system provided in the embodiment writes the power consumption threshold into the first storage device by the first controller, writes the power consumption threshold into the second storage device and the third storage device by the second controller, repairs the data in the second storage device and the third storage device by the second controller using the data in the first storage device if the data in the second storage device and the third storage device do not meet the preset condition, writes the power consumption threshold into the preset register and sets it as the target power consumption threshold of the component to be managed by the third controller when the power consumption threshold values in the second storage device and the third storage device are the same. The system uses the component configuration command to instruct the three controllers to realize the power consumption configuration of the component, without the need to configure each server one by one. The second storage device and the third storage device realize double backup storage, and the first storage device is used for repair when the data does not meet the preset condition, ensuring that the data will not be lost or damaged, improving the reliability of the configuration data and the fault tolerance of the system. The problem of the need to enter the BIOS of each server to limit the power consumption of the components of the server, the low management efficiency, and the lack of effective data protection mechanism are solved.

[0158] As an optional embodiment, the third controller comprises a hardware layer locking unit, a software layer locking unit, and a monitoring unit.

[0159] The third controller is configured to start a locking process when it is detected that the power consumption threshold of the component to be managed is the target power consumption threshold.

[0160] The hardware layer locking unit is configured to lock the preset register and start an interface locking function after the locking process is started, where the interface locking function is configured to abort a first configuration operation on the preset register.

[0161] The software layer locking unit is configured to hide a first configuration option corresponding to the preset register and lock a second configuration option corresponding to the preset register after the locking process is started.

[0162] The monitoring unit is configured to obtain first operation information of the first configuration operation and second operation information of a second configuration operation on the target power consumption threshold after the locking process is started, and generate an audit log according to the first operation information and the second operation information.

[0163] ​Specifically, the embodiment implements a multi-layer security locking mechanism from hardware to software, which ensures that the target power consumption threshold in the preset register cannot be modified accidentally or maliciously after the power consumption threshold is set to the target power consumption threshold of the component to be managed, and guarantees the consistency and reliability of system power consumption management. The multi-layer security locking mechanism includes a security locking process, as shown in Figure 5 The security locking process includes hardware locking, software locking, and audit and monitoring.

[0164] Taking the third controller as an example of a component for running a basic input and output system. As shown in Figure 6 The basic input and output system performs a detection operation to determine whether a valid power consumption threshold configuration value is read from the CPLD, i.e., whether the power consumption threshold of the component to be managed is set to the target power consumption threshold. If no power consumption threshold configuration is detected, the locking process is skipped. If the power consumption threshold configuration is detected, the power consumption threshold of the component to be managed is set to the target power consumption threshold, and the locking process is started.

[0165] After the locking process is started, the hardware layer locking unit locks the preset register, and starts an interface locking function, which is used to abort the first configuration operation on the preset register, and prevents the target power consumption threshold from being modified from the hardware layer. As shown in Figure 6 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.

[0166] After the locking process is started, 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. The first configuration option is, for example, a Package PL1 Power Limit (PL1 power consumption limit option) option, a Package PL2 Power Limit (PL2 power consumption limit option) option, etc. The second configuration option is, for example, a RAPL Lock (RAPL locking) option under a RAPL configuration page. The software layer locking unit prevents user misoperation from the software layer by hiding the configuration option and permission control. As shown in Figure 6 The software layer locking unit is used to perform software layer locking, including hiding the configuration option and setting the read-only permission.

[0167] After the locking process is started, the monitoring unit obtains first operation information of the first configuration operation and second operation information of a second configuration operation on the target power consumption threshold, and generates an audit log according to the first operation information and the second operation information. The monitoring unit implements a complete audit log and abnormality monitoring mechanism to ensure the effectiveness of the security policy by generating the audit log. As shown in Figure 6 The monitoring unit is used for monitoring layer protection, including audit log recording, abnormality detection, and alarm mechanism.

[0168] In the embodiment, a multi-layer security locking mechanism from preset registers of a hardware layer to configuration options of a software layer is designed. The configuration options are locked through the multi-layer security locking mechanism, so that the RAPL configuration cannot be illegally or maliciously modified once set, and consistency and reliability of system power management are ensured. The security of the configuration is ensured, and a flexible management mode is provided, so that the problem of insufficient security of a traditional scheme is solved.

[0169] In the embodiment, a component power management apparatus is also provided, which is used to implement the above-described embodiments and preferred embodiments, and has been described above. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, implementation of hardware, or a combination of software and hardware, is also possible and contemplated.

[0170] The embodiment provides a component power management apparatus, as shown in the following Figure 7 The apparatus includes the following.

[0171] A threshold determination module 701 is configured to determine a power consumption threshold according to a component configuration command when the component configuration command is received.

[0172] A data writing module 702 is configured to write the power consumption threshold into a first storage device, a second storage device, and a third storage device.

[0173] A data repairing module 703 is configured to repair data in the second storage device and data in the third storage device by using data in the first storage device when the data in the second storage device and the data in the third storage device do not satisfy a preset condition.

[0174] A power consumption threshold setting module 704 is configured 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 and the power consumption threshold in the third storage device have the same value, and set the power consumption threshold in the preset register as a target power consumption threshold of the component to be managed.

[0175] Further function descriptions of the above-described modules are the same as those of the corresponding embodiments, and will not be described here.

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

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

[0178] 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 8 As 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.

[0179] 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.

[0180] 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.

[0181] 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.

[0182] The memory 20 can include a volatile memory, such as a random access memory, and / or a non-volatile memory, such as a flash memory, a hard disk, or a solid state disk. The memory 20 can also include a combination of the above-mentioned types of memories.

[0183] The computer device also includes a communication interface 30 for the computer device to communicate with other devices or communication networks.

[0184] The embodiments of the present application also provide a computer readable storage medium, and the method according to the embodiments of the present application can be implemented in hardware, firmware, or recorded in a storage medium, or be implemented as computer code originally stored in a remote storage medium or a non-transitory machine readable storage medium and downloaded to a local storage medium, so that the method described herein can be processed by such software on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid state disk, etc. Further, the storage medium can also include a combination of the above-mentioned types of memories. It can be understood that the computer, the processor, the microprocessor controller, or the programmable hardware includes a storage component that can store or receive software or computer code, when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the method shown in the above embodiments is implemented.

[0185] Part of the present application can be applied as a computer program product, for example, computer program instructions, when executed by a computer, through the operation of the computer, the method and / or technical solutions according to the present application can be called or provided. Those skilled in the art should understand that the form of computer program instructions in a computer readable medium includes but is not limited to source files, executable files, installation package files, etc. Correspondingly, the way of computer program instructions executed by a computer includes but is not limited to: the computer directly executes the instructions, or the computer compiles the instructions and then executes the corresponding compiled program, or the computer reads and executes the instructions, or the computer reads and installs the instructions and then executes the corresponding installed program. Here, the computer readable medium can be any available computer readable storage medium or communication medium accessible to the computer.

[0186] Although the embodiments of the present application are described in conjunction with the accompanying drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present application, and such modifications and changes fall within the scope defined by the present 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. 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, use the data in the second storage device to repair the data in the third storage device; if the power consumption threshold in the third storage device is within the preset range, use the data in the third storage device to repair the data in the second storage device. When neither the data in the second storage device nor the data in the third storage device meets the preset conditions, the method of repairing the data in the second and third storage devices using the data in the first storage device includes: when neither the power consumption threshold in the second storage device nor the power consumption threshold in the third storage device meets the preset conditions, determining whether the data in the first storage device meets the preset conditions; if the data in the first storage device meets the preset conditions, repairing the data in the second and third storage devices using the data in the first storage device; if the data in the first storage device does not meet the preset conditions, obtaining the thermal design power consumption threshold of the component to be managed, generating a new power consumption threshold based on the thermal design power consumption threshold and a preset ratio, and writing the new power consumption threshold into the second and third storage devices.

2. 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 managed component, 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.

3. The method according to claim 2, 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.

4. The method according to claim 2, 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.

5. The method according to claim 2, 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.

6. 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 managed component, 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.

7. 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 managed component, 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.

8. A computer device, characterized in that, include: A memory and a processor are communicatively connected, 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 7.

Citation Information

Patent Citations

  • Device and method for promoting disaster resumption

    CN101127000A

  • Apparatus and method to reconfigure a storage array

    CN101322105A