Disclosure of Invention
The invention aims to provide a power consumption sensing method for a computing node, which solves the problems of high dependence on in-band and out-band network transmission, poor timeliness, high cost and incomplete data of the conventional power consumption data sensing method for the computing node, meets the requirements of in-band and out-band rapid power consumption sensing, and is suitable for large-scale system batch resource power consumption monitoring.
In order to achieve the purpose, the invention adopts the technical scheme that: a power consumption sensing method of a computing node is based on the following configuration:
the readable and writable chip-level register is configured on the CPU of the in-band system and is used for the interaction of power consumption data between the in-band system and the out-of-band system;
establishing a proprietary access protocol between an out-of-band system and an in-band system CPU (central processing unit), so that the out-of-band system can read and write a register of the in-band system CPU;
the sensor is configured in the out-of-band system and used for sensing original voltage data and original current data of power consumption of the target node;
the data sensing and converting module is configured in the out-of-band system and used for reading and converting original voltage data and original current data from the sensor to obtain power consumption data of the node;
the data sensing and registering program module is configured in the out-of-band system and used for calling the data sensing and converting module and recording the power consumption data from the data sensing and converting module into a register of a CPU (central processing unit) of the in-band system;
the power consumption query interface is configured on the out-of-band system and used for calling the data sensing and conversion module to acquire the real-time power consumption data of the node;
the method for sensing the power consumption of the computing node comprises the following steps:
s1, operating an out-of-band system;
s2, the data sensing and registering program module periodically calls the data sensing and converting module to acquire power consumption data of the nodes;
s3, reading the original voltage and current data of the sensor by the data sensing and converting module, and converting the original voltage and current data from the sensor into power consumption data of the node;
s4, the data sensing and registering program module writes the power consumption data acquired from the data sensing and converting module into a register of an in-band system CPU;
s5, after waiting for the set time T, the data sensing and registering program module is switched to S2, and the process is circulated;
s6, when the out-of-band system needs to acquire the node power consumption data, the power consumption query interface calls a data sensing and converting module to acquire the node power consumption data;
and S7, when the in-band system needs to acquire the node power consumption data, the in-band system reads the node power consumption data stored in the register by calling a software interface.
The further improved scheme in the technical scheme is as follows:
1. in the above scheme, the proprietary access protocol is a JTAG protocol, a GMII protocol, or a custom serial protocol.
Due to the application of the technical scheme, compared with the prior art, the invention has the following advantages:
the method for sensing the power consumption of the computing node solves the problems that the conventional method for sensing the power consumption data of the computing node highly depends on in-band and out-band network transmission, has poor timeliness, high cost and incomplete data, does not depend on in-band and out-band networks, has low cost, meets the requirements of in-band and out-band rapid sensing power consumption, and is suitable for large-scale system batch resource power consumption monitoring; by customizing the out-of-band management system and adopting the modes of out-of-band source sensing and in-band and out-of-band reading and writing of the in-band CPU register, the power consumption data of the computer node can be completely acquired, in-band and out-of-band rapid acquisition of the power consumption data of the node can be supported, in-band and out-of-band network interaction is not needed, the cost is low, and the method is suitable for large-scale computer systems to perform batch power consumption sensing. It is measured that the data sensing overhead can be reduced from at least tens of milliseconds in the conventional manner to the microsecond level.
Detailed Description
Example (b): a power consumption sensing method of a computing node is based on the following configuration:
the readable and writable chip-level register is configured on the CPU of the in-band system and is used for the interaction of power consumption data between the in-band system and the out-of-band system;
establishing a proprietary access protocol between an out-of-band system and an in-band system CPU (central processing unit), so that the out-of-band system can read and write a register of the in-band system CPU;
the sensor is configured in the out-of-band system and used for sensing original voltage data and original current data of power consumption of the target node;
the data sensing and converting module is configured in the out-of-band system and used for reading and converting original voltage data and original current data from the sensor to obtain power consumption data of the node;
the data sensing and registering program module is configured in the out-of-band system and used for calling the data sensing and converting module and recording the power consumption data from the data sensing and converting module into a register of a CPU (central processing unit) of the in-band system;
the power consumption query interface is configured on the out-of-band system and used for calling the data sensing and conversion module to acquire the real-time power consumption data of the node;
the method for sensing the power consumption of the computing node comprises the following steps:
s1, operating an out-of-band system;
s2, the data sensing and registering program module periodically calls the data sensing and converting module to obtain power consumption data of the nodes;
s3, reading the original voltage and current data of the sensor by the data sensing and converting module, and converting the original voltage and current data from the sensor into power consumption data of the node;
s4, the data sensing and registering program module writes the power consumption data acquired from the data sensing and converting module into a register of an in-band system CPU;
s5, after waiting for the set time T, the data sensing and registering program module is switched to S2, and the process is circulated;
s6, when the out-of-band system needs to acquire the node power consumption data, the power consumption query interface calls the data sensing and converting module to acquire the node power consumption data;
and S7, when the in-band system needs to acquire the node power consumption data, the in-band system reads the node power consumption data stored in the register by calling a software interface.
The proprietary access protocol described above is the JTAG protocol.
The examples are further explained below:
first, designing a computer in-band system:
(1) And the CPU provides a readable and writable chip IO register (Rpower) for the in-band and out-of-band system to interact power consumption data. The in-band CPU core can directly read and write the register, and the out-of-band system can read and write the register through a maintenance protocol;
(2) And establishing a proprietary access protocol (such as JTAG) between the out-of-band embedded CPU and the in-band CPU, and using the proprietary access protocol for the out-of-band system to read and write the register of the in-band CPU.
Secondly, designing a node level out-of-band system:
(1) A sensor for sensing original voltage dv and current dI data of power consumption of a target node is arranged in the out-of-band system;
(2) A data sensing and registering program module is built in, and the data sensing and converting module is called periodically to read and convert the sensor data and record a result (dpower) into a result register (Rpower) of an in-band CPU;
(3) The out-of-band system provides a power consumption query interface, and a data sensing and conversion module is called in the query interface to acquire real-time power consumption data (dpower) of the node;
(4) The method comprises the following functions of supporting node power consumption sensor configuration, data sensing period t configuration and the like.
Thirdly, the data sensing, registering and accessing process based on the register:
(1) And the data perception and registration process of the out-of-band system:
1. the out-of-band system is always operated after being powered on;
2. the data sensing and registering program periodically calls the data sensing and converting module to obtain node power consumption data;
3. the data sensing and converting module reads the original voltage and current data (dv, dI) of the sensor;
4. the data perception and conversion module converts the original data into power consumption data (dpower = f (dv, dI)) of the nodes according to a formula;
5. the data sensing and registering program writes the power consumption data (dpower) acquired from the data sensing and converting module into a result register (Rpower) of the in-band CPU;
6. the data sensing and registration program waits for time t and then goes to 2 to continue the data sensing, conversion and registration process.
(2) And the power consumption data flow of the out-of-band system inquiry node:
1. calling a power consumption data query interface in the out-of-band system;
2. and the data query interface calls a data sensing and conversion module to acquire node power consumption data (dpower) as the node power consumption data.
(3) And the in-band system acquires the node power consumption data flow:
1. calling a software interface by an in-band software process to inquire power consumption data;
2. reading the value (dpower) of a result register (Rpower) in the software interface;
3. and the software interface returns the dpower as the node power consumption data.
To facilitate a better understanding of the invention, the terms used herein will be briefly explained as follows:
power consumption perception: a method for obtaining power consumption data of computer nodes.
Controlling power consumption: a method of adjusting power consumption data of a target resource by changing its state and usage pattern.
The calculation node: the computer host machine is used for bearing computing functions in the parallel computer system.
In-band system: the computer host is used for executing various application tasks, and comprises a CPU, an internal memory, a hard disk, a network card and the like.
Out-of-band system: the computer node is provided with an embedded system for controlling and managing the in-band system, and the system is independent of the in-band system.
When the method for sensing the power consumption of the computing node is adopted, the problems that the existing method for sensing the power consumption data of the computing node highly depends on in-band and out-band network transmission, has poor timeliness, high cost and incomplete data are solved, the method does not depend on in-band and out-band networks, has low cost and low cost, meets the requirements of in-band and out-band rapid sensing power consumption, and is suitable for large-scale system batch resource power consumption monitoring; by customizing the out-of-band management system and adopting the modes of out-of-band source sensing and in-band and out-of-band reading and writing of the in-band CPU register, the power consumption data of the computer node can be completely acquired, in-band and out-of-band rapid acquisition of the power consumption data of the node can be supported, in-band and out-of-band network interaction is not needed, the cost is low, and the method is suitable for large-scale computer systems to perform batch power consumption sensing. It is measured that the data perception overhead can be reduced from at least tens of milliseconds in the traditional way to the microsecond level.
The above embodiments are merely illustrative of the technical ideas and features of the present invention, and the purpose thereof is to enable those skilled in the art to understand the contents of the present invention and implement the present invention, and not to limit the protection scope of the present invention. All equivalent changes and modifications made according to the spirit of the present invention should be covered within the protection scope of the present invention.