Processor overclocking method, device, equipment and computer readable medium
By obtaining the power budget data and performance data of the processor, the performance arbitration strategy and the firmware program of the microcontroller are used to achieve processor overclocking, which solves the problems of poor versatility and difficult to achieve energy efficiency ratio in the existing technology that rely on special software, and improves Improves the processor's energy efficiency and performance accuracy.
Patent Information
- Application Number
- CN202311834465.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-27
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2043-12-27
AI Technical Summary
Existing technology must rely on special software when implementing processor overclocking. It has poor versatility and is difficult to find a balance between high performance requirements and high energy consumption. It is difficult to meet the energy efficiency ratio requirements.
By continuously obtaining the power budget data and standard performance data of the target processor, the performance arbitration strategy is used to determine when the processor reaches a high load state and the performance is gradually improved. When the overclocking condition is reached, the microcontroller's firmware program controls the processor for overclocking. , achieving overclocking that does not rely on special software.
It improves the accuracy and versatility of processor performance, can find a balance point between high performance requirements and high energy consumption, improves the energy efficiency ratio, and solves the problem that the energy efficiency ratio in the existing technology is difficult to meet the requirements.
Smart Images

Figure CN117873714B
Abstract
Description
Technical Field
[0001] The present application relates to the field of processor technology, and in particular to a processor overclocking method, device, equipment and computer-readable medium. Background Art
[0002] As data center requirements become increasingly higher, the demand for power resources is also increasing. The high energy consumption caused by the high performance demand of data centers has also attracted the attention of data centers. As the largest energy consumer in data centers, servers usually find it difficult to find a balance between high performance requirements and high energy consumption, and the energy efficiency ratio is difficult to meet the requirements.
[0003] At present, DVFS (Dynamic Voltage Frequency Scaling) control is usually used in related technologies, that is, in different scenarios, the performance data of the server CPU (Central Processing Unit) is collected, and the appropriate voltage and frequency are set according to the performance data to achieve the purpose of energy efficiency balance and save power consumption. However, in reality, the DVFS control adopted by related technologies still has problems in performance data collection and power consumption data monitoring. For example, from the perspective of performance data collection, collecting performance data through the operating system will lead to inaccurate data due to differences in instruction sets, compilers, and execution efficiency for CPUs with different architectures; while collecting performance data through hardware has the problem of complex hardware implementation, no reference for data collection, and calibration and tuning of a large number of businesses, and lack of calibration and tuning based on business as a reference; for example, from the perspective of power consumption data monitoring, in high-performance scenarios, DVFS may not be able to fully utilize the maximum TDP (Thermal Design Power), resulting in slow program running under the same energy consumption. At this time, Boost / Turbo overclocking technology is often used, but Boost / Turbo overclocking technology is highly dependent on special software and is not universal.
[0004] With regard to the problem that the existing technology must rely on special software to achieve overclocking and has poor versatility, no effective solution has been proposed yet. Summary of the invention
[0005] The present application provides a processor overclocking method, device, equipment and computer-readable medium to solve the technical problem that the prior art must rely on special software to achieve overclocking and has poor versatility.
[0006] According to one aspect of an embodiment of the present application, the present application provides a method for overclocking a processor, comprising: continuously acquiring power consumption budget data of a target processor, and acquiring standard performance data of the target processor based on a performance arbitration strategy; when it is determined according to the power consumption budget data that the target processor reaches a high load state, continuously raising the performance of the target processor based on the standard performance data so that the performance of the target processor continues to improve toward an overclocking condition; when it is determined according to the power consumption budget data that the target processor reaches the overclocking condition, controlling the target processor to overclock through a firmware program of a microcontroller of the target processor.
[0007] Optionally, obtaining the standard performance data of the target processor based on the performance arbitration strategy includes: obtaining first performance data calculated by the operating system of the target processor and second performance data read by the performance monitoring module of the target processor; when the total data amount of the first performance data and the second performance data is less than a first threshold, comparing the data size of the first performance data and the second performance data; if the first performance data is greater than the second performance data, using the first performance data as the standard performance data that has passed arbitration; if the first performance data is less than or equal to the second performance data, using the second performance data as the standard performance data that has passed arbitration.
[0008] Optionally, the acquisition of standard performance data of the target processor based on the performance arbitration strategy also includes: when the total amount of data of the first performance data and the second performance data is greater than or equal to the first threshold, using the first performance data to perform curve fitting, and smoothing and filtering the fitted curve to obtain a first curve, and using the second performance data to perform curve fitting, and smoothing and filtering the fitted curve to obtain a second curve; calculating the average difference in data between the first curve and the second curve in the same time period; adding the second performance data to the average difference to obtain third performance data; and using the third performance data as the standard performance data that has passed arbitration.
[0009] Optionally, when it is determined according to the power consumption budget data that the target processor has reached a high load state, the performance of the target processor is continuously increased based on the standard performance data so that the performance of the target processor tends to continue to improve towards the overclocking condition, including: when the power consumption budget data reaches a second threshold, determining that the target processor has reached a high load state; gradually increasing the clock frequency and power supply voltage of the target processor according to the standard performance data so that the performance of the target processor tends to continue to improve towards the overclocking condition, wherein the standard performance data of the target processor increases with the increase of the load of the target processor.
[0010] Optionally, when it is determined according to the power consumption budget data that the target processor reaches the overclocking condition, controlling the target processor to overclock through the firmware program of the microcontroller of the target processor includes: when the power consumption budget data reaches a third threshold, determining that the target processor reaches the overclocking condition; setting the maximum clock frequency and the maximum supply voltage according to the thermal design power consumption through the firmware program of the microcontroller of the target processor, so that the clock frequency and the supply voltage of the target processor reach the maximum clock frequency and the maximum supply voltage respectively after the target time, so that the power consumption budget data reaches the thermal design power consumption, so that the target processor is overclocked within the target time.
[0011] Optionally, continuously acquiring the power consumption budget data of the target processor includes: continuously acquiring the power consumption data read by the power consumption monitoring module of the target processor; when the data volume of the power consumption data is less than a fourth threshold, generating the power consumption budget data according to the power consumption data currently acquired.
[0012] Optionally, the continuously acquiring the power consumption budget data of the target processor also includes: when the data volume of the power consumption data is greater than or equal to the fourth threshold, constructing an initial power consumption prediction model according to a filtering strategy through a proportional-integral-differential controller; acquiring historical power consumption data of the target processor, and using the historical data to train the initial power consumption prediction model to obtain a target power consumption prediction model; inputting the power consumption data into the target power consumption prediction model, so as to predict the power consumption budget data of the target processor under continuously increasing load through the target power consumption prediction model.
[0013] Optionally, after making the power consumption budget data reach the thermal design power consumption so that the target processor is overclocked within the target time, the method further includes: reducing the clock frequency and supply voltage of the target processor so that the power consumption of the target processor is always less than or equal to the thermal design power consumption.
[0014] According to another aspect of an embodiment of the present application, the present application provides a processor overclocking device, including: a data acquisition module, used to continuously acquire power consumption budget data of a target processor, and acquire standard performance data of the target processor based on a performance arbitration strategy; a high-load operation module, used to continuously increase the performance of the target processor based on the standard performance data when it is determined that the target processor reaches a high-load state according to the power consumption budget data, so that the performance of the target processor continues to improve toward an overclocking condition; an overclocking module, used to control the target processor to overclock through a firmware program of a microcontroller of the target processor when it is determined that the target processor reaches the overclocking condition according to the power consumption budget data.
[0015] According to another aspect of an embodiment of the present application, the present application provides an electronic device, including a memory, a processor, a communication interface and a communication bus, wherein the memory stores a computer program that can be run on the processor, the memory and the processor communicate through the communication bus and the communication interface, and the steps of the above method are implemented when the processor executes the computer program.
[0016] According to another aspect of an embodiment of the present application, the present application also provides a computer-readable medium having a non-volatile program code executable by a processor, and the program code enables the processor to execute the above method.
[0017] The above technical solution provided by the embodiment of the present application has the following advantages compared with the related art:
[0018] The present application provides a method for overclocking a processor, comprising: continuously acquiring power budget data of a target processor, and acquiring standard performance data of the target processor based on a performance arbitration strategy; when the target processor is determined to reach a high load state according to the power budget data, continuously raising the performance of the target processor based on the standard performance data, so that the performance of the target processor tends to continue to improve towards the overclocking condition; when the target processor is determined to reach the overclocking condition according to the power budget data, controlling the target processor to overclock through a firmware program of a microcontroller of the target processor. The present application arbitrates the performance data acquired by the operating system and the performance data read by the performance monitoring module of the CPU based on a performance arbitration strategy, which not only meets the universality of performance monitoring through the operating system, but also improves the accuracy of the standard performance data finally obtained by arbitration to a certain extent, reads and calculates the power budget data of the CPU through the power consumption monitoring module of the CPU, and then judges that the processor reaches a high load according to the power budget data, and continues to raise the performance of the processor according to the standard performance data, until the overclocking condition is reached, directly controls the processor to overclock through the firmware program of the microcontroller of the processor, and realizes overclocking without relying on special software, solving the technical problem that the prior art must rely on special software to achieve overclocking and has poor universality. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0021] Figure 1 A schematic flow chart of an optional processor overclocking method provided according to an embodiment of the present application;
[0022] Figure 2 A schematic diagram of an optional CPU software framework provided according to an embodiment of the present application;
[0023] Figure 3 A schematic diagram of an optional CPU hardware architecture provided according to an embodiment of the present application;
[0024] Figure 4 A schematic diagram of an overall process of overclocking an optional processor provided according to an embodiment of the present application;
[0025] Figure 5 A block diagram of an optional processor overclocking device provided according to an embodiment of the present application;
[0026] Figure 6 A schematic diagram of an optional electronic device structure provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0028] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present application and have no specific meaning. Therefore, "module" and "component" can be used interchangeably.
[0029] In order to solve the problem mentioned in the background technology, according to one aspect of the embodiment of the present application, an embodiment of a method for overclocking a processor is provided, such as Figure 1 As shown, the method may include the following steps:
[0030] Step S102, continuously acquiring power consumption budget data of the target processor, and acquiring standard performance data of the target processor based on a performance arbitration strategy;
[0031] Step S104, when it is determined according to the power consumption budget data that the target processor reaches a high load state, the performance of the target processor is continuously increased based on the standard performance data, so that the performance of the target processor tends to continue to improve towards the overclocking condition;
[0032] Step S106 , when it is determined according to the power consumption budget data that the target processor meets the overclocking condition, the target processor is controlled to be overclocked through a firmware program of a microcontroller of the target processor.
[0033] Through the above steps S102 to S106, the present application arbitrates the performance data obtained by the operating system and the performance data read by the performance monitoring module of the CPU based on the performance arbitration strategy, which not only meets the universality of performance monitoring through the operating system, but also improves the accuracy of the standard performance data finally obtained by arbitration to a certain extent. The power consumption budget data of the CPU is read and calculated by the power consumption monitoring module of the CPU, and then the performance of the processor is continued to be increased according to the standard performance data when the processor reaches a high load based on the power consumption budget data. Until the overclocking condition is reached, the processor is directly controlled to be overclocked through the firmware program of the processor's microcontroller, so as to achieve overclocking without relying on special software, thereby solving the technical problem that the prior art must rely on special software to achieve overclocking and has poor universality.
[0034] The processor overclocking method provided in this application is installed in Figure 2 Under the CPU software framework shown in Figure 2 As shown, the CPU software framework includes a hardware + firmware layer, a system layer, and a user layer. The user layer is a business application executed by the CPU, and the system layer is an operating system run by the CPU, including dependency libraries, networks, device drivers, inter-process communication, PM (Power Management) framework, memory management, scheduling, file systems, and other components. Among them, the PM framework is a CPU performance and power consumption management framework at the system level. The hardware + firmware layer includes BIOS / ACPI and HW. ACPI (Advanced Configuration and Power Interface) is a power management specification that provides a unified interface for managing the power of a computer system. ACPI defines the power management interaction between the operating system and hardware, including the system power state, device power state, power management events, etc. BIOS (Basic Input / Output System) is the basic input and output system of a computer. It contains the basic hardware configuration information required for the computer to start and run, as well as some basic input and output functions. The BIOS contains the configuration and implementation of ACPI, and can interact with the operating system through the ACPI interface to implement power management functions. HW is a custom implementation of the CPU manufacturer.
[0035] To implement the overclocking method provided in this application, the CPU manufacturer needs to follow the following steps in the HW part: Figure 3The design shown builds the CPU hardware architecture. The following is a description of each module of the CPU hardware architecture:
[0036] CPU0-n represents multiple CPUs in a SOC (System on a Chip, a type of integrated circuit chip that integrates multiple electronic components on a chip to achieve a complete system function. SOC may include processors, memory, input and output interfaces, communication interfaces, etc.). For example, currently large-scale server chips have hundreds of CPUs integrated inside, running standard operating systems such as Linux / Windows.
[0037] MCU, microcontroller, is used to run its own firmware program, while meeting the PM framework of the operating system, and implementing customized power consumption and performance processing strategies.
[0038] Sensors are mainly used to collect temperature data. There may be multiple sensors, corresponding to each or several CPUs or distributed in different places of the SOC.
[0039] The monitoring module is mainly used for performance monitoring and power consumption monitoring. Performance monitoring is used to obtain the performance data of at least multiple CPUs and other modules (including but not limited to PCIe (Peripheral Component Interconnect Express), DDR (Double Data Rate), etc.). Power consumption monitoring is used to obtain the power consumption data of multiple CPUs and other modules. The performance monitoring module is a pure software implementation, a pure hardware implementation, or a combination of software and hardware to implement the performance monitoring function inside the CPU. The power consumption monitoring module is a pure software implementation, a pure hardware implementation, or a combination of software and hardware to implement the power consumption monitoring function inside the CPU.
[0040] The clock module provides clock for SOC. The frequency modification of multiple CPUs needs to be completed through the clock module.
[0041] The power module provides power to the SOC. The voltage modification of multiple CPUs requires the power module to control the external PMIC (Power Management IC).
[0042] In step S102, the standard performance data of the target processor is obtained based on the performance arbitration strategy, specifically, the performance data obtained by the operating system and the performance data read by the performance monitoring module of the CPU are arbitrated. Obtaining performance data through the operating system is a relatively common means, but when facing CPUs of different architectures, differences in instruction sets, compilers, and instruction execution efficiency will cause the obtained performance data to be inaccurate. Although relatively accurate data can be obtained by obtaining performance data through the performance monitoring module of the CPU, the disadvantage is that once there is no reference data for running a large number of businesses to calibrate and tune it, then this method can only be applied to specific scenarios and cannot be fully applied to actual business scenarios, and the versatility is extremely poor. Therefore, the present application combines the two, and arbitrates the performance data obtained by the operating system and the performance data read by the performance monitoring module of the CPU, thereby satisfying the versatility of performance monitoring through the operating system, and also improving the accuracy of the standard performance data finally obtained by arbitration. This is explained below.
[0043] In an optional embodiment, in step S102, obtaining standard performance data of the target processor based on the performance arbitration policy includes:
[0044] Step 1, obtaining first performance data calculated by the operating system of the target processor and second performance data read by the performance monitoring module of the target processor;
[0045] Step 2: when the total amount of the first performance data and the second performance data is less than a first threshold, compare the data size of the first performance data and the second performance data;
[0046] Step 3: If the first performance data is greater than the second performance data, the first performance data is used as the standard performance data that passes arbitration;
[0047] Step 4: If the first performance data is less than or equal to the second performance data, the second performance data is used as the standard performance data that has passed arbitration.
[0048] In an embodiment of the present application, the calculated first performance data is obtained from the operating system of the target processor. At the same time, the second performance data is read from the performance monitoring module of the target processor. Both sets of data cover various performance indicators of the processor, such as CPU utilization, execution speed, memory usage, power consumption, etc. After obtaining the first performance data and the second performance data, the corresponding performance arbitration strategy needs to be executed according to the amount of recorded data. For the case where the recorded data is less, that is, when the total amount of the first performance data and the second performance data is less than the first threshold, the data with the larger data is selected as the standard performance data, that is, if the first performance data is greater than the second performance data, the first performance data is used as the standard performance data through arbitration, and if the first performance data is less than or equal to the second performance data, the second performance data is used as the standard performance data through arbitration. The first threshold is a preset threshold for the amount of performance data, which can be set according to actual needs.
[0049] When the recorded data has reached a certain scale, it is necessary to calibrate and optimize the data obtained by the CPU performance monitoring module based on the business.
[0050] In an optional embodiment, the step of obtaining standard performance data of the target processor based on the performance arbitration strategy further includes:
[0051] Step 1, when the total amount of the first performance data and the second performance data is greater than or equal to the first threshold, curve fitting is performed using the first performance data, and smoothing and filtering the fitted curve to obtain a first curve, and curve fitting is performed using the second performance data, and smoothing and filtering the fitted curve to obtain a second curve;
[0052] Step 2, calculating the average difference between the first curve and the second curve in the same time period;
[0053] Step 3, adding the second performance data to the average difference to obtain third performance data;
[0054] Step 4: Using the third performance data as the standard performance data that has passed arbitration.
[0055] In the embodiment of the present application, when the recorded data has reached a certain scale, the first performance data calculated by the recorded operating system is fitted and smoothed into a first curve Curve_a, and the second performance data read by the recorded CPU performance monitoring module is also fitted and smoothed into a second curve Curve_b, and then the average difference between the data of the first curve and the second curve in the same time period is calculated. The same time period can be the time period when the performance data is acquired to the first threshold scale. The calculation formula of the average difference can be expressed as:
[0056]
[0057] The number of performance data obtained by the two methods in the same time period is the same, and n is the number of the first performance data and the second performance data obtained in the same time period. Finally, the second performance data is calibrated using the average difference, that is, the second performance data is added to the average difference to obtain the third performance data, and its calculation formula can be expressed as:
[0058] Perf=Δ perf +Perf curve_b
[0059] At this point, the third performance data Perf can be used as standard performance data that has passed arbitration.
[0060] In addition, when the recorded data has reached a certain scale, it is also possible to first determine whether the recorded data is valid, that is, whether it is within the performance error range. The data can also be filtered to eliminate jitter, that is, to remove discrete data. Finally, the first performance data calculated by the operating system is used as a business reference to calibrate and tune the second performance data read by the performance monitoring module, so as to obtain more accurate standard performance data.
[0061] In an embodiment of the present application, it is determined whether the first performance data and the second performance data are both within a preset performance error range. If both are within the error range, it means that both sets of data are reliable and the next step can be performed; otherwise, the data may need to be recollected or verified. If the data is within the error range, the first performance data and the second performance data are first filtered. The purpose of filtering is to remove discrete values or outliers in the data to ensure the continuity and stability of the data. The filtering algorithm can use filtering techniques such as moving average and exponential moving average (EMA). The filtered first performance data is used as a business reference to calibrate the filtered second performance data. The purpose of calibration is to make the two sets of data comparable on the same benchmark, so as to obtain more accurate performance data. The specific calibration adjustment method can be determined according to actual needs, such as using algorithms such as linear interpolation and smooth transition. Through the calibration process, a third performance data can be obtained, which combines the advantages of the first performance data and the second performance data and provides more comprehensive processor performance information.
[0062] In step S102, the power consumption budget data is a relatively smooth data that changes according to load changes. The power consumption budget data is set to determine the power consumption trend of the target processor, calculate the difference with the thermal design power consumption, and thus determine the power consumption margin, that is, how much performance improvement space the CPU can have before and through overclocking, and ensure that the processor does not exceed the designed thermal limit, that is, the thermal design power consumption, on the basis of increasing the clock frequency and power supply voltage to achieve overclocking, thereby avoiding overheating or instability.
[0063] In an optional embodiment, the acquiring power consumption budget data includes:
[0064] Step 1, obtaining power consumption data read by the power consumption monitoring module of the target processor;
[0065] Step 2: When the amount of the power consumption data is less than a fourth threshold, generate the power consumption budget data according to the power consumption data currently acquired.
[0066] In the embodiment of the present application, when there is less recorded data, that is, when the amount of the power consumption data is less than the fourth threshold, no special processing is performed, and the power consumption budget data is generated according to the read power consumption data. The fourth threshold can be set according to actual needs.
[0067] In an optional embodiment, the obtaining of power consumption budget data further includes:
[0068] Step 1: when the amount of the power consumption data is greater than or equal to the fourth threshold, construct an initial power consumption prediction model according to a filtering strategy through a proportional-integral-differential controller;
[0069] Step 2, obtaining historical data of power consumption of the target processor, and using the historical data to train the initial power consumption prediction model to obtain a target power consumption prediction model;
[0070] Step 3: input the power consumption data into the target power consumption prediction model, so as to predict the power consumption budget data of the target processor under the continuous increase of load through the target power consumption prediction model.
[0071] In an embodiment of the present application, for the case where there is a large amount of recorded data, that is, when the amount of data of the power consumption data is greater than or equal to the fourth threshold value, more accurate and reliable power consumption budget data can be generated based on the power consumption data of the target processor. Specifically, a PID (proportional-integral-differential) controller and a filtering algorithm are used to establish an initial power consumption prediction model. The PID controller can adjust the control parameters according to the current state and target state of the system, while the filtering algorithm is used to smooth data fluctuations and reduce noise interference. The initial power consumption prediction model is trained and verified using the historical data of the power consumption of the target processor so that the trained target power consumption prediction model learns the ability to predict future power consumption conditions. The prediction accuracy and stability of the model can be optimized by adjusting the parameters of the PID controller and the configuration of the filtering algorithm. Finally, the power consumption data is input into the target power consumption prediction model to predict the power consumption budget data of the target processor under the continuous increase in load through the target power consumption prediction model.
[0072] In step S104, when it is determined that the target processor has reached a high load state according to the power consumption budget data, the performance of the target processor is continuously increased based on the standard performance data so that the performance of the target processor tends to continue to improve towards the overclocking condition, that is, when the CPU reaches a high load state, it needs to run in high performance mode.
[0073] In an optional embodiment, when it is determined according to the power consumption budget data that the target processor reaches a high load state, continuously increasing the performance of the target processor based on the standard performance data so that the performance of the target processor tends to continue to improve towards an overclocking condition, includes:
[0074] Step 1, when the power consumption budget data reaches a second threshold, determining that the target processor reaches a high load state;
[0075] Step 2: gradually increase the clock frequency and power supply voltage of the target processor according to the standard performance data so that the performance of the target processor continues to improve towards the overclocking condition, wherein the standard performance data of the target processor increases as the load of the target processor increases.
[0076] In an embodiment of the present application, when the power consumption budget data reaches the second threshold, it indicates that the target processor has reached a high load state. The second threshold can be used as a threshold of the load degree. When the power consumption budget data reaches the second threshold, it indicates that the processor is in a high load scenario and needs to run in high performance mode. The second threshold can be set according to actual needs. For example, if the thermal design power consumption is 100%, the second threshold can be set to 70% of the thermal design power consumption. That is, when the power consumption budget data reaches 70% of the thermal design power consumption, it is judged that the target processor is in a high load scenario and needs to run in high performance mode.
[0077] Before overclocking, that is, when the power budget data reaches the second threshold but does not reach the third threshold (the threshold for judging the overclocking condition by the power budget data), the CPU can be controlled to gradually improve the performance of the CPU as the load increases through its own high-performance mode, that is, the clock frequency and power supply voltage of the target processor are gradually increased according to the standard performance data, so that the performance of the target processor tends to continue to improve towards the overclocking condition, and then the power budget data of the target processor tends to continue to improve towards the third threshold. Since the performance data is also a continuous climbing process under high load, the clock frequency and power supply voltage of the target processor can also be gradually increased based on the DVFS technology.
[0078] In practice, when the CPU needs to run in high-performance mode in a high-load scenario, DVFS may not be able to consume the maximum TDP (Thermal Design Power, which represents the thermal design power consumption of the CPU, that is, the heat dissipated by the CPU when running at full load), resulting in slow program operation under the same energy consumption. Existing technologies often use Boost / Turbo overclocking technology to make the CPU consume the maximum TDP power consumption, thereby releasing the strongest performance of the CPU, but Boost / Turbo overclocking technology requires the support of special software and its versatility is extremely poor.
[0079] To this end, in order to solve the problem that overclocking can only be achieved by relying on special software, in step S106, the present application directly controls the target processor to overclock through the firmware program of the CPU's microcontroller (MCU).
[0080] In an optional embodiment, when it is determined according to the power consumption budget data that the target processor reaches the overclocking condition, controlling the target processor to overclock through a firmware program of a microcontroller of the target processor includes:
[0081] Step 1, when the power consumption budget data reaches a third threshold, determining that the target processor reaches the overclocking condition;
[0082] Step 2, setting the maximum clock frequency and the maximum supply voltage according to the thermal design power consumption through the firmware program of the microcontroller of the target processor, so that the clock frequency and the supply voltage of the target processor reach the maximum clock frequency and the maximum supply voltage respectively after the target time, and the power consumption budget data reaches the thermal design power consumption, so that the target processor can be overclocked within the target time.
[0083] When the power budget data reaches the third threshold, the performance of the CPU reaches the critical point of overclocking. Due to the limitation of the CPU protection mechanism, it is no longer possible to continue to increase the clock frequency and power supply voltage of the target processor through the DVFS technology to achieve overclocking. Therefore, the present application sets the maximum clock frequency and the maximum power supply voltage directly according to the thermal design power consumption through the firmware program of the microcontroller of the target processor, so that the CPU can break through the limit and achieve overclocking in a short time. The overclocking process is the process in which the real-time clock frequency and the real-time power supply voltage of the target processor reach the maximum clock frequency and the maximum power supply voltage respectively after the target time, so that the power budget data of the target processor reaches the thermal design power consumption, so that the target processor can be overclocked within the target time and fully release the strongest performance. The above-mentioned third threshold can be set according to actual needs. For example, if the thermal design power consumption is 100%, the third threshold can be set to 85% of the thermal design power consumption, that is, when the power budget data reaches 85% of the thermal design power consumption, it is judged that the target processor needs to be overclocked to release the strongest performance.
[0084] The method for realizing automatic overclocking provided by the present application can support overclocking without relying on system software, so that the firmware of the CPU microcontroller itself has an overclocking function. The firmware of the CPU microcontroller is solidified software, stored in the permanent storage of the computer, responsible for the initialization of the CPU, memory and related hardware, and guiding the operating system to start. The firmware provides some basic functions, such as adjusting the power supply, switching certain buses, controlling the CPU frequency, etc. For these functions, it is mainly used to operate the existing circuit components on the circuit board.
[0085] In an optional embodiment, after making the power consumption budget data reach the thermal design power consumption so that the target processor is overclocked within the target time, the method further includes: reducing the clock frequency and supply voltage of the target processor so that the power consumption of the target processor is always less than or equal to the thermal design power consumption.
[0086] In the embodiment of the present application, after the overclocking operation is completed, in order to ensure that the processor does not overheat or exceed the designed power consumption limit, a frequency reduction operation is required. By reducing the clock frequency and the supply voltage, the power consumption of the processor can be reduced so that it always remains below the thermal design power consumption.
[0087] The following is based on Figure 4 To illustrate the complete process of the processor overclocking method provided by this application. Figure 4 As shown, the operating system triggers the PM management framework to obtain and calculate the performance data of the current CPU, including utilization. The utilization is converted into the corresponding index of the VF, and DVFS is executed. A VF adjustment request is sent to the firmware of the CPU through the standard interface of the operating system. After receiving the VF adjustment request, the firmware processes the request message, converts it into utilization according to the index, and records it as the first performance data. The utilization of the current CPU is read and calculated by the performance monitoring module, and recorded as the second performance data. The final performance data is determined by the performance arbitration mechanism. At the same time, the power consumption of the current CPU is read and calculated by the power consumption monitoring module, and recorded, and the power consumption budget data is calculated according to the recorded power consumption data. If it is determined that the CPU load is high according to the power consumption budget data, it is first necessary to run in high-performance mode to increase the performance of the CPU. When it is determined that the CPU reaches the overclocking condition according to the power consumption budget data, it is necessary to directly control the CPU through the firmware program of the CPU microcontroller to realize automatic overclocking. Adjust according to the frequency and voltage after overclocking. After the setting is completed, reply to the VF adjustment request of the operating system, and the operating system is successfully set according to the adjusted frequency and voltage.
[0088] In addition, if the CPU load is not high, overclocking is not required, and the performance data is directly used to determine the frequency and voltage to be adjusted, and the adjustment is completed through DVFS. After the adjustment frequency and voltage are set, the VF adjustment request of the operating system is replied, and the operating system successfully sets the adjusted frequency and voltage.
[0089] In an optional embodiment, if the CPU load is not high, overclocking is not required, and the frequency and voltage to be adjusted are determined directly using the performance data. The adjustment is completed through DVFS and includes the following steps:
[0090] Step 1, determining a target clock frequency and a target power supply voltage for the target processor to operate at an optimal energy efficiency ratio according to the standard performance data;
[0091] Step 2, when either the current clock frequency and the current power supply voltage of the target processor are inconsistent with the corresponding target clock frequency and the target power supply voltage, the current clock frequency and the current power supply voltage of the target processor are adjusted to the target clock frequency and the target power supply voltage to improve the energy efficiency ratio of the target processor.
[0092] In an embodiment of the present application, by analyzing the standard performance data of the target processor, the ideal clock frequency and supply voltage of the processor at the optimal energy efficiency ratio can be determined. Among them, the target clock frequency and target supply voltage of the target processor running at the optimal energy efficiency ratio can be determined based on the standard performance data, which can be implemented by using DVFS (Dynamic Voltage Frequency Scaling) technology. DVFS is a technology that dynamically adjusts the operating frequency and voltage of the chip according to the different computing power requirements of the application running on the chip, thereby achieving the purpose of energy saving.
[0093] In an embodiment of the present application, once either the current clock frequency and the current power supply voltage of the target processor are inconsistent with the corresponding target clock frequency and the target power supply voltage, the current clock frequency and the current power supply voltage of the target processor can be adjusted to the target clock frequency and the target power supply voltage to improve the energy efficiency ratio of the target processor.
[0094] In the embodiment of the present application, the target clock frequency and target power supply voltage of the target processor operating at the optimal energy efficiency ratio are determined based on the standard performance data with improved accuracy, so that the balance point between high performance requirements and high energy consumption can be found, thereby improving the energy efficiency ratio of the target processor, and solving the technical problem that the prior art is unable to find a balance point between high performance requirements and high energy consumption, and the energy efficiency ratio is difficult to meet the requirements.
[0095] The present application arbitrates the performance data obtained by the operating system and the performance data read by the performance monitoring module of the CPU based on the performance arbitration strategy, which not only meets the universality of performance monitoring through the operating system, but also improves the accuracy of the standard performance data finally obtained by arbitration to a certain extent. Therefore, the target clock frequency and target power supply voltage of the target processor running at the optimal energy efficiency ratio can be determined based on the standard performance data with improved accuracy, and the balance point between high performance requirements and high energy consumption can be found, thereby improving the energy efficiency ratio of the target processor. Moreover, automatic overclocking can be achieved without relying on system software under high load conditions, thereby improving universality.
[0096] The present application arbitrates the performance data obtained by the operating system and the performance data read by the performance monitoring module of the CPU based on the performance arbitration strategy, which not only meets the universality of performance monitoring through the operating system, but also improves the accuracy of the standard performance data finally obtained by the arbitration to a certain extent. Then, when it is judged that the processor reaches a high load based on the power consumption budget data, the performance of the processor is continued to be increased based on the standard performance data until the overclocking condition is reached. The processor is directly controlled to overclock through the firmware program of the processor's microcontroller, thereby achieving overclocking without relying on special software, solving the technical problem that the prior art must rely on special software to achieve overclocking and has poor universality.
[0097] According to another aspect of the embodiment of the present application, Figure 5 As shown, a processor overclocking device is provided, comprising:
[0098] The data acquisition module 501 is used to continuously acquire the power consumption budget data of the target processor, and acquire the standard performance data of the target processor based on the performance arbitration strategy;
[0099] A high-load operation module 503 is used to continuously increase the performance of the target processor based on the standard performance data when it is determined according to the power consumption budget data that the target processor reaches a high-load state, so that the performance of the target processor tends to continue to improve towards the overclocking condition;
[0100] The overclocking module 505 is used to control the target processor to overclock through the firmware program of the microcontroller of the target processor when it is determined that the target processor meets the overclocking condition according to the power consumption budget data.
[0101] It should be noted that the data acquisition module 501 in this embodiment can be used to execute step S102 in the embodiment of the present application, the high load operation module 503 in this embodiment can be used to execute step S104 in the embodiment of the present application, and the overclocking module 505 in this embodiment can be used to execute step S106 in the embodiment of the present application.
[0102] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules as part of the device can be implemented by software or hardware.
[0103] Optionally, the data acquisition module is specifically used to: obtain first performance data calculated by the operating system of the target processor and second performance data read by the performance monitoring module of the target processor; when the total data amount of the first performance data and the second performance data is less than a first threshold, compare the data size of the first performance data and the second performance data; if the first performance data is greater than the second performance data, use the first performance data as the standard performance data that has passed arbitration; if the first performance data is less than or equal to the second performance data, use the second performance data as the standard performance data that has passed arbitration.
[0104] Optionally, the data acquisition module is also used to: when the total amount of data of the first performance data and the second performance data is greater than or equal to the first threshold, use the first performance data to perform curve fitting, and smooth the fitted curve to obtain a first curve, and use the second performance data to perform curve fitting, and smooth the fitted curve to obtain a second curve; calculate the average difference in data between the first curve and the second curve in the same time period; add the second performance data to the average difference to obtain third performance data; and use the third performance data as the standard performance data that has passed arbitration.
[0105] Optionally, the high-load operation module is specifically used to: determine that the target processor has reached a high-load state when the power consumption budget data reaches a second threshold; gradually increase the clock frequency and power supply voltage of the target processor according to the standard performance data, so that the performance of the target processor tends to continue to improve towards the overclocking condition, wherein the standard performance data of the target processor increases as the load of the target processor increases.
[0106] Optionally, the overclocking module is specifically used to: determine that the target processor reaches the overclocking condition when the power consumption budget data reaches a third threshold; set the maximum clock frequency and the maximum supply voltage according to the thermal design power consumption through the firmware program of the microcontroller of the target processor, so that the clock frequency and the power supply voltage of the target processor reach the maximum clock frequency and the maximum supply voltage respectively after the target time, and the power consumption budget data reaches the thermal design power consumption, so that the target processor is overclocked within the target time.
[0107] Optionally, the data acquisition module is further used to: continuously acquire the power consumption data read by the power consumption monitoring module of the target processor; when the data volume of the power consumption data is less than a fourth threshold, generate the power consumption budget data according to the power consumption data currently acquired.
[0108] Optionally, the data acquisition module is also used to: when the amount of power consumption data is greater than or equal to the fourth threshold, construct an initial power consumption prediction model according to a filtering strategy through a proportional-integral-differential controller; obtain historical power consumption data of the target processor, and use the historical data to train the initial power consumption prediction model to obtain a target power consumption prediction model; input the power consumption data into the target power consumption prediction model, so as to predict the power consumption budget data of the target processor under continuous load increase through the target power consumption prediction model.
[0109] Optionally, the processor overclocking device further includes a power consumption limiting module, which is specifically used to: reduce the clock frequency and power supply voltage of the target processor so that the power consumption of the target processor is always less than or equal to the thermal design power consumption.
[0110] According to another aspect of the embodiments of the present application, the present application provides an electronic device, such as Figure 6 As shown, it includes a memory 601, a processor 603, a communication interface 605 and a communication bus 607. The memory 601 stores a computer program that can be run on the processor 603. The memory 601 and the processor 603 communicate through the communication interface 605 and the communication bus 607. When the processor 603 executes the computer program, the steps of the above method are implemented.
[0111] The memory and processor in the above electronic device communicate via a communication bus and a communication interface. The communication bus may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus may be divided into an address bus, a data bus, a control bus, etc.
[0112] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0113] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0114] According to another aspect of the embodiments of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any of the above embodiments.
[0115] Optionally, in an embodiment of the present application, the computer-readable medium is configured to store program codes for the processor to perform the following steps:
[0116] Continuously acquiring power consumption budget data of a target processor, and acquiring standard performance data of the target processor based on a performance arbitration strategy;
[0117] When it is determined according to the power consumption budget data that the target processor reaches a high load state, the performance of the target processor is continuously increased based on the standard performance data, so that the performance of the target processor tends to continue to improve towards an overclocking condition;
[0118] When it is determined according to the power consumption budget data that the target processor reaches the overclocking condition, the target processor is controlled to be overclocked through a firmware program of a microcontroller of the target processor.
[0119] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0120] When the embodiments of the present application are specifically implemented, reference may be made to the above-mentioned embodiments, which have corresponding technical effects.
[0121] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present application, or a combination thereof.
[0122] For software implementation, the technology described herein can be implemented by a unit that performs the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0123] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0124] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0125] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0126] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0127] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0128] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk. It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such a process, method, article or device. Without more constraints, an element defined by the phrase "comprising a..." does not exclude the existence of other identical elements in the process, method, article or apparatus comprising the element.
[0129] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.
Claims
1. A method for overclocking a processor, characterized in that: include: Continuously acquiring power consumption budget data of a target processor, and acquiring standard performance data of the target processor based on a performance arbitration strategy, wherein the power consumption budget data is smooth data that changes according to load changes and is used to indicate the performance improvement space of the target processor; When it is determined according to the power consumption budget data that the target processor reaches a high load state, the performance of the target processor is continuously increased based on the standard performance data, so that the performance of the target processor tends to continue to improve towards an overclocking condition; When it is determined according to the power consumption budget data that the target processor reaches the overclocking condition, controlling the target processor to overclock through a firmware program of a microcontroller of the target processor; The continuously acquiring the power consumption budget data of the target processor includes: continuously acquiring the power consumption data read by the power consumption monitoring module of the target processor; when the data volume of the power consumption data is greater than or equal to a fourth threshold, inputting the power consumption data into a target power consumption prediction model, so as to predict the power consumption budget data of the target processor under the continuously increasing load through the target power consumption prediction model.
2. The processor overclocking method according to claim 1, characterized in that: The acquiring of the standard performance data of the target processor based on the performance arbitration strategy includes: Acquire first performance data calculated by the operating system of the target processor and second performance data read by a performance monitoring module of the target processor; When the total amount of data of the first performance data and the second performance data is less than a first threshold, comparing the data sizes of the first performance data and the second performance data; If the first performance data is greater than the second performance data, the first performance data is used as the standard performance data that passes arbitration; If the first performance data is less than or equal to the second performance data, the second performance data is used as the standard performance data that passes arbitration.
3. The processor overclocking method according to claim 2, characterized in that: The acquiring the standard performance data of the target processor based on the performance arbitration strategy further comprises: When the total amount of the first performance data and the second performance data is greater than or equal to the first threshold, curve fitting is performed using the first performance data, and smoothing and filtering the fitted curve to obtain a first curve, and curve fitting is performed using the second performance data, and smoothing and filtering the fitted curve to obtain a second curve; Calculating the average difference between the first curve and the second curve in the same time period; Adding the second performance data to the average difference to obtain third performance data; The third performance data is used as the standard performance data that has passed arbitration.
4. The processor overclocking method according to claim 1, characterized in that: When it is determined according to the power consumption budget data that the target processor reaches a high load state, continuously increasing the performance of the target processor based on the standard performance data so that the performance of the target processor tends to continue to improve towards the overclocking condition, including: When the power consumption budget data reaches a second threshold, determining that the target processor reaches a high load state; The clock frequency and the power supply voltage of the target processor are gradually increased according to the standard performance data so that the performance of the target processor continues to improve towards the overclocking condition, wherein the standard performance data of the target processor increases as the load of the target processor increases.
5. The processor overclocking method according to claim 1, characterized in that: When it is determined according to the power consumption budget data that the target processor reaches the overclocking condition, controlling the target processor to overclock by a firmware program of a microcontroller of the target processor comprises: When the power consumption budget data reaches a third threshold, determining that the target processor reaches the overclocking condition; The maximum clock frequency and the maximum supply voltage are set according to the thermal design power consumption through the firmware program of the microcontroller of the target processor, so that the clock frequency and the supply voltage of the target processor reach the maximum clock frequency and the maximum supply voltage respectively after the target time, and the power consumption budget data reaches the thermal design power consumption, so that the target processor can be overclocked within the target time.
6. The processor overclocking method according to claim 1, characterized in that: The continuously acquiring the power consumption budget data of the target processor further includes: When the data volume of the power consumption data is less than a fourth threshold, the power consumption budget data is generated according to the currently acquired power consumption data.
7. The processor overclocking method according to claim 1, characterized in that: Before inputting the power consumption data into the target power consumption prediction model, the method further includes: An initial power consumption prediction model is constructed according to the filtering strategy through a proportional-integral-derivative controller; The historical data of the power consumption of the target processor is obtained, and the initial power consumption prediction model is trained by using the historical data to obtain the target power consumption prediction model.
8. The processor overclocking method according to claim 5, characterized in that: After making the power consumption budget data reach the thermal design power consumption so that the target processor is overclocked within the target time, the method further includes: The clock frequency and the supply voltage of the target processor are reduced so that the power consumption of the target processor is always less than or equal to the thermal design power consumption.
9. A processor overclocking device, characterized in that: include: A data acquisition module, used to continuously acquire power consumption budget data of a target processor, and acquire standard performance data of the target processor based on a performance arbitration strategy, wherein the power consumption budget data is smooth data that changes according to load changes and is used to indicate the performance improvement space of the target processor; A high-load operation module, for continuously raising the performance of the target processor based on the standard performance data when it is determined according to the power consumption budget data that the target processor reaches a high-load state, so that the performance of the target processor tends to continue to improve towards an overclocking condition; an overclocking module, configured to control the target processor to overclock through a firmware program of a microcontroller of the target processor when it is determined that the target processor reaches the overclocking condition according to the power consumption budget data; The data acquisition module is specifically used to: continuously acquire the power consumption data read by the power consumption monitoring module of the target processor; when the data amount of the power consumption data is greater than or equal to a fourth threshold, input the power consumption data into a target power consumption prediction model, so as to predict the power consumption budget data of the target processor under the continuous increase in load through the target power consumption prediction model.
10. An electronic device, comprising a memory, a processor, a communication interface and a communication bus, wherein the memory stores a computer program that can be run on the processor, and the memory and the processor communicate through the communication bus and the communication interface, characterized in that: When the processor executes the computer program, the processor overclocking method according to any one of claims 1 to 8 is implemented.
11. A computer readable medium having a non-volatile program code executable by a processor, characterized in that: The program code enables the processor to execute the processor overclocking method described in any one of claims 1 to 8.
