Server limit power consumption determination method, server control method, device and medium
By combining server hardware information and historical power consumption data, using power consumption correction formulas for processor, memory and power supply, the problem of low extreme power consumption accuracy in traditional methods is solved, and more accurate power consumption management and flexible control are achieved to adapt to complex computing loads and heterogeneous hardware architectures.
Patent Information
- Application Number
- CN202510774566.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2045-06-11
AI Technical Summary
Traditional server extreme power consumption determination methods fail to consider differences between different servers, resulting in low accuracy of determined extreme power consumption and difficult to meet the power consumption management needs of complex computing loads and heterogeneous hardware architectures.
By determining the ultimate power consumption of each hardware based on the hardware information of multiple target hardware of the target server, and combining the historical power consumption of the server of the same model, the ultimate power consumption of the target server under different task types is determined. The specific power consumption correction formula for processor, memory and power supply is used to improve the accuracy and flexibility of the ultimate power consumption.
It improves the accuracy and flexibility of server power consumption, enables more precise power consumption control, adapts to different task loads and hardware heterogeneous environments, and reduces operating costs and environmental impacts.
Smart Images

Figure CN120295847B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of server technology, and more specifically to a method for determining a server's power consumption limit, a server control method, a device, and a medium. Background Art
[0002] With the rapid development of technologies such as cloud computing, big data analysis, and artificial intelligence, the number of servers and processing power in data centers have grown exponentially, and server power consumption has become an important component of operating costs. Server power consumption management not only directly affects the power consumption and operating costs of data centers, but also has a significant impact on environmental sustainability.
[0003] Server power management typically requires controlling server power consumption based on its power limit. However, traditional methods for determining power limit rely primarily on empirical formulas and statistical analysis, failing to account for differences between servers. This results in low accuracy in the determined power limit. Summary of the Invention
[0004] In view of the above problems, the present application provides a method for determining a server's maximum power consumption, a server control method, a device, and a medium.
[0005] According to the first aspect of the present application, a method for determining the maximum power consumption of a server is provided, comprising: determining the hardware maximum power consumption of each of the multiple target hardware components of the target server based on the target hardware information of each of the multiple target hardware components; determining the first maximum power consumption of the target server when the multiple target hardware components operate at their respective hardware maximum power consumptions based on the multiple hardware maximum power consumptions; determining the second maximum power consumption of the target server when executing tasks of multiple task types respectively based on the historical power consumption of multiple servers having the same server model as the target server, wherein the historical power consumption represents the power consumption of the multiple servers when executing historical tasks.
[0006] The second aspect of the present application provides a server power consumption control method, characterized in that the method includes: in response to determining that the target server does not have a target task to be executed, using a first limit power consumption to control the power consumption of the target server; in response to determining that the target server has a target task to be executed, according to the target task type of the target task, from the second limit power consumption of the target server for each of multiple task types, determining the target limit power consumption corresponding to the target task type, and using the target limit power consumption to control the power consumption of the target server; wherein, the first limit power consumption and the second limit power consumption are determined by the server limit power consumption determination method.
[0007] The third aspect of the present application provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0008] The fourth aspect of the present application further provides a computer-readable storage medium having a computer program or instructions stored thereon, which implements the steps of the above method when the computer program or instructions are executed by a processor.
[0009] The fifth aspect of the present application further provides a computer program product, comprising a computer program or instructions, which implement the steps of the above method when executed by a processor.
[0010] According to an embodiment of the present application, by determining the first limit power consumption of the target server when multiple target hardware are running at their respective hardware limit power consumptions based on the target hardware information of the target server, the process of determining the first limit power consumption takes into account the actual hardware composition of the target server, thereby making the obtained first limit power consumption more closely matched with the target server. Furthermore, by determining the second limit power consumption of the target server when performing tasks of different types based on the historical power consumption of multiple servers of the same model when performing tasks, the impact of different task types on the server power consumption is taken into account, thereby improving the flexibility of the second limit power consumption and thereby improving the accuracy of power consumption control of the target server using the first and second limit power consumptions. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The above contents and other objects, features and advantages of the present application will become more apparent through the following description of the embodiments of the present application with reference to the accompanying drawings.
[0012] Figure 1 An application scenario diagram of a server limit power consumption determination method, a server control method, a device, and a medium according to an embodiment of the present application is shown.
[0013] Figure 2 A flow chart of a method for determining a server's power consumption limit according to an embodiment of the present application is shown.
[0014] Figure 3 A flow chart for determining a first limit power consumption according to an embodiment of the present application is shown.
[0015] Figure 4 A flowchart for determining target hardware information according to an embodiment of the present application is shown.
[0016] Figure 5 A flow chart for determining the second limit power consumption according to an embodiment of the present application is shown.
[0017] Figure 6 A flow chart of a server control method according to an embodiment of the present application is shown.
[0018] Figure 7 A structural block diagram of a device for determining a server power consumption limit according to an embodiment of the present application is shown.
[0019] Figure 8 The figure shows a structural block diagram of a server control device according to an embodiment of the present application.
[0020] Figure 9 A block diagram of an electronic device suitable for implementing a method for determining a server's power consumption limit according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0021] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present application. In the detailed description below, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present application. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessarily confusing the concepts of the present application.
[0022] The terms used herein are only for describing specific embodiments and are not intended to limit this application. The terms "comprise," "include," etc. used herein indicate the presence of the features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0023] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0024] When expressions such as "at least one of A, B, and C, etc." are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0025] In scenarios such as data centers, cloud computing, and edge computing, server power management is a core technology for ensuring system performance, energy efficiency, and reliability. Power management typically relies on static thresholds (such as fixed upper and lower power limits) or rule-based empirical approaches (for example, linearly adjusting power consumption based on CPU and memory utilization). However, with the increasing complexity of computing workloads (such as model training, real-time analytics, and high-concurrency requests), the heterogeneity of hardware architectures (mixed deployment of CPUs and GPUs), and the increasing urgency of cooling and green power requirements, traditional power management solutions based on static thresholds or empirical rules are no longer able to meet actual needs.
[0026] An embodiment of the present application provides a method for determining a server's limit power consumption, which determines the hardware limit power consumption of each of the multiple target hardware components of the target server based on the target hardware information of each of the multiple target hardware components; determines the first limit power consumption of the target server when the multiple target hardware components are running at their respective hardware limit power consumptions based on the multiple hardware limit power consumptions; and determines the second limit power consumption of the target server when executing tasks of multiple task types based on the historical power consumption of multiple servers of the same server model as the target server, wherein the historical power consumption represents the power consumption of the multiple servers when executing historical tasks. The embodiment of the present application uses the hardware information of the server and the power consumption of the same model server executing historical tasks, so that the obtained first limit power consumption and second limit power consumption can take into account the power consumption differences between servers and between different task types, thereby improving the accuracy of the determined limit power consumption.
[0027] Figure 1 An application scenario diagram of a server limit power consumption determination method, a server control method, a device, and a medium according to an embodiment of the present application is shown.
[0028] like Figure 1 As shown, the application scenario according to this embodiment may include a target server 110 and a control server 120 .
[0029] The target server 110 may be a server that provides various services, such as a backend management server that supports websites browsed by users (for example only). The backend management server may analyze and process received data such as user requests, and feed back the processing results (e.g., web pages, information, or data obtained or generated based on user requests) to the terminal device.
[0030] The control server 120 may be a server for providing power consumption control services, for example, determining the limit power consumption of the target server 110 and controlling the power consumption of the target server 110 according to the limit power consumption.
[0031] It should be noted that the server limit power consumption determination method provided in the embodiment of the present application can generally be executed by the control server 120. Accordingly, the server limit power consumption determination device provided in the embodiment of the present application can generally be set in the control server 120. The server limit power consumption determination method provided in the embodiment of the present application can also be executed by a server or server cluster that is different from the control server 120 and can communicate with the target server 110 and / or the control server 120. Accordingly, the server limit power consumption determination device provided in the embodiment of the present application can also be set in a server or server cluster that is different from the control server 120 and can communicate with the target server 110 and / or the control server 120.
[0032] It should be understood that Figure 1 The number of target servers and control servers in the embodiment is only for illustration. Any number of target servers and control servers may be provided according to implementation requirements.
[0033] The following will be based on Figure 1 The scene described by Figures 2 to 5 The method for determining the server power consumption limit of the embodiment of the application is described in detail.
[0034] Figure 2 A flow chart of a method for determining a server's power consumption limit according to an embodiment of the present application is shown.
[0035] like Figure 2 As shown, the method for determining the server power consumption limit of this embodiment includes operations S210 to S230.
[0036] In operation S210 , hardware limit power consumption of each of the plurality of target hardware items of the target server is determined based on target hardware information of each of the plurality of target hardware items.
[0037] The target server may be a newly added server in the data center. In response to the newly added target server in the data center, the control server of the data center may determine the limit power consumption of the target server and control the power consumption of the target server using the limit power consumption.
[0038] The target hardware may be the hardware in the target server that generates power consumption. The target hardware information may include parameters such as the target hardware model and basic power consumption. For example, the control server may interact with the target server through an interface of the target server to obtain the target hardware information.
[0039] When determining the hardware power consumption limit of the target hardware, the base power consumption of the target hardware may be adjusted based on the hardware information related to power consumption of the target hardware to determine the hardware power consumption limit of the target hardware. For example, the hardware power consumption limit may include an upper power consumption limit and a lower power consumption limit of the target hardware.
[0040] In operation S220 , a first limit power consumption of a target server is determined based on the plurality of hardware limit power consumptions when the plurality of target hardware operate at the respective hardware limit power consumptions.
[0041] The first power consumption limit of the target server may include an upper power consumption limit and a lower power consumption limit of the target server. For example, the upper power consumption limit of the target server may be determined based on the upper power consumption limits of the plurality of target hardware components, and the lower power consumption limit of the target server may be determined based on the lower power consumption limits of the plurality of target hardware components.
[0042] In operation S230 , second limit power consumptions of the target server when executing tasks of multiple task types are determined based on historical power consumptions of multiple servers having the same server model as the target server.
[0043] Since the same server generates different power consumption when executing tasks of different task types, the limit power consumption corresponding to different task types can be determined so that when the target server executes the task, the power consumption of the target server can be controlled according to the limit power consumption corresponding to the task type.
[0044] Since the target server may be a newly added server in the data center and has not yet executed any tasks, the historical power consumption of multiple servers of the same model can be used as a reference to determine the second limit power consumption of the target server when executing the task. The historical power consumption represents the power consumption of multiple servers when executing historical tasks.
[0045] When determining the second limit power consumption, statistics can be collected on multiple historical power consumptions of the same task type to determine the historical limit power consumption among the multiple historical power consumptions, and then the second limit power consumption of the target server when executing the task of the task type is determined based on the historical limit power consumption.
[0046] According to an embodiment of the present application, by determining the first limit power consumption of the target server when multiple target hardware are running at their respective hardware limit power consumptions based on the target hardware information of the target server, the process of determining the first limit power consumption takes into account the actual hardware composition of the target server, thereby making the obtained first limit power consumption more closely matched with the target server. Furthermore, by determining the second limit power consumption of the target server when performing tasks of different types based on the historical power consumption of multiple servers of the same model when performing tasks, the impact of different task types on the server power consumption is taken into account, thereby improving the flexibility of the second limit power consumption and thereby improving the accuracy of power consumption control of the target server using the first and second limit power consumptions.
[0047] According to an embodiment of the present application, the hardware limit power consumption of each of the multiple target hardwares of the target server is determined based on the target hardware information of each of the multiple target hardwares, including: using hardware information keywords to obtain multiple target hardware information; based on processor information, memory information and power supply information, determining the processor limit power consumption corresponding to the processor information, the memory limit power consumption corresponding to the memory information and the power supply limit power consumption corresponding to the power supply information.
[0048] Because only part of the target server's hardware information is relevant to determining power consumption, multiple hardware information keywords can be pre-set and used to filter out the target hardware information from the large amount of hardware information on the target server. The target hardware information includes processor information, memory information, and power supply information. The hardware information keywords can be keywords for hardware attributes.
[0049] When determining the processor limit power consumption, memory limit power consumption and power supply limit power consumption, the processor information, memory information and power supply information can be input into a preset power consumption determination model to obtain the processor limit power consumption, memory limit power consumption and power supply limit power consumption.
[0050] According to an embodiment of the present application, by determining the processor limit power consumption, memory limit power consumption and power limit power consumption respectively based on processor information, memory information and power supply information, the process of determining the limit power consumption of the target server is refined into the process of determining the limit power consumption of the target hardware, thereby improving the accuracy of determining the first limit power consumption.
[0051] According to an embodiment of the present application, the processor limit power consumption includes the processor upper limit power consumption and the processor lower limit power consumption, and determining the processor limit power consumption corresponding to the processor information includes: determining a first processor power consumption correction value based on the ratio of the processor base frequency and the processor limit frequency; determining a second processor power consumption correction value based on the number of processor cores and a preset core power consumption coefficient; determining a third processor power consumption correction value based on the number of processor threads and a preset thread power consumption coefficient; determining the processor upper limit power consumption based on the processor base power consumption, the first processor power consumption correction value, the second processor power consumption correction value, the third processor power consumption correction value and the preset compensation power consumption; and determining the processor base power consumption as the processor lower limit power consumption.
[0052] Since the processor base power consumption is usually the power consumption of the processor under normal load conditions, it is necessary to correct the processor base power consumption according to the processor limit frequency, the number of processor cores and the number of processing threads to obtain the processor's limit power consumption under extreme load conditions.
[0053] The first processor power consumption correction value represents the impact of the processor on the processor power consumption when the processor runs at the processor limit frequency. The first processor power consumption correction value can be determined by the following formula (1):
[0054] (1);
[0055] in, is the power consumption correction value of the first processor, is the processor limit frequency, is the processor base frequency.
[0056] The second processor power consumption correction value represents the impact on the processor power consumption when multiple cores of the processor are in the running state. The second processor power consumption correction value can be determined by the following formula (2):
[0057] (2);
[0058] in, is the power consumption correction value of the second processor, is the core power consumption coefficient, is the number of processor cores, The number of base cores is typically the same as the number of processor cores. In some embodiments, since each core increases power consumption by 2% to 5%, the core power consumption factor can typically be 0.02 to 0.05.
[0059] The third processor power consumption correction value represents the impact of the processor on the processor power consumption when the processor concurrently processes multiple threads. The third processor power consumption correction value can be determined by the following formula (3):
[0060] (3);
[0061] in, is the power consumption correction value of the third processor, is the thread power consumption coefficient, = is the number of processor threads. Since each logical thread adds 1W to 3W of power, the thread power factor can usually be 1.5 and is negligible when the physical core is fully loaded.
[0062] The upper limit power consumption of the processor can be obtained by correcting the basic power consumption of the processor according to the first processor power consumption correction value, the second processor power consumption correction value, and the third processor power consumption correction value. The upper limit power consumption of the processor can be determined by the following formula (4):
[0063] Pmax1= TDP×Kfreq1×Kcore+Pthread+ΔPoffset (4);
[0064] Where TDP is the processor's base power consumption, Pmax1 is the processor's upper power consumption limit, and ΔPoffset is the offset power consumption. The offset power consumption can be 20W or determined based on actual power consumption fluctuations.
[0065] According to an embodiment of the present application, by utilizing hardware information that affects processor power consumption, such as the number of processor cores, the number of processor threads, and the processor frequency, the upper and lower limits of processor power consumption are determined, thereby improving the accuracy of the determined processor power consumption limit.
[0066] According to an embodiment of the present application, the memory limit power consumption includes the memory upper limit power consumption and the memory lower limit power consumption, and the memory limit power consumption corresponding to the memory information is determined, including: determining the memory dynamic power consumption based on the number of memory blocks, the memory basic frequency, the memory limit frequency, and the memory power consumption coefficient corresponding to the memory type; determining the memory static power consumption as the memory lower limit power consumption based on the memory capacity, the memory basic voltage, and the capacity power consumption coefficient for the memory type; determining the memory upper limit power consumption based on the memory dynamic power consumption, the memory static power consumption, and the module power consumption corresponding to the memory module type.
[0067] Memory dynamic power consumption can be the power consumption when the memory performs read and write operations at the limit frequency. Memory dynamic power consumption can be determined by the following formula (5):
[0068] (5);
[0069] in, is the memory dynamic power consumption, is the number of memory blocks, q is the memory power consumption coefficient, is the memory base frequency, The memory frequency limit.
[0070] In some embodiments, when the memory type is DDR4 (Double-Data-Rate Fourth Generation Synchronous Dynamic Random Access Memory), the memory power consumption coefficient may be 2W; when the memory type is DDR5 (Double-Data-Rate Fifth Generation Synchronous Dynamic Random Access Memory), the memory power consumption coefficient may be 1.8W.
[0071] In an embodiment of the present application, the memory static power consumption may be the power consumption when the memory is in an idle state and no read or write operations are performed. The memory static power consumption may be determined by the following formula (6):
[0072] (6);
[0073] in, is the static power consumption of the memory, is the capacity power consumption coefficient, is the memory capacity, The base voltage of the memory.
[0074] In some embodiments, module power consumption is related to the memory module type. For example, if the memory module type is an unbuffered dual inline memory module (UDIMM), the module power consumption can be 0; if the memory module type is a registered dual inline memory module (RDIMM), the module power consumption can be 2W; and if the memory module type is a load-reduced dual inline memory module (LRDIMM), the module power consumption can be 3W.
[0075] In an embodiment of the present application, the upper limit power consumption of the memory can be determined by the following formula (7):
[0076] (7);
[0077] in, is the upper limit of memory power consumption, is the memory dynamic power consumption, The power consumption of the module.
[0078] According to an embodiment of the present application, by dividing memory power consumption into memory static power consumption, memory dynamic power consumption and module power consumption, the accuracy of the determined memory limit power consumption is improved.
[0079] According to an embodiment of the present application, the power supply limit power consumption includes the power supply upper limit power consumption and the power supply lower limit power consumption. Determining the power supply limit power consumption corresponding to the power supply information includes: determining the power supply upper limit power consumption based on the power supply upper limit power, a first power supply power consumption correction value corresponding to the power supply temperature, and a second power supply power consumption correction value corresponding to the power supply status; determining the power supply lower limit power consumption based on the power supply upper limit power and a preset power consumption coefficient.
[0080] According to an embodiment of the present application, the first power consumption correction value represents the influence of the power supply temperature on the power consumption of the power supply. The first power consumption correction value can be determined by the following formula (8):
[0081] (8);
[0082] in, is the first power consumption correction value, Tbase is usually set to 40 degrees, k is the derating slope, usually 0.01, and T is the power supply temperature.
[0083] The second power consumption correction value represents the influence of the power state on the power consumption. When the power state is a healthy state, an alarm state, and a dangerous state, the second power consumption correction value may be 1, 0.8, and 0, respectively.
[0084] In an embodiment of the present application, the upper limit power consumption of the power supply can be determined by the following formula (9):
[0085] (9);
[0086] in, is the upper limit of power consumption, is the second power consumption correction value, The upper limit of the power supply.
[0087] In the embodiment of the present application, the lower power consumption limit of the power supply can be determined by the following formula (10):
[0088] (10);
[0089] in, is the lower limit power consumption of the power supply, and n is the preset power consumption coefficient, which is usually 0.2.
[0090] According to an embodiment of the present application, the accuracy of the power supply limit power consumption is improved by determining the power supply in consideration of the power supply status.
[0091] Figure 3 A flow chart for determining a first limit power consumption according to an embodiment of the present application is shown.
[0092] like Figure 3 As shown, determining the first limit power consumption includes operations S310 to S350.
[0093] In operation S310, processor information, memory information, and power supply information are obtained. In operation S320, a memory power consumption limit is determined. In operation S330, a processor power consumption limit is determined. In operation S340, a power supply power consumption limit is determined. In operation S350, a first power consumption limit is determined.
[0094] According to an embodiment of the present application, hardware information keywords are used to obtain multiple target hardware information, including: using hardware information keywords to retrieve hardware information that matches the hardware information keywords in the hardware information set of the target server to obtain a first matching result; when the first matching result indicates that the hardware information set does not include hardware information that matches the hardware information keyword, similarity matching is performed in the hardware information set based on the similarity between the hardware information keyword and the hardware information in the hardware information set to obtain a second matching result.
[0095] When the target hardware information is acquired by using the hardware information keyword, the hardware information keyword may be sent to an interface of each target hardware to acquire the corresponding target hardware information.
[0096] When obtaining target hardware information, since the hardware information fields of different types of servers are different, the target hardware information can be obtained first through exact matching. If the exact matching does not obtain the corresponding target hardware information, it can be obtained through similarity matching.
[0097] When performing similarity matching, regular matching and the longest common substring ratio model can be used to determine the similarity between the hardware information keyword and the hardware information, and the hardware information whose similarity with the hardware information keyword is greater than a preset similarity threshold is determined as the target hardware information.
[0098] If the second matching result indicates that the hardware information set does not include hardware information similar to the hardware information keyword, it can be determined that the corresponding target hardware information cannot be obtained through the target hardware interface. In this case, the corresponding target hardware information can be obtained from the original equipment manufacturer information of the target hardware. For example, the hardware information keyword can be used to first perform an exact match in the original equipment manufacturer information, and then perform a similarity match.
[0099] After obtaining the target hardware information, the target hardware information may be formatted or processed so as to facilitate determining the power consumption limit using the target hardware information.
[0100] According to the embodiments of the present application, by using hardware information keywords for precise matching and similarity matching, the accuracy of the acquired target hardware information can be improved, thereby improving the accuracy of determining the limit power consumption.
[0101] Figure 4 A flowchart for determining target hardware information according to an embodiment of the present application is shown.
[0102] like Figure 4 As shown, determining target hardware information includes operations S410 to S440.
[0103] In operation S410, hardware information for each of the memory, processor, and power supply is obtained to obtain a hardware information set. In operation S420, hardware information matching the hardware information keyword is retrieved from the hardware information set to obtain a first matching result. In operation S430, based on the similarity between the hardware information keyword and the hardware information in the hardware information set, a similarity matching is performed within the hardware information set to obtain a second matching result. In operation S440, target hardware information is determined based on the first matching result and the second matching result.
[0104] According to an embodiment of the present application, based on the similarity between the hardware information keyword and the hardware information in the hardware information set, similarity matching is performed in the hardware information set to obtain a second matching result, including: for any hardware information, determining the maximum common substring of the hardware information and the hardware information keyword; based on the first string length of the hardware information, the second string length of the hardware information keyword and the third string length of the maximum common substring, determining the similarity between the hardware information keyword and the hardware information; based on the similarity between the hardware information keyword and each hardware information, determining the target hardware information from multiple hardware information.
[0105] The maximum common substring may be the longest continuous identical string between the hardware information and the hardware information keyword.
[0106] When determining the similarity between the hardware information and the hardware information keyword, the shorter string of the hardware information and the hardware information keyword can be determined based on the first string length and the second string length, and the similarity can be determined based on the ratio of the third string length to the string length of the shorter string.
[0107] For example, the hardware information is "CurrentFrequencyMHz", the hardware information keyword is "Frequency", the longest common substring is "Frequency", and the shorter string is the hardware information keyword. At this time, the similarity is the ratio of the length of the third string to the length of the second string, and the similarity between the hardware information and the hardware information keyword is 1.
[0108] According to an embodiment of the present application, the similarity between the hardware information and the hardware information keyword is determined by using the largest common substring of the hardware information and the hardware information keyword, thereby improving the accuracy of the similarity.
[0109] According to an embodiment of the present application, the first limit power consumption includes a first upper limit power consumption and a first lower limit power consumption. Based on multiple hardware limit power consumptions, the first limit power consumption of the target server is determined when multiple target hardware are running at their respective hardware limit power consumptions, including: determining the first upper limit power consumption based on the processor upper limit power consumption, the memory upper limit power consumption, and the power supply upper limit power consumption; determining the first lower limit power consumption based on the processor lower limit power consumption, the memory lower limit power consumption, and the power supply lower limit power consumption.
[0110] When determining the first upper limit power consumption, the sum of the processor upper limit power consumption, the memory upper limit power consumption, and the power supply upper limit power consumption can be determined as the first upper limit power consumption. Alternatively, the upper limit power consumption of other hardware can be added to the processor upper limit power consumption, the memory upper limit power consumption, and the power supply upper limit power consumption to obtain the first upper limit power consumption.
[0111] When determining the first lower power consumption limit, the sum of the processor lower power consumption limit, the memory lower power consumption limit, and the power supply lower power consumption limit can be determined as the first lower power consumption limit. Alternatively, the lower power consumption limits of other hardware can be added to the processor lower power consumption limit, the memory lower power consumption limit, and the power supply lower power consumption limit to obtain the first lower power consumption limit.
[0112] After determining the first upper power consumption limit and the first lower power consumption limit, the target server identifier, the first upper power consumption limit and the first lower power consumption limit of the target server can be stored in the power consumption control policy library to control the power consumption of the target server using the first upper power consumption limit and the first lower power consumption limit.
[0113] According to an embodiment of the present application, the first upper limit power consumption and the first lower limit power consumption of the target server are determined based on the upper limit power consumption and the lower limit power consumption of hardware such as the processor, memory and power supply, thereby improving the accuracy of the first upper limit power consumption and the first lower limit power consumption.
[0114] According to an embodiment of the present application, the method for determining the server limit power consumption also includes: determining a target power consumption range for the target server based on a first upper limit power consumption and a first lower limit power consumption; dividing the target power consumption range according to a preset ratio to obtain multiple power consumption sub-ranges, and the power consumption sub-ranges include a low power consumption sub-range and a normal power consumption sub-range.
[0115] When determining the target power consumption interval, the first lower power consumption limit may be determined as the minimum value of the target power consumption interval, and the first upper power consumption limit may be determined as the maximum value of the target power consumption interval.
[0116] When the target power consumption interval is divided according to a preset ratio, the length of each power consumption sub-interval can be determined based on the preset ratio and the length of the target power consumption interval, and then the specific range of each power consumption sub-interval can be determined based on the first upper limit value, the first lower limit value and the length of each power consumption sub-interval.
[0117] The low power consumption sub-interval can be used to control the power consumption of the target server when the target server is in a low load state to save energy. The normal power consumption sub-interval can be used to control the power consumption of the target server when the target server is in a normal load state.
[0118] The power consumption sub-interval may also include a high power consumption sub-interval. The high power consumption sub-interval may also be used to control the target server when the target server is in a high load state, such as when the target server needs to execute multiple tasks concurrently.
[0119] According to an embodiment of the present application, by further dividing the first limit power consumption into a normal power consumption sub-interval and a low power consumption sub-interval, a matching power consumption sub-interval can be determined according to the load status of the target server, thereby improving the flexibility of the limit power consumption and further improving the flexibility of power consumption control of the target server.
[0120] According to an embodiment of the present application, the second limit power consumption includes a second upper limit power consumption and a second lower limit power consumption for each of multiple task types. Based on the historical power consumption of multiple servers with the same server model as the target server, the second limit power consumption of the target server when performing tasks of multiple task types is determined, including: for any task type, obtaining multiple historical power consumption time series data for the task type; determining the second upper limit power consumption for the task type based on the historical power consumption upper limit value of each of the multiple historical power consumption time series data; determining the second lower limit power consumption for the task type based on the historical power consumption lower limit value of each of the multiple historical power consumption time series data.
[0121] Because the target server may have a second power consumption limit corresponding to each of multiple task types, the second power consumption limit of the target server when executing a task of that task type can be determined based on multiple historical power consumption time series data for that task type. For example, task types may include upgrade tasks, computing tasks, and stress testing tasks.
[0122] The historical power consumption time series data may be power consumption data of the server during the period of executing historical tasks. For example, the historical power consumption time series data may be a sequence of multiple historical power consumption data, each of which corresponds to a historical task execution time.
[0123] When determining the second upper power consumption limit, the average or maximum value of multiple historical power consumption upper limits can be determined as the second upper power consumption limit. When determining the second lower power consumption limit, the average or minimum value of multiple historical power consumption lower limits can be determined as the second lower power consumption limit.
[0124] After determining the second upper power consumption limit and the second lower power consumption limit, the fan speed for the target server can also be determined based on the fan speeds of multiple servers when executing historical tasks. For example, for any task type, multiple historical fan speed data can be obtained and used to determine a target fan speed corresponding to the task type, so that the target fan speed can be used to control the target server.
[0125] According to an embodiment of the present application, the flexibility of the second limit power consumption is improved by determining the second upper limit power consumption and the second lower limit power consumption for the target server based on the historical power consumption of multiple servers of the same model.
[0126] Figure 5 A flow chart for determining the second limit power consumption according to an embodiment of the present application is shown.
[0127] like Figure 5 As shown, determining the second limit power consumption includes operations S510 to S540.
[0128] In operation S510, multiple historical power consumptions of multiple servers of the same model are obtained. In operation S520, for any task type, multiple historical power consumption time series data for each task type is obtained from the historical power consumption. In operation S530, the historical power consumption time series data is parsed to obtain a historical power consumption upper limit value and a historical power consumption lower limit value. In operation S540, a second power consumption limit is determined based on the historical power consumption upper limit value and the historical power consumption lower limit value.
[0129] According to an embodiment of the present application, a server power consumption control method includes: determining whether a target server has a target task to be executed; in response to determining that the target server does not have a target task to be executed, controlling the power consumption of the target server using a first limit power consumption; in response to determining that the target server has a target task to be executed, determining a target limit power consumption corresponding to the target task type from the second limit power consumptions of the target server for each of a plurality of task types according to the target task type, and controlling the power consumption of the target server using the target limit power consumption.
[0130] When controlling the power consumption of the target server, the target server can be interacted with through its interface to obtain the task execution status of the target server, and then determine whether the target server has a target task to be executed according to the task execution status.
[0131] Since the first limit power consumption is the limit power consumption of the target server when multiple target hardware operate at their respective hardware limit power consumptions, it is universal. Therefore, when the target server has no target task to be executed, the first limit power consumption can be used to control the power consumption of the target server.
[0132] When controlling power consumption of a target server, the first limit power consumption or the target limit power consumption may be sent to a baseboard management controller of the target server, so that the baseboard management controller controls power consumption according to the first limit power consumption or the target limit power consumption.
[0133] According to an embodiment of the present application, when the target server does not have any tasks to be executed, the power consumption of the target server is controlled using the first limit power consumption, and when the target server has tasks to be executed, the power consumption of the target server is controlled according to the target limit power consumption corresponding to the target task type, thereby improving the flexibility of power consumption control of the target server.
[0134] According to an embodiment of the present application, for any task type, the power consumption timing data of the target server when executing a task of the task type is obtained; in response to determining that the power consumption limit value in the power consumption timing data exceeds the second limit power consumption for the task type, the second limit power consumption is modified based on the power consumption limit value.
[0135] Since the second power consumption limit is not determined based on the execution status of the target server, it may be inaccurate. After the target server is put into use, the second power consumption limit may be modified based on the power consumption data of the target server when executing tasks.
[0136] For example, the second power consumption limit of the upgrade task type is 400W~1200W, and the power consumption limit of the target server when executing the upgrade task is 1300W. In this case, the second power consumption limit can be modified to 400W~1300W.
[0137] According to an embodiment of the present application, the second limit power consumption is modified by utilizing the actual power consumption of the target server when executing a task, thereby further improving the accuracy of the second limit power consumption.
[0138] According to an embodiment of the present application, the first limit power consumption is divided into a low power consumption sub-interval and a normal power consumption sub-interval; the load of the target server in the first preset time period is lower than the load of the target server in the second preset time period; the first limit power consumption is used to control the power consumption of the target server, including: in response to the current moment being in the first preset time period, the low power consumption sub-interval is used to control the power consumption of the target server; in response to the current moment being in the second preset time period, the normal power consumption sub-interval is used to control the power consumption of the target server.
[0139] The first preset period may be a period when the target server has a low load and performs fewer tasks, so the target server can be controlled in a low power consumption sub-interval to save energy. The first preset period may be, for example, 0 to 6 o'clock.
[0140] Correspondingly, the second preset time period may be a time period when the target server is in a normal load state, for example, 7 to 24 hours.
[0141] According to an embodiment of the present application, the power consumption sub-interval corresponding to the current moment is used to control the power consumption of the target server, thereby further improving the flexibility of the power consumption control of the target server.
[0142] Figure 6 A flow chart of a server control method according to an embodiment of the present application is shown.
[0143] like Figure 6 As shown, the server control method includes operations S610 to S640.
[0144] In operation S610, the target server is monitored. In operation S620, in response to determining that the target server has a target task to be executed, a target power consumption limit corresponding to the target task type is determined based on the target task type. In operation S630, in response to determining that the target server does not have a target task to be executed, a power consumption subinterval corresponding to a preset time period corresponding to the current time is determined. In operation S640, power consumption control is performed on the target server.
[0145] Based on the above server limit power consumption determination method, the present application also provides a server limit power consumption determination device. Figure 7 The device is described in detail.
[0146] Figure 7 A structural block diagram of a device for determining a server power consumption limit according to an embodiment of the present application is shown.
[0147] like Figure 7 As shown, the apparatus 700 for determining the server power consumption limit of this embodiment includes a first determining module 710 , a second determining module 720 and a third determining module 730 .
[0148] The first determining module 710 is configured to determine the hardware power consumption limits of the target hardware according to the target hardware information of the target hardware. In one embodiment, the first determining module 710 may be configured to execute the operation S210 described above, which will not be described in detail here.
[0149] The second determining module 720 is configured to determine, based on the plurality of hardware limit power consumptions, a first limit power consumption of the target server when the plurality of target hardware components are operating at their respective hardware limit power consumptions. In one embodiment, the second determining module 720 may be configured to execute the operation S220 described above, which will not be described in detail herein.
[0150] The third determination module 730 is configured to determine, based on the historical power consumption of multiple servers of the same server model as the target server, a second limit power consumption of the target server when executing tasks of multiple task types, wherein the historical power consumption represents the power consumption of the multiple servers when executing the historical tasks. In one embodiment, the third determination module 730 may be configured to perform operation S230 described above, and will not be further described herein.
[0151] According to an embodiment of the present application, the first determination module 710 includes an information acquisition submodule and a hardware determination submodule.
[0152] The information acquisition submodule is used to obtain multiple target hardware information using hardware information keywords, and the target hardware information includes processor information, memory information and power supply information.
[0153] The hardware determination submodule is used to determine the processor limit power consumption corresponding to the processor information, the memory limit power consumption corresponding to the memory information, and the power supply limit power consumption corresponding to the power supply information based on the processor information, the memory information, and the power supply information.
[0154] According to an embodiment of the present application, the processor power consumption limit includes the processor upper power consumption limit and the processor lower power consumption limit. The hardware determination submodule includes a frequency determination unit, a core determination unit, a thread determination unit, a power consumption correction unit, and a processing lower limit determination unit.
[0155] The frequency determination unit is used to determine a first processor power consumption correction value based on a ratio of a processor base frequency to a processor limit frequency, where the first processor power consumption correction value represents an impact on the processor power consumption when the processor runs at the processor limit frequency.
[0156] The core determination unit is used to determine a second processor power consumption correction value based on the number of processor cores and a preset core power consumption coefficient. The second processor power consumption correction value represents the impact on the processor power consumption when multiple cores of the processor are in operation.
[0157] The thread determination unit is used to determine a third processor power consumption correction value based on the number of processor threads and a preset thread power consumption coefficient. The third processor power consumption correction value represents the impact of the processor on the processor power consumption when the processor concurrently processes multiple threads.
[0158] The power consumption correction unit is used to determine the upper limit power consumption of the processor based on the processor basic power consumption, the first processor power consumption correction value, the second processor power consumption correction value, the third processor power consumption correction value and the preset compensation power consumption.
[0159] The processing lower limit determining unit is used to determine the basic power consumption of the processor as the lower limit power consumption of the processor.
[0160] According to an embodiment of the present application, the memory power consumption limit includes a memory upper limit power consumption and a memory lower limit power consumption. The hardware determination submodule further includes a dynamic determination unit, a static determination unit, and a memory upper limit determination unit.
[0161] The dynamic determination unit is used to determine the dynamic power consumption of the memory based on the number of memory blocks, the basic frequency of the memory, the limit frequency of the memory, and the memory power consumption coefficient corresponding to the memory type.
[0162] The static determination unit is used to determine the memory static power consumption as the memory lower limit power consumption based on the memory capacity, the memory base voltage and the capacity power consumption coefficient for the memory type.
[0163] The memory upper limit determination unit is used to determine the memory upper limit power consumption based on the memory dynamic power consumption, the memory static power consumption and the module power consumption corresponding to the memory module type.
[0164] According to an embodiment of the present application, the power supply limit power consumption includes a power supply upper limit power consumption and a power supply lower limit power consumption, and the hardware determination submodule further includes a power supply upper limit determination unit and a power supply lower limit determination unit.
[0165] The power upper limit determination unit is used to determine the power upper limit power consumption based on the power upper limit power, a first power consumption correction value corresponding to the power temperature, and a second power consumption correction value corresponding to the power state. The first power consumption correction value represents the impact of the power temperature on the power consumption, and the second power consumption correction value represents the impact of the power state on the power consumption.
[0166] The power lower limit determining unit is used to determine the power lower limit power consumption based on the power upper limit power and a preset power consumption coefficient.
[0167] According to an embodiment of the present application, the information acquisition submodule includes a retrieval matching unit and a similarity matching unit.
[0168] The search and matching unit is used to use the hardware information keyword to search for hardware information matching the hardware information keyword in the hardware information set of the target server to obtain a first matching result.
[0169] The similarity matching unit is used to perform similarity matching in the hardware information set based on the similarity between the hardware information keyword and the hardware information in the hardware information set to obtain a second matching result when the first matching result indicates that the hardware information set does not include hardware information matching the hardware information keyword.
[0170] According to an embodiment of the present application, the first limit power consumption includes a first upper limit power consumption and a first lower limit power consumption. The second determination module 720 includes a first upper limit determination submodule and a first lower limit determination submodule.
[0171] The first upper limit determination submodule is used to determine a first upper limit power consumption based on the processor upper limit power consumption, the memory upper limit power consumption, and the power supply upper limit power consumption.
[0172] The first lower limit determination submodule is used to determine a first lower limit power consumption based on the processor lower limit power consumption, the memory lower limit power consumption, and the power supply lower limit power consumption.
[0173] According to an embodiment of the present application, the second limit power consumption includes a second upper limit power consumption and a second lower limit power consumption for each of the multiple task types. The third determination module 730 includes a timing acquisition submodule, a second upper limit determination submodule and a second lower limit determination submodule.
[0174] The timing acquisition submodule is used to obtain multiple historical power consumption timing data for any task type.
[0175] The second upper limit determination submodule is configured to determine a second upper limit power consumption for a task type according to respective upper limit values of historical power consumption of a plurality of historical power consumption time series data.
[0176] The second lower limit determination submodule is configured to determine a second lower limit power consumption for a task type according to respective lower limit values of historical power consumption of a plurality of historical power consumption time series data.
[0177] According to an embodiment of the present application, the similarity matching unit includes a substring determination subunit, a similarity determination subunit, and a target determination subunit.
[0178] The substring determination subunit is used to determine the largest common substring between the hardware information and the hardware information keyword for any hardware information.
[0179] The similarity determination subunit is used to determine the similarity between the hardware information keyword and the hardware information based on the first string length of the hardware information, the second string length of the hardware information keyword, and the third string length of the largest common substring.
[0180] The target determination subunit is used to determine target hardware information from multiple hardware information based on similarity between the hardware information keyword and each piece of hardware information.
[0181] According to an embodiment of the present application, the second determination module 820 further includes an interval determination submodule and an interval division submodule.
[0182] The interval determination submodule is used to determine a target power consumption interval for a target server based on a first upper power consumption limit and a first lower power consumption limit.
[0183] The interval division submodule is used to divide the target power consumption interval according to a preset ratio to obtain multiple power consumption sub-intervals, and the power consumption sub-intervals include low power consumption sub-intervals and normal power consumption sub-intervals.
[0184] According to embodiments of the present application, any multiple modules among the first determination module 710, the second determination module 720, and the third determination module 730 may be combined into a single module, or any one of them may be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of other modules and implemented in a single module. According to embodiments of the present application, at least one of the first determination module 710, the second determination module 720, and the third determination module 730 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or may be implemented in hardware or firmware through any other reasonable means of circuit integration or packaging, or may be implemented in any one of the three implementation methods of software, hardware, and firmware, or any appropriate combination of any of these. Alternatively, at least one of the first determination module 710, the second determination module 720, and the third determination module 730 may be at least partially implemented as a computer program module that, when executed, performs the corresponding functionality.
[0185] Figure 8 The figure shows a structural block diagram of a server control device according to an embodiment of the present application.
[0186] like Figure 8 As shown, the server control device 800 of this embodiment includes a first control module 810 and a second control module 820 .
[0187] The first control module 810 is configured to control the power consumption of the target server by using the first power consumption limit in response to determining that the target server does not have a target task to be executed.
[0188] The second control module 820 is used to respond to determining that the target server has a target task to be executed, determine the target limit power consumption corresponding to the target task type from the second limit power consumption of the target server for each of the multiple task types according to the target task type, and use the target limit power consumption to control the power consumption of the target server; wherein the first limit power consumption and the second limit power consumption are determined by the server limit power consumption determination device.
[0189] According to an embodiment of the present application, the first limit power consumption is divided into a low power consumption sub-interval and a normal power consumption sub-interval; the load of the target server in the first preset time period is lower than the load of the target server in the second preset time period; the first control module 810 also includes a first control sub-module and a second control sub-module.
[0190] The first control submodule is configured to control the power consumption of the target server by utilizing the low power consumption subinterval in response to the current moment being in the first preset time period.
[0191] The second control submodule is configured to control the power consumption of the target server using the normal power consumption sub-interval in response to the current moment being in the second preset time period.
[0192] According to embodiments of the present application, any multiple modules in the first control module 810 and the second control module 820 may be combined into a single module, or any one of them may be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of other modules and implemented in a single module. According to embodiments of the present application, at least one of the first control module 810 and the second control module 820 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or may be implemented in hardware or firmware through any other reasonable means of circuit integration or packaging, or may be implemented in any one of the three implementation methods of software, hardware, and firmware, or any appropriate combination of any of these. Alternatively, at least one of the first control module 810 and the second control module 820 may be at least partially implemented as a computer program module that, when executed, performs the corresponding functionality.
[0193] Figure 9 A block diagram of an electronic device suitable for implementing a method for determining a server's power consumption limit according to an embodiment of the present application is shown.
[0194] like Figure 9 As shown, an electronic device 900 according to an embodiment of the present application includes a processor 901, which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 902 or programs loaded from a storage unit 908 into a random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or related chipsets and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present application.
[0195] Various programs and data required for the operation of the electronic device 900 are stored in the RAM 903. The processor 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. The processor 901 performs various operations of the method flow according to the embodiment of the present application by executing the programs in the ROM 902 and / or the RAM 903. It should be noted that the programs may also be stored in one or more memories other than the ROM 902 and the RAM 903. The processor 901 may also perform various operations of the method flow according to the embodiment of the present application by executing the programs stored in one or more memories.
[0196] According to an embodiment of the present application, electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to bus 904. Electronic device 900 may also include one or more of the following components connected to I / O interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including devices such as a cathode ray tube (CRT), liquid crystal display (LCD), and speakers; a storage section 908 including a hard disk; and a communication section 909 including a network interface card such as a LAN card or modem. Communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to I / O interface 905 as needed. Removable media 911, such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed in drive 910 as needed, so that computer programs read from the removable media can be installed into storage section 908 as needed.
[0197] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, and when the one or more programs are executed, the method according to the embodiments of this application is implemented.
[0198] According to an embodiment of the present application, a computer-readable storage medium may be a non-volatile computer-readable storage medium, and may include, for example, but not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present application, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present application, a computer-readable storage medium may include the ROM 902 and / or RAM 903 described above and / or one or more memories other than ROM 902 and RAM 903.
[0199] The embodiments of the present application also include a computer program product, which includes a computer program containing program code for executing the method shown in the flowchart. When the computer program product is executed in a computer system, the program code is used to enable the computer system to implement the server power consumption limit determination method provided in the embodiments of the present application.
[0200] The computer program executes the above functions defined in the system / device of the embodiment of the present application when the processor 901 executes the computer program. According to the embodiment of the present application, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0201] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 909, and / or installed from a removable medium 911. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.
[0202] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 909, and / or installed from a removable medium 911. When the computer program is executed by the processor 901, the above-mentioned functions defined in the system of the embodiment of the present application are performed. According to the embodiment of the present application, the systems, devices, means, modules, units, etc. described above can be implemented by computer program modules.
[0203] According to an embodiment of the present application, the program code for executing the computer program provided by the embodiment of the present application can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).
[0204] The embodiments of the present application have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present application. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be advantageously used in combination. Without departing from the scope of the present application, those skilled in the art may make various substitutions and modifications, and these substitutions and modifications should all fall within the scope of the present application.
Claims
1. A method for controlling server power consumption, characterized in that: The method comprises: In response to determining that the target server does not have a target task to be executed, controlling power consumption of the target server using a first power consumption limit; In response to determining that the target server has a target task to be executed, determining, according to a target task type of the target task, a target limit power consumption corresponding to the target task type from respective second limit power consumptions for a plurality of task types of the target server, and controlling power consumption of the target server using the target limit power consumption; The first power consumption limit is divided into a low power consumption sub-interval and a normal power consumption sub-interval; the load of the target server in the first preset time period is lower than the load of the target server in the second preset time period; and the power consumption control of the target server using the first power consumption limit includes: In response to the current moment being in the first preset time period, controlling the power consumption of the target server by using the low power consumption subinterval; In response to the current moment being in the second preset time period, controlling the power consumption of the target server by using the regular power consumption sub-interval; The first limit power consumption and the second limit power consumption are determined in the following manner: Determining the hardware power consumption limits of the plurality of target hardware components according to the target hardware information of the plurality of target hardware components; determining, based on the plurality of hardware limit power consumptions, a first limit power consumption of the target server when the plurality of target hardwares operate at their respective hardware limit power consumptions; The second limit power consumption of the target server when executing tasks of multiple task types is determined based on the historical power consumption of multiple servers with the same server model as the target server, wherein the historical power consumption represents the power consumption of the multiple servers when executing historical tasks.
2. The method according to claim 1, characterized in that The determining, based on target hardware information of each of the plurality of target hardware of the target server, the hardware limit power consumption of each of the plurality of target hardware includes: Using hardware information keywords, obtaining a plurality of target hardware information, wherein the target hardware information includes processor information, memory information, and power supply information; According to the processor information, the memory information, and the power supply information, a processor limit power consumption corresponding to the processor information, a memory limit power consumption corresponding to the memory information, and a power supply limit power consumption corresponding to the power supply information are determined.
3. The method according to claim 2, characterized in that The processor power consumption limit includes an upper limit of the processor power consumption and a lower limit of the processor power consumption. Determining the processor power consumption limit corresponding to the processor information includes: determining, based on a ratio of a processor base frequency to a processor limit frequency, a first processor power consumption correction value, wherein the first processor power consumption correction value represents an impact on the processor power consumption when the processor runs at the processor limit frequency; Determining a second processor power consumption correction value based on the number of processor cores and a preset core power consumption coefficient, where the second processor power consumption correction value represents an impact on the processor power consumption when all cores of the processor are in an operating state; Determining a third processor power consumption correction value based on the number of processor threads and a preset thread power consumption coefficient, wherein the third processor power consumption correction value represents an impact of the processor on processor power consumption when the processor concurrently processes multiple threads; Determining the upper limit power consumption of the processor based on the processor base power consumption, the first processor power consumption correction value, the second processor power consumption correction value, the third processor power consumption correction value, and a preset compensation power consumption; The basic power consumption of the processor is determined to be the lower limit power consumption of the processor.
4. The method according to claim 2, characterized in that The memory limit power consumption includes an upper limit power consumption of memory and a lower limit power consumption of memory. Determining the memory limit power consumption corresponding to the memory information includes: Determine the memory dynamic power consumption based on the number of memory blocks, the memory base frequency, the memory limit frequency, and the memory power consumption coefficient corresponding to the memory type; Determine the memory static power consumption as the memory lower limit power consumption based on the memory capacity, the memory base voltage, and the capacity power consumption coefficient for the memory type; The upper limit power consumption of the memory is determined based on the dynamic power consumption of the memory, the static power consumption of the memory, and the power consumption of a module corresponding to the type of the memory module.
5. The method according to claim 2, characterized in that The power supply limit power consumption includes a power supply upper limit power consumption and a power supply lower limit power consumption. Determining the power supply limit power consumption corresponding to the power supply information includes: determining the upper limit power consumption of the power supply based on an upper limit power of the power supply, a first power consumption correction value corresponding to the power supply temperature, and a second power consumption correction value corresponding to the power supply state, wherein the first power consumption correction value represents an influence of the power supply temperature on the power consumption of the power supply, and the second power consumption correction value represents an influence of the power supply state on the power consumption of the power supply; The power lower limit power consumption is determined based on the power upper limit power and a preset power consumption coefficient.
6. The method according to claim 2, characterized in that The method of obtaining the target hardware information by using the hardware information keyword includes: Using the hardware information keyword, searching the hardware information set of the target server for hardware information that matches the hardware information keyword to obtain a first matching result; When the first matching result indicates that the hardware information set does not include hardware information matching the hardware information keyword, similarity matching is performed in the hardware information set based on similarity between the hardware information keyword and the hardware information in the hardware information set to obtain a second matching result.
7. The method according to claim 1, characterized in that The first power consumption limit includes a first upper power consumption limit and a first lower power consumption limit. The determining, based on the plurality of hardware power consumption limits, of the first power consumption limit of the target server when the plurality of target hardware run at their respective hardware power consumption limits includes: Determining the first upper limit power consumption based on the processor upper limit power consumption, the memory upper limit power consumption, and the power supply upper limit power consumption; The first lower power consumption limit is determined based on the processor lower power consumption limit, the memory lower power consumption limit, and the power supply lower power consumption limit.
8. The method according to claim 1, characterized in that The second power consumption limit includes a second upper power consumption limit and a second lower power consumption limit for each of the plurality of task types. Determining the second power consumption limits of the target server when executing tasks of the plurality of task types, based on historical power consumption of a plurality of servers having the same server model as the target server, includes: For any of the task types, obtaining a plurality of historical power consumption time series data for the task type; determining a second upper limit power consumption for the task type according to respective upper limit values of historical power consumption of the plurality of historical power consumption time series data; A second lower limit power consumption for the task type is determined according to the lower limit values of the historical power consumption of each of the plurality of historical power consumption time series data.
9. The method according to claim 6, characterized in that The performing similarity matching in the hardware information set based on the similarity between the hardware information keyword and the hardware information in the hardware information set to obtain a second matching result includes: For any of the hardware information, determining a maximum common substring between the hardware information and the hardware information keyword; determining a similarity between the hardware information keyword and the hardware information based on a first character string length of the hardware information, a second character string length of the hardware information keyword, and a third character string length of the largest common substring; The target hardware information is determined from the plurality of hardware information based on the similarity between the hardware information keyword and each piece of hardware information.
10. The method according to claim 7, characterized in that The method further comprises: Determining a target power consumption range for a target server based on the first upper power consumption limit and the first lower power consumption limit; The target power consumption interval is divided according to a preset ratio to obtain a plurality of power consumption sub-intervals, wherein the power consumption sub-intervals include a low power consumption sub-interval and a normal power consumption sub-interval.
11. An electronic device comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 10.
12. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.
13. A computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Server idle state identification method and device, equipment and storage medium
CN116841821A
Load balancing method and device, electronic equipment and storage medium
CN118860662A