Power limit value setting method, device, equipment and medium
By setting an ambient temperature sensor in the server and dynamically setting the power limit of the central processor, the problem of failure to consider ambient temperature in the prior art is solved, and the stable operation and performance release of the central processor at different ambient temperatures is achieved.
Patent Information
- Application Number
- CN202411953180.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-22
AI Technical Summary
The prior art fails to effectively consider the ambient temperature of the central processor, which causes the central processor to be unable to release stronger performance under normal temperature conditions, affecting the normal operation of the server.
By setting an ambient temperature sensor inside the server, reading its value, and dynamically setting the power limit of the central processor based on the basic information of the central processor and the ambient temperature sensor, and adjusting it according to the changes in ambient temperature.
It realizes dynamically setting the power limit of the central processor according to the ambient temperature of the server, thereby improving the energy utilization rate and ensuring that the central processor can operate stably at different ambient temperatures and releasing stronger performance.
Smart Images

Figure CN119862089A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of servers, and in particular to a method, device, equipment and medium for setting a power limit. Background Art
[0002] With the growth of Internet user business, network data throughput is also increasing. The workload of servers, which are the basic data processing units of data centers, is also increasing. The power of the central processing unit inside the server increases accordingly, which leads to an increase in the power of the server, reducing the voltage stability of the power supply system and affecting the normal operation of the server.
[0003] In the related art, in order to ensure the power supply safety of the power supply system, the power limit of the central processing unit is set at a certain level. However, the ambient temperature of the central processing unit is not taken into consideration, resulting in the central processing unit being unable to release stronger performance at normal temperature.
[0004] In view of this, a power limit setting method taking the ambient temperature into consideration is needed. Summary of the invention
[0005] In view of this, the present invention provides a method for setting a power limit taking ambient temperature into consideration.
[0006] In a first aspect, the present invention provides a method for setting a power limit, which is applied to a basic input / output system of a server; the basic input / output system is connected to a central processing unit; an ambient temperature sensor is arranged inside the server; the method comprises: reading a value of the ambient temperature sensor; obtaining basic information of the central processing unit, and setting a power limit of the central processing unit based on the basic information and the value of the ambient temperature sensor; updating the value of the ambient temperature sensor, and adjusting the power limit of the central processing unit based on the updated value.
[0007] In this embodiment, by acquiring the value of the ambient temperature sensor and the basic information of the central processor to set the power limit of the central processor, the corresponding power limit can be set according to the ambient temperature of the server, thereby improving the utilization rate of energy.
[0008] In an optional implementation, acquiring the basic information of the central processing unit includes: reading identification information of the central processing unit to determine model information of the central processing unit; and acquiring the basic information of the central processing unit based on the model information.
[0009] In this embodiment, by reading the identification information of the central processing unit, the model of the central processing unit is determined, thereby obtaining its basic information. Different power limits can be set according to the model of the central processing unit to improve energy utilization.
[0010] In an optional implementation, the basic information of the central processing unit includes at least one of main frequency, multiplier, external frequency, core and thread.
[0011] In this implementation, the basic information includes at least one of the main frequency, multiplier, external frequency, core and thread, which can intuitively evaluate the power limit of the central processing unit under the standard ambient temperature, thereby improving the accuracy of power limit setting.
[0012] In an optional implementation, setting the power limit of the central processing unit based on basic information and the value of the ambient temperature sensor includes: determining a setting condition for the power limit based on the basic information; and setting the power limit of the central processing unit based on the setting condition and the value of the ambient temperature sensor.
[0013] In this embodiment, the setting conditions of the power limit are determined based on the basic information, and then the power limit of the central processing unit is set according to the ambient temperature and the setting conditions, so that the utilization rate of energy can be improved.
[0014] In an optional implementation, the set condition includes at least one of a heat dissipation condition of the central processing unit and a noise condition of the central processing unit.
[0015] In this embodiment, the setting condition includes one of a heat dissipation condition of the central processing unit and a noise condition of the central processing unit, which can prevent the performance of the central processing unit from being degraded and improve the utilization rate of energy.
[0016] In an optional embodiment, adjusting the power limit of the central processing unit based on the updated value includes: determining the ambient temperature difference of the central processing unit based on the updated value; adjusting the power limit of the central processing unit when the ambient temperature difference is greater than a first threshold; and maintaining the power limit of the central processing unit when the ambient temperature difference is less than the first threshold.
[0017] In this embodiment, based on the updated value, the ambient temperature difference of the CPU is determined, and the ambient temperature difference is compared with the first threshold, and based on the comparison result, the power limit of the CPU is adjusted, so that frequent switching and hardware wear can be avoided.
[0018] In an optional embodiment, adjusting the power limit of the central processing unit based on the updated value includes: obtaining the number of adjustments to the power limit within a specified time period; if the number of adjustments to the power limit is greater than a threshold value, and the updated value is used to lower the power limit of the central processing unit, then adjusting the power limit of the central processing unit based on the updated value.
[0019] In this embodiment, by obtaining the number of power limit adjustment times and lowering the power limit of the CPU when the number of adjustment times is greater than the number threshold, it is possible to prevent the ambient temperature from rising after the power limit is increased, thereby preventing the power limit setting from being affected.
[0020] In a second aspect, the present invention provides a power limit setting device, which includes: a reading module for reading the value of an ambient temperature sensor; a setting module for acquiring basic information of a central processing unit, and setting the power limit of the central processing unit based on the basic information and the value of the ambient temperature sensor; an updating module for updating the value of the ambient temperature sensor, and adjusting the power limit of the central processing unit based on the updated value.
[0021] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the power limit setting method of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0022] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the power limit setting method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 is a schematic flow chart of a method for setting a power limit according to an embodiment of the present invention;
[0025] Figure 2 is a schematic diagram of power limit setting of a central processing unit under different ambient temperatures according to an embodiment of the present invention;
[0026] Figure 3 is a flow chart of another method for setting a power limit according to an embodiment of the present invention;
[0027] Figure 4 is a flow chart of another method for setting a power limit according to an embodiment of the present invention;
[0028] Figure 5 is a structural block diagram of a power limit setting device according to an embodiment of the present invention;
[0029] Figure 6 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0031] Currently, most CPUs used in desktop computers and workstations support multiple power settings, such as the long-term power limit and short-term power limit of the CPU. Usually, it is set as the CPU's PBP (Processor Base Power).
[0032] In some optional implementations, the PBP is a CPU (Central Processing Unit) of 125 W. If the heat sink of the central processing unit and the heat dissipation design of the system have better performance, the long-term power limit of the central processing unit can be set to be greater than 125 W to better release the performance of the central processing unit and meet the user's higher performance requirements for the central processing unit.
[0033] Table 1 shows the CPU temperature test data of a desktop computer. The PBP of the CPU is 125W, and the long-term power limit of the CPU is set to 125W. According to the test data at a high temperature of 35 degrees, the maximum temperature of the CPU reaches 93 degrees, which meets the specification requirement of 100 degrees. This shows that the CPU heat dissipation solution is reasonably designed and can meet the CPU heat dissipation requirements at high ambient temperatures. However, at a normal temperature of 25 degrees, the maximum temperature of the CPU is only 86 degrees, which has a large temperature margin.
[0034]
[0035] Table 1
[0036] Among them, TAT (Thermal Analysis Tool) means thermal analysis tool, TAT+3D means the combination of thermal analysis tool and 3D modeling, BurnInTest means a test software. Tj means crystallization temperature, and Tjmax means maximum crystallization temperature.
[0037] In view of this, a method is needed to set the power limit of the central processor according to the ambient temperature so that the central processor can release stronger performance.
[0038] According to an embodiment of the present invention, an embodiment of a method for setting a power limit is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0039] In this embodiment, a power limit setting method is provided, which is applied to a basic input and output system of a server; the basic input and output system is connected to a central processing unit; and an ambient temperature sensor is arranged inside the server. Figure 1 is a flow chart of a method for setting a power limit according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0040] Step S101, reading the value of the ambient temperature sensor.
[0041] The ambient temperature of the central processing unit can be obtained by sending a command to the ambient temperature sensor.
[0042] Setting an ambient temperature sensor in the server can detect the ambient temperature of the server and the fan speed control design. Combine the ambient temperature sensor with the setting of the power limit of the CPU. When the ambient temperature is high, the power limit of the CPU can be lowered to ensure that the temperature of the CPU meets the server specifications. When the ambient temperature is low, the power limit of the CPU can be increased to ensure that the CPU can release stronger performance.
[0043] Step S102, obtaining basic information of the central processing unit, and setting a power limit value of the central processing unit based on the basic information and the value of the ambient temperature sensor.
[0044] The basic information of the CPU may include the number of cores, number of threads, main frequency, etc. of the CPU. It may also include the actual usage scenario of the CPU, etc. Wherein, when the number of cores of the CPU is large, a larger power limit value may be set, and when the number of cores of the CPU is small, a smaller power limit value may be set.
[0045] When the indoor ambient temperature is high, the CPU is prone to heat up, and the power of the cooling system in the server needs to be increased to keep the CPU at a suitable operating temperature. Therefore, when the indoor ambient temperature is high, a smaller CPU power limit can be set. When the indoor ambient temperature is low, a larger CPU power limit can be set to better release the performance of the CPU.
[0046] In an actual application, the CPU is in a high temperature state, triggering the server's frequency reduction protection mechanism. The power limit of the CPU needs to be lowered to reduce the impact on the server.
[0047] In some optional implementations, several CPU power limit values may be set according to the basic information of the CPU, and then the CPU power limit value of the corresponding value may be set according to the value of the ambient temperature sensor.
[0048] In a practical application, the long-term power limit of the CPU at different ambient temperatures is as follows: Figure 2 As shown in the figure, when the values of the ambient temperature sensor are 25℃, 28℃, 31℃ and 35℃, the long-term power limit of the CPU is set to 140W, 135W, 130W and 125W respectively. That is, when the ambient temperature is less than or equal to 25℃, the long-term power limit of the CPU is set to 140W; when the ambient temperature is greater than 25℃ and less than or equal to 28℃, the long-term power limit of the CPU is set to 135W; when the ambient temperature is greater than 28℃ and less than or equal to 31℃, the long-term power limit of the CPU is set to 130W; when the ambient temperature is greater than 31℃, the long-term power limit of the CPU is set to 125W.
[0049] Step S103, updating the value of the ambient temperature sensor, and adjusting the power limit of the central processing unit based on the updated value.
[0050] The update frequency can be set, and the value of the ambient temperature sensor is read and updated according to the update frequency, and then the power limit of the central processor is adjusted according to the updated value and the basic information of the central processor. The update frequency can be set by the staff according to the actual situation.
[0051] The power limit setting method provided in this embodiment obtains the value of the ambient temperature sensor and the basic information of the central processor to set the power limit of the central processor. The corresponding power limit can be set according to the ambient temperature of the server, thereby improving energy efficiency.
[0052] In this embodiment, a power limit setting method is provided, which is applied to a basic input and output system of a server; the basic input and output system is connected to a central processing unit; an ambient temperature sensor is arranged inside the server; Figure 3 is a flow chart of a method for setting a power limit according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:
[0053] Step S201, reading the value of the ambient temperature sensor.
[0054] For details, please see Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0055] Step S202, obtaining basic information of the central processing unit, and setting a power limit value of the central processing unit based on the basic information and the value of the ambient temperature sensor.
[0056] For details, please see Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0057] In some optional implementations, the above step S202 includes:
[0058] Step S2021, reading the identification information of the central processing unit to determine the model information of the central processing unit.
[0059] Among them, a corresponding instruction can be sent to the central processing unit to read the manufacturer information, function information, etc. of the central processing unit, so as to determine the model information of the central processing unit.
[0060] Step S2022, based on the model information, obtain basic information of the central processing unit.
[0061] According to the model information of the CPU, you can get the basic information of the CPU through the relevant website.
[0062] In some optional implementations, instructions may be directly sent to the central processing unit to read basic information of the central processing unit.
[0063] By reading the identification information of the CPU, the model of the CPU is determined, thereby obtaining its basic information. Different power limits can be set according to the model of the CPU to improve energy efficiency.
[0064] In some optional implementations, the basic information of the central processing unit includes at least one of main frequency, multiplier, external frequency, core and thread.
[0065] The basic information includes at least one of the main frequency, multiplier, external frequency, core and thread, which can intuitively evaluate the power limit of the central processing unit under the standard ambient temperature.
[0066] Step S2023, setting the power limit of the central processing unit based on the basic information and the value of the ambient temperature sensor.
[0067] When the basic information includes the number of cores of the central processing unit, a larger power limit value may be set when the number of cores of the central processing unit is large, and a smaller power limit value may be set when the number of cores of the central processing unit is small.
[0068] In some optional implementations, corresponding scoring criteria and weights can be set for basic information and ambient temperature, and then the scores of the CPU on basic information and ambient temperature can be obtained according to the actual situation, and then the power score of the CPU can be calculated according to the weights. Based on the power score, the power limit is set. In an actual application, the scoring criteria and weights can be set directly by the staff.
[0069] In some optional implementations, the above step S2023 includes:
[0070] Step b1: determining the setting conditions of the power limit based on the basic information.
[0071] Among them, based on the basic information of the central processing unit, the thermal design power consumption of the central processing unit can be obtained, so as to determine the setting conditions of the power limit.
[0072] In some optional implementations, the setting conditions may include the power limit of the CPU in the actual operation scenario. When the CPU is used for daily office work, the power limit of the CPU can be appropriately lowered to achieve energy saving. When the CPU is used for gaming, the power limit of the CPU needs to be increased to prevent frequency reduction due to insufficient power supply.
[0073] In some optional implementations, the set condition includes at least one of a heat dissipation condition of the central processing unit and a noise condition of the central processing unit.
[0074] The setting conditions include the heat dissipation conditions of the CPU, which can prevent the power limit of the CPU from being too large, affecting the normal heat dissipation of the CPU, and can also prevent the power limit of the CPU from being too small, affecting the performance release of the CPU.
[0075] When the power of the CPU is high, the noise of the CPU is high. Therefore, when the noise requirement for the CPU is high, a smaller power limit can be set to prevent the CPU noise from being too loud and affecting the user experience of the server.
[0076] When the set condition includes at least one of the heat dissipation condition of the central processing unit and the noise condition of the central processing unit, the power limit of the central processing unit is set in real time under different ambient temperatures according to the value of the ambient temperature sensor, so that the central processing unit can release stronger performance when the set conditions are met.
[0077] Step b2, setting the power limit of the central processing unit based on the set conditions and the value of the ambient temperature sensor.
[0078] Among them, several power limit gears of the central processing unit can be set according to the set conditions, and then according to the value of the ambient temperature sensor, the corresponding power limit gear is selected to complete the setting of the power limit of the central processing unit.
[0079] In some optional implementations, when the value of the ambient temperature sensor is at a critical value of the power limit gear, the power limit of the central processing unit may be set to a power limit corresponding to a higher temperature.
[0080] In an actual application, when the ambient temperature is less than or equal to 25°C, the long-term power limit of the CPU is set to 140W; when the ambient temperature is greater than 25°C and less than or equal to 28°C, the long-term power limit of the CPU is set to 135W. When the value of the ambient temperature sensor is 25°C, the long-term power limit of the CPU is set to 135W.
[0081] In some optional implementations, a temperature delay may be set when setting the power limit level.
[0082] In an actual application, the temperature delay is 1°C; when the ambient temperature is less than or equal to 25°C, the long-term power limit of the CPU is set to 140W; when the ambient temperature is greater than 25°C and less than or equal to 28°C, the long-term power limit of the CPU is set to 135W; when the ambient temperature is greater than 28°C and less than or equal to 31°C, the long-term power limit of the CPU is set to 130W; when the ambient temperature is greater than 31°C, the long-term power limit of the CPU is set to 125W. When the ambient temperature rises from 24°C to 25°C, the long-term power limit of the CPU remains at 140W, and switches to 135W when the ambient temperature continues to rise to 26°C. When the ambient temperature drops from 26°C to 25°C, the long-term power limit of the CPU remains at 135W, and switches to 140W when the ambient temperature continues to drop to 24°C.
[0083] Based on the basic information, the setting conditions of the power limit are determined, and then the power limit of the central processor is set according to the ambient temperature. This can improve the utilization rate of energy.
[0084] Step S203, updating the value of the ambient temperature sensor, and adjusting the power limit of the central processing unit based on the updated value.
[0085] Specifically, the above step S203 includes:
[0086] Step S2031, determining the ambient temperature difference of the CPU based on the updated value.
[0087] The current ambient temperature of the central processing unit can be obtained based on the updated value, and the ambient temperature difference of the central processing unit can be obtained by subtracting the current ambient temperature of the central processing unit from the ambient temperature before the value is updated.
[0088] Step S2032: When the ambient temperature difference is greater than the first threshold, adjust the power limit of the central processing unit.
[0089] When the ambient temperature difference is greater than the first threshold, it indicates that the ambient temperature has actually changed, and the power limit of the central processing unit can be adjusted based on the updated value.
[0090] The first threshold value can be set by the staff according to the actual situation. In an actual application, the first threshold value is 1 degree Celsius.
[0091] Step S2033: When the ambient temperature difference is less than the first threshold, the power limit of the central processing unit is maintained.
[0092] After each adjustment of the power limit of the CPU, it takes time for the heat generation and heat dissipation of the CPU to reach a balance. When the ambient temperature difference is less than the first threshold, it is possible that the heat generation and heat dissipation of the CPU are not balanced, which affects the reading of the ambient temperature sensor. Therefore, the power limit of the CPU can be kept unchanged to avoid frequent adjustments, thereby affecting the stability of the server.
[0093] In some optional implementations, the above step S203 further includes:
[0094] Step c1, obtaining the number of times the power limit is adjusted within a specified time period.
[0095] The detection and monitoring module can be set to increase the variable of the counter by one each time the power is adjusted within a specified time period, and the value of the counter is the number of times the power limit is adjusted within the specified time period. The number of times the power limit is adjusted can also be read through system logs, etc.
[0096] Step c2: if the number of times the power limit is adjusted is greater than the number threshold, and the updated value is used to lower the power limit of the central processing unit, then the power limit of the central processing unit is adjusted based on the updated value.
[0097] After the power limit of the CPU is increased, the CPU will heat up and even affect the ambient temperature, causing the ambient temperature sensor reading to rise. Then the power limit of the CPU is adjusted down. This situation can be avoided by setting a times threshold and lowering the power limit when the number of adjustments is greater than the times threshold. This improves the accuracy of power limit adjustment.
[0098] By obtaining the number of times the power limit is adjusted and lowering the power limit of the CPU when the number of times is greater than the threshold, it is possible to prevent the ambient temperature from rising due to the increase in the power limit, thereby preventing the power limit setting from being affected.
[0099] The power limit setting method provided in this embodiment determines the ambient temperature difference of the central processing unit based on the updated value, compares the ambient temperature difference with the first threshold, and adjusts the power limit of the central processing unit based on the comparison result, which can avoid frequent switching and hardware wear.
[0100] In a practical application, a long-term power limit setting, such as Figure 4 As shown, during the POST (Power-On Self-Test) process, the BIOS (Basic Input / Output System) identifies the CPU through the CPU information, and then passes the CPU model information to the EC (Embedded Controller). The ambient temperature sensor passes the collected temperature to the EC. The EC combines the CPU model information and the real-time reading of the ambient temperature sensor, and determines the PL1 setting value of the CPU at the ambient temperature according to the "PL1 setting table of ambient temperature and different signal CPUs". The EC outputs the PL1 setting value to the PL1 register of the CPU. Among them, PL1 represents the long-term power limit of the CPU.
[0101] Among them, in a practical application, the ambient temperature and PL1 setting table of different signal central processors are shown in Table 2:
[0102]
[0103] Table 2
[0104] In the table, A, B, C, and D represent four gears, Ta represents the reading of the ambient temperature sensor, where A gear indicates that the ambient temperature sensor is less than 25°C; B gear indicates that the ambient temperature sensor reading is greater than 25°C and less than or equal to 28°C; C gear indicates that the ambient temperature sensor reading is greater than 28°C and less than or equal to 31°C; D gear indicates that the ambient temperature sensor reading is greater than 31°C. "AAA", "BBB", "CCC", and "ZZZ" all represent different CPU types.
[0105] In this embodiment, a power limit setting device is also provided, which is used to implement the above embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0106] This embodiment provides a power limit setting device, such as Figure 5 As shown, including:
[0107] The reading module 301 is used to read the value of the ambient temperature sensor;
[0108] The setting module 302 is used to obtain basic information of the central processing unit and set the power limit of the central processing unit based on the basic information and the value of the ambient temperature sensor;
[0109] The updating module 303 is used to update the value of the ambient temperature sensor and adjust the power limit of the central processing unit based on the updated value.
[0110] In some optional implementations, the setting module 302 includes:
[0111] A model determination unit, used for reading the identification information of the central processing unit to determine the model information of the central processing unit;
[0112] The information acquisition unit is used to acquire basic information of the central processing unit based on the model information.
[0113] In some optional implementations, the basic information of the central processing unit includes at least one of main frequency, multiplier, external frequency, core and thread.
[0114] In some optional implementations, the setting module 302 includes:
[0115] The condition determination unit is used to determine the setting condition of the power limit value based on the basic information.
[0116] The limit setting unit is used to set the power limit of the central processing unit based on the set conditions and the value of the ambient temperature sensor.
[0117] In some optional implementations, the set condition includes at least one of a heat dissipation condition of the central processing unit and a noise condition of the central processing unit.
[0118] In some optional implementations, the updating module 303 includes:
[0119] The temperature difference determination unit is used to determine the ambient temperature difference of the central processing unit based on the updated value.
[0120] A limit adjustment unit, configured to adjust a power limit of the central processing unit when the ambient temperature difference is greater than a first threshold value;
[0121] The limit maintaining unit is used to maintain the power limit of the central processing unit when the ambient temperature difference is less than the first threshold.
[0122] In some optional implementations, the updating module 303 includes:
[0123] The number acquisition unit is used to obtain the number of times the power limit is adjusted within a specified time period.
[0124] The times comparison unit is used to adjust the power limit of the central processing unit based on the updated value if the times of adjusting the power limit are greater than the times threshold and the updated value is used to lower the power limit of the central processing unit.
[0125] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0126] The power limit setting device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0127] The embodiment of the present invention also provides a computer device having the above Figure 5 The power limit setting device shown.
[0128] See also Figure 6 , Figure 6 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 6As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.
[0129] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated 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, a general purpose array logic or any combination thereof.
[0130] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0131] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0132] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0133] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 6 The example of connecting through bus is taken in the following.
[0134] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.
[0135] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or 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 a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0136] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0137] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for setting a power limit, characterized in that: The method is applied to a basic input / output system of a server; the basic input / output system is connected to a central processing unit; an ambient temperature sensor is arranged inside the server; the method comprises: Reading the value of the ambient temperature sensor; Acquire basic information of the central processing unit, and set a power limit value of the central processing unit based on the basic information and a value of the ambient temperature sensor; The value of the ambient temperature sensor is updated, and based on the updated value, the power limit of the central processing unit is adjusted.
2. The method according to claim 1, characterized in that: The obtaining of basic information of the central processing unit includes: Reading the identification information of the central processing unit to determine the model information of the central processing unit; Based on the model information, basic information of the central processing unit is obtained.
3. The method according to claim 2, characterized in that The basic information of the central processing unit includes at least one of main frequency, multiplier, external frequency, core and thread.
4. The method according to any one of claims 1 to 3, characterized in that: The step of setting the power limit of the central processing unit based on the basic information and the value of the ambient temperature sensor includes: Based on the basic information, determining a setting condition of the power limit; The power limit value of the central processing unit is set based on the set condition and the value of the ambient temperature sensor.
5. The method according to claim 4, characterized in that The setting condition includes at least one of a heat dissipation condition of the central processing unit and a noise condition of the central processing unit.
6. The method according to any one of claims 1 to 3, characterized in that: The adjusting the power limit of the central processing unit based on the updated value includes: Determining an ambient temperature difference of the central processing unit based on the updated value; When the ambient temperature difference is greater than a first threshold, adjusting the power limit of the central processing unit; When the ambient temperature difference is less than a first threshold, the power limit of the central processing unit is maintained.
7. The method according to any one of claims 1 to 3, characterized in that: The adjusting the power limit of the central processing unit based on the updated value includes: Get the number of times the power limit is adjusted within a specified time period; If the number of times the power limit is adjusted is greater than the number threshold, and the updated value is used to lower the power limit of the central processing unit, the power limit of the central processing unit is adjusted based on the updated value.
8. A power limit setting device, characterized in that: The device comprises: Reading module, used to read the value of the ambient temperature sensor; A setting module, used for acquiring basic information of a central processing unit, and setting a power limit value of the central processing unit based on the basic information and a value of the ambient temperature sensor; The updating module is used to update the value of the ambient temperature sensor and adjust the power limit of the central processing unit based on the updated value.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes a power limit setting method according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute a power limit setting method according to any one of claims 1 to 7.