Server limit power consumption determination method, server control method, device and medium
By obtaining the hardware information of the target server and the historical power consumption of the same model server, and dynamically adjusting the limit power consumption, the problem of low server extreme power consumption accuracy in traditional methods is solved, and higher power consumption management accuracy and flexibility are achieved.
Patent Information
- Application Number
- CN202510774566.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2045-06-11
AI Technical Summary
Traditional server extreme power consumption determination methods fail to consider the differences between different servers, resulting in low extreme power consumption accuracy and affecting the accuracy of power consumption management.
By obtaining the hardware information of the target server, determining the limit power consumption of each hardware, and combining the historical power consumption of the server of the same model, dynamically adjusting the limit power consumption to adapt to different task types. The power consumption correction model of processor, memory and power supply is used to accurately determine the limit power consumption of the server.
It improves the accuracy and flexibility of server extreme power consumption determination, improves the accuracy and efficiency of power consumption management, and adapts to the needs of complex computing loads and hardware isomerization.
Smart Images

Figure CN120295847A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of servers, and more particularly to a method for determining the maximum power consumption of a server, 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 and processing power of servers in data centers have grown exponentially. However, the power consumption of servers has become an important part of operating costs. The power consumption management of servers not only directly affects the power consumption and operating costs of data centers but also has an important impact on environmental sustainability.
[0003] For the power consumption management of servers, it is usually necessary to control the power consumption of servers based on the maximum power consumption of the servers. However, traditional methods for determining the maximum power consumption mainly rely on empirical formulas and statistical analysis, without considering the differences between different servers, resulting in low accuracy of the determined maximum power consumption. Summary of the Invention
[0004] In view of the above problems, this application provides a method for determining the maximum power consumption of a server, a server control method, a device, and a medium.
[0005] According to the first aspect of this application, a method for determining the maximum power consumption of a server is provided, including: determining the hardware maximum power consumption of multiple target hardwares of a target server according to the target hardware information of each of the multiple target hardwares; determining the first maximum power consumption of the target server when the multiple target hardwares operate at their respective hardware maximum power consumptions according to the multiple hardware maximum power consumptions; determining the second maximum power consumption of the target server when executing tasks of multiple task types respectively according to the historical power consumptions of multiple servers having the same server model as the target server, where the historical power consumption represents the power consumption of the multiple servers when executing historical tasks.
[0006] The second aspect of this application provides a method for controlling the power consumption of a server, characterized in that the method includes: 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 the first maximum power consumption; in response to determining that the target server has a target task to be executed, determining the target maximum power consumption corresponding to the target task type from the second maximum power consumptions of the target server for multiple task types respectively according to the target task type of the target task, and controlling the power consumption of the target server using the target maximum power consumption; where the first maximum power consumption and the second maximum power consumption are determined by the method for determining the maximum power consumption of the server.
[0007] A third aspect of the present application provides an electronic device, including: 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] A fourth aspect of the present application further provides a computer-readable storage medium, on which computer programs or instructions are stored, and when the computer programs or instructions are executed by a processor, the steps of the above method are implemented.
[0009] A fifth aspect of the present application further provides a computer program product, including computer programs or instructions, and when the computer programs or instructions are executed by a processor, the steps of the above method are implemented.
[0010] According to the embodiments of the present application, by determining the first limit power consumption of the target server when multiple target hardwares operate at their respective hardware limit power consumptions according to 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, and further makes the obtained first limit power consumption have a higher matching degree with the target server. And by determining the second limit power consumption of the target server when executing tasks of different task types respectively according to the historical power consumptions of multiple servers of the same model when executing tasks, considering the influence of different task types on the server power consumption, the flexibility of the second limit power consumption is improved, and further the accuracy of power consumption control of the target server using the first limit power consumption and the second limit power consumption is improved. Description of the Drawings
[0011] Through the following description of the embodiments of the present application with reference to the drawings, the above content and other objects, features and advantages of the present application will become clearer.
[0012] Figure 1 The application scenario diagram of the server limit power consumption determination method, server control method, device and medium according to the embodiments of the present application is shown.
[0013] Figure 2 The flowchart of the server limit power consumption determination method according to the embodiments of the present application is shown.
[0014] Figure 3 The flowchart of determining the first limit power consumption according to the embodiments of the present application is shown.
[0015] Figure 4 The flowchart of determining the target hardware information according to the embodiments of the present application is shown.
[0016] Figure 5 The flowchart of determining the second limit power consumption according to the embodiments of the present application is shown.
[0017] Figure 6 The flowchart of the server control method according to an embodiment of the present application is shown.
[0018] Figure 7 The structural block diagram of the server extreme power consumption determination device according to an embodiment of the present application is shown.
[0019] Figure 8 The structural block diagram of the server control device according to an embodiment of the present application is shown.
[0020] Figure 9 The block diagram of the electronic device suitable for implementing the server extreme power consumption determination method according to an embodiment of the present application is shown. Detailed implementation manners
[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 merely exemplary and are not intended to limit the scope of the present application. In the following detailed description, for the sake of explanation, many specific details are set forth in order to provide a comprehensive understanding of the embodiments of the present application. However, it is obvious that one or more embodiments can also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily confusing the concepts of the present application.
[0022] The terms used herein are merely for describing specific embodiments and are not intended to limit the present application. The terms "including", "comprising", etc. used herein indicate the presence of the described 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] In the case of using expressions such as "at least one of A, B, and C", generally, it should be interpreted according to the meaning usually 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 only A, only B, only C, having A and B, having A and C, having B and C, and / or having A, B, and C, etc.).
[0025] In scenarios such as data centers, cloud computing, and edge computing, server power consumption management is a core technology for ensuring system performance, energy efficiency, and reliability. Power consumption management usually relies on static thresholds (such as fixed power consumption upper / lower limits) or rule-based experiences (for example, linearly adjusting power consumption according to the utilization rates of central processing units, memory, etc.). However, with the complexity of computing loads (such as model training, real-time analysis, high-concurrency requests), the heterogeneity of hardware architectures (hybrid deployment of central processing units and graphics processing units), and the urgency of heat dissipation requirements and green power consumption requirements, traditional power consumption management solutions based on static thresholds or empirical rules are difficult to meet actual needs.
[0026] Embodiments of this application provide a method for determining the extreme power consumption of a server. According to the target hardware information of multiple target hardware of the target server, determine the hardware extreme power consumption of each of the multiple target hardware; according to the multiple hardware extreme power consumptions, determine the first extreme power consumption of the target server when the multiple target hardware operate at their respective hardware extreme power consumptions; according to the historical power consumptions of multiple servers with the same server model as the target server, determine the second extreme power consumption of the target server when executing tasks of multiple task types, where the historical power consumptions represent the power consumptions of the multiple servers when executing historical tasks. Embodiments of this application, based on the hardware information of the server and the power consumptions of the same-model servers when executing historical tasks, enable the obtained first extreme power consumption and second extreme power consumption to consider the power consumption differences between servers and between different task types, improving the accuracy of the determined extreme power consumption.
[0027] Figure 1 The application scenario diagrams of the method for determining the extreme power consumption of a server, the server control method, the device, and the medium according to embodiments of this application are shown.
[0028] As Figure 1 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 back-end management server that supports the websites browsed by users (only for example). The back-end management server may analyze and process data such as user requests received, and feedback the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0030] The control server 120 may be a server used to provide power consumption control services, such as determining the extreme power consumption of the target server 110 and performing power consumption control on the target server 110 according to the extreme power consumption.
[0031] It should be noted that the method for determining the server's maximum power consumption provided in the embodiments of the present application can generally be executed by the control server 120. Correspondingly, the device for determining the server's maximum power consumption provided in the embodiments of the present application can generally be set in the control server 120. The method for determining the server's maximum power consumption provided in the embodiments of the present application can also be executed by a server or a server cluster different from the control server 120 and capable of communicating with the target server 110 and / or the control server 120. Correspondingly, the device for determining the server's maximum power consumption provided in the embodiments of the present application can also be set in a server or a server cluster different from the control server 120 and capable of communicating with the target server 110 and / or the control server 120.
[0032] It should be understood that Figure 1 the numbers of the target server and the control server in
[0033] are merely illustrative. According to the implementation requirements, there can be any number of target servers and control servers. Figure 1 are merely illustrative. According to the implementation requirements, there can be any number of target servers and control servers. Figures 2 to 5 The following will be based on
[0034] Figure 2 the scenario described below, and will describe in detail the method for determining the server's maximum power consumption in the embodiments of the application through
[0035] As Figure 2 shown, the method for determining the server's maximum power consumption in this embodiment includes operations S210 to S230.
[0036] In operation S210, according to the target hardware information of each of the multiple target hardwares of the target server, determine the hardware maximum power consumption of each of the multiple target hardwares.
[0037] The target server can be a newly added server in the data center. The control server of the data center can, in response to the presence of a newly added target server in the data center, determine the maximum power consumption of the target server and use the maximum power consumption to perform power consumption control on the target server.
[0038] The target hardware can be the hardware that generates power consumption in the target server. The target hardware information can include parameters such as the model and basic power consumption of the target hardware. For example, the control server can interact with the target server through the interface of the target server to obtain the target hardware information.
[0039] When determining the hardware maximum power consumption of the target hardware, the basic power consumption of the target hardware can be adjusted according to the hardware information related to power consumption of the target hardware to determine the hardware maximum power consumption of the target hardware. For example, the hardware maximum power consumption can include the upper limit power consumption and the lower limit power consumption of the target hardware.
[0040] In operation S220, according to multiple hardware limit power consumptions, determine the first limit power consumption of the target server when multiple target hardwares operate at their respective hardware limit power consumptions.
[0041] The first limit power consumption of the target server may include the upper limit power consumption and the lower limit power consumption of the target server. For example, the upper limit power consumption of the target server may be determined according to the upper limit power consumptions of multiple target hardwares respectively, and the lower limit power consumption of the target server may be determined according to the lower limit power consumptions of multiple target hardwares respectively.
[0042] In operation S230, according to the historical power consumptions of multiple servers with the same server model as the target server, determine the second limit power consumption of the target server when executing tasks of multiple task types respectively.
[0043] Since the power consumption generated by the same server when executing tasks of different task types is different, the limit power consumption corresponding to different task types can be determined, so as to perform power consumption control on the target server according to the limit power consumption corresponding to the task type when the target server executes tasks.
[0044] Since the target server may be a newly added server in the data center and has not executed tasks yet, the historical power consumptions 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 tasks. The historical power consumption characterizes the power consumption of multiple servers when executing historical tasks.
[0045] When determining the second limit power consumption, the historical power consumptions of the same task type can be statistically analyzed 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 tasks of this task type can be determined according to the historical limit power consumption.
[0046] According to the embodiments of the present application, by determining the first limit power consumption of the target server when multiple target hardwares operate at their respective hardware limit power consumptions according to 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, and thus the obtained first limit power consumption has a higher matching degree with the target server. Moreover, by determining the second limit power consumption of the target server when executing tasks of different task types respectively according to the historical power consumptions of multiple servers of the same model when executing tasks, the influence of different task types on the server power consumption is considered, the flexibility of the second limit power consumption is improved, and thus the accuracy of using the first limit power consumption and the second limit power consumption to perform power consumption control on the target server is improved.
[0047] According to an embodiment of the present application, determining the hardware limit power consumption of each of multiple target hardwares of a target server based on the target hardware information of each of the multiple target hardwares includes: obtaining the multiple target hardware information by using hardware information keywords; 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 according to the processor information, the memory information, and the power supply information.
[0048] Since only some of the hardware information in the hardware information of the target server is related to power consumption determination, multiple hardware information keywords can be preset, and the target hardware information can be screened out from a large amount of hardware information of the target server by using the hardware information keywords. The target hardware information includes processor information, memory information, and power supply information. The hardware information keywords can be keywords of hardware attributes.
[0049] When determining the processor limit power consumption, the memory limit power consumption, and the power supply limit power consumption, the processor information, the memory information, and the power supply information can be input into a preset power consumption determination model to obtain the processor limit power consumption, the memory limit power consumption, and the power supply limit power consumption.
[0050] According to an embodiment of the present application, by determining the processor limit power consumption, the memory limit power consumption, and the power supply limit power consumption respectively according to the processor information, the memory information, and the 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. 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 to 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 a preset compensation power consumption; 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 a normal load state, 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 limit power consumption of the processor under the limit load state.
[0053] The first processor power consumption correction value characterizes the impact of the processor on power consumption when operating at the processor's maximum frequency. The first processor power consumption correction value can be determined by the following formula (1):
[0054] (1);
[0055] Wherein, is the first processor power consumption correction value, is the processor's maximum frequency, is the processor's base frequency.
[0056] The second processor power consumption correction value characterizes the impact of the processor on power consumption when multiple cores of the processor are all in the operating state. The second processor power consumption correction value can be determined by the following formula (2):
[0057] (2);
[0058] Wherein, is the second processor power consumption correction value, is the core power consumption coefficient, is the number of processor cores, is the base core number, which is usually the same as the number of processor cores. In some embodiments, due to a 2% - 5% increase in power consumption per core, the core power consumption coefficient can usually be 0.02 - 0.05.
[0059] The third processor power consumption correction value characterizes the impact of the processor on power consumption when concurrently processing multiple threads. The determination method of the third processor power consumption correction value can be determined by the following formula (3):
[0060] (3);
[0061] Wherein, is the third processor power consumption correction value, is the thread power consumption coefficient, is the number of processor threads. Since the power consumption increases by 1W - 3W per logical thread, the thread power consumption coefficient can usually be 1.5, and it is ignored when the physical cores are fully loaded.
[0062] The upper limit power consumption of the processor can be obtained by correcting the base 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] Among them, TDP is the base power consumption of the processor, Pmax1 is the upper limit power consumption of the processor, and ΔPoffset is the compensation power consumption. The compensation power consumption can be 20W, or it can be determined according to the actual power consumption fluctuation.
[0065] According to the embodiments of the present application, by using the hardware information such as the number of processor cores, the number of processor threads, and the processor frequency that affect the processor power consumption, the upper limit power consumption and the lower limit power consumption of the processor are determined, improving the accuracy of the determined extreme power consumption of the processor.
[0066] According to the embodiments of the present application, the memory extreme power consumption includes the upper limit power consumption and the lower limit power consumption of the memory. Determining the memory extreme power consumption corresponding to the memory information includes: determining the memory dynamic power consumption based on the number of memory blocks, the memory base frequency, the memory extreme frequency, and the memory power consumption coefficient corresponding to the memory type; determining the memory static power consumption based on the memory capacity, the memory base voltage, and the capacity power consumption coefficient for the memory type as the lower limit power consumption of the memory; determining the upper limit power consumption of the memory based on the memory dynamic power consumption, the memory static power consumption, and the module power consumption corresponding to the memory module type.
[0067] The memory dynamic power consumption can be the power consumption when the memory performs read and write operations at the extreme frequency. The memory dynamic power consumption can be determined by the following formula (5):
[0068] (5);
[0069] Among them, is the memory dynamic power consumption, is the number of memory blocks, q is the memory power consumption coefficient, is the memory base frequency, is the memory extreme frequency.
[0070] In some embodiments, when the memory type is Double-Data-Rate Fourth Generation Synchronous Dynamic Random Access Memory (DDR4), the memory power consumption coefficient can be 2W, and when the memory type is Double-Data-Rate Fifth Generation Synchronous Dynamic Random Access Memory (DDR5), the memory power consumption coefficient can be 1.8W.
[0071] In the embodiments of the present application, the memory static power consumption can be the power consumption when the memory is in the idle state and does not perform read and write operations. The memory static power consumption can be determined by the following formula (6):
[0072] (6);
[0073] Wherein, is the static power consumption of the memory, is the capacity power consumption coefficient, is the memory capacity, is the base voltage of the memory.
[0074] In some embodiments, the module power consumption is related to the memory module type. When the memory module type is an Unbuffered Dual Inline Memory Module (UDIMM), the module power consumption can be 0. When the memory module type is a Registered Dual In-line Memory Module (RDIMM), the module power consumption can be 2W. When the memory module type is a Load-Reduced Dual Inline Memory Module (LRDIMM), the module power consumption can be 3W.
[0075] In the embodiments of the present application, the upper limit power consumption of the memory can be determined by the following formula (7):
[0076] (7);
[0077] Wherein, is the upper limit power consumption of the memory, is the dynamic power consumption of the memory, is the module power consumption.
[0078] According to the embodiments of the present application, by dividing the memory power consumption into the static power consumption of the memory, the dynamic power consumption of the memory, and the module power consumption, the accuracy of the determined memory limit power consumption is improved.
[0079] According to the embodiments of the present application, the power limit consumption includes the upper limit power consumption of the power supply and the lower limit power consumption of the power supply. Determining the power limit consumption corresponding to the power supply information includes: determining the upper limit power consumption of the power supply based on the upper limit power of the power supply, the first power consumption correction value corresponding to the power supply temperature, and the second power consumption correction value corresponding to the power supply state; determining the lower limit power consumption of the power supply based on the upper limit power of the power supply and a preset power consumption coefficient.
[0080] According to the embodiments 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, and the first power consumption correction value can be determined by the following formula (8):
[0081] (8);
[0082] Among them, is the first power consumption correction value, Tbase is usually set to 40 degrees, k is the derating slope, usually taken as 0.01, and T is the power supply temperature.
[0083] The second power consumption correction value characterizes the influence of the power supply state on the power consumption of the power supply. When the power supply states are healthy state, warning state, and dangerous state respectively, the second power consumption correction values can be 1, 0.8, and 0 respectively.
[0084] In the embodiments of the present application, the upper limit power consumption of the power supply can be determined by the following formula (9):
[0085] (9);
[0086] Among them, is the upper limit power consumption of the power supply, is the second power consumption correction value, is the upper limit power of the power supply.
[0087] In the embodiments of the present application, the lower limit power consumption of the power supply can be determined by the following formula (10):
[0088] (10);
[0089] Among them, is the lower limit power consumption of the power supply, and n is a preset power consumption coefficient, usually taken as 0.2.
[0090] According to the embodiments of the present application, by considering the state of the power supply, the power supply is determined, and the accuracy of the power supply limit power consumption is improved.
[0091] Figure 3 Shows a flowchart for determining the first limit power consumption according to an embodiment of the present application.
[0092] As Figure 3 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, the memory limit power consumption is determined. In operation S330, the processor limit power consumption is determined. In operation S340, the power supply limit power consumption is determined. In operation S350, the first limit power consumption is determined.
[0094] According to an embodiment of the present application, by using hardware information keywords, multiple pieces of target hardware information are obtained, including: using the hardware information keywords to retrieve, in the hardware information set of the target server, the hardware information that matches the hardware information keywords to obtain a first matching result; in the case where the first matching result indicates that the hardware information set does not include the hardware information that matches the hardware information keywords, based on the similarity between the hardware information keywords and the hardware information in the hardware information set, perform a similarity match in the hardware information set to obtain a second matching result.
[0095] When obtaining the target hardware information by using the hardware information keywords, the hardware information keywords can be sent to the interfaces of each target hardware to obtain the corresponding target hardware information.
[0096] When obtaining the target hardware information, since there are differences in the hardware information fields of different types of servers, the target hardware information can be obtained first by means of exact matching, and in the case where no corresponding target hardware information is obtained by exact matching, it can be obtained by means of similarity matching.
[0097] When performing a similarity match, methods such as regular matching and the longest common substring ratio model can be used to determine the similarity between the hardware information keywords and the hardware information, and the hardware information with a similarity greater than the preset similarity threshold to the hardware information keywords is determined as the target hardware information.
[0098] In the case where the second matching result indicates that the hardware information set does not include the hardware information similar to the hardware information keywords, it can be determined that the corresponding target hardware information cannot be obtained through the interface of the target hardware. At this time, the corresponding target hardware information can be obtained from the original equipment manufacturer information of the target hardware. For example, the hardware information keywords can be used to perform an exact match in the original equipment manufacturer information first, and then a similarity match.
[0099] After obtaining the target hardware information, the target hardware information can also be processed such as formatted to facilitate the determination of the extreme power consumption by using the target hardware information.
[0100] According to an embodiment of the present application, by performing exact matching and similarity matching by using the hardware information keywords, the accuracy of the obtained target hardware information can be improved, and further the accuracy of determining the extreme power consumption can be improved.
[0101] Figure 4 A flowchart of determining the target hardware information according to an embodiment of the present application is shown.
[0102] As Figure 4 shown, determining the target hardware information includes operations S410 to S440.
[0103] In operation S410, obtain the hardware information of the memory, processor, and power supply respectively to obtain a hardware information set. In operation S420, use the hardware information keywords to retrieve the hardware information that matches the hardware information keywords in the hardware information set to obtain a first matching result. In operation S430, based on the similarity between the hardware information keywords and the hardware information in the hardware information set, perform similarity matching in the hardware information set to obtain a second matching result. In operation S440, determine the target hardware information 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 keywords and the hardware information in the hardware information set, performing similarity matching in the hardware information set to obtain a second matching result includes: for any piece of hardware information, determine the longest common substring between the hardware information and the hardware information keywords; based on the first string length of the hardware information, the second string length of the hardware information keywords, and the third string length of the longest common substring, determine the similarity between the hardware information keywords and the hardware information; based on the similarity between the hardware information keywords and each piece of hardware information, determine the target hardware information from multiple pieces of hardware information.
[0105] The longest common substring can be the longest and continuous identical string in the two strings of the hardware information and the hardware information keywords.
[0106] When determining the similarity between the hardware information and the hardware information keywords, the shorter string in the hardware information and the hardware information keywords can be determined according to the first string length and the second string length, and the similarity can be determined according to the ratio of the third string length to the string length of this 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 third string length to the second string length, and the similarity between the hardware information and the hardware information keyword is obtained as 1.
[0108] According to an embodiment of the present application, by using the longest common substring between the hardware information and the hardware information keywords to determine the similarity between the hardware information and the hardware information keywords, the accuracy of the similarity is improved.
[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, determining the first limit power consumption of the target server when multiple target hardwares operate at their respective hardware limit power consumptions includes: determining the first upper limit power consumption based on the upper limit power consumption of the processor, the upper limit power consumption of the memory, and the upper limit power consumption of the power supply; determining the first lower limit power consumption based on the lower limit power consumption of the processor, the lower limit power consumption of the memory, and the lower limit power consumption of the power supply.
[0110] When determining the first upper limit power consumption, it is possible to determine that the sum of the upper limit power consumption of the processor, the upper limit power consumption of the memory, and the upper limit power consumption of the power supply is the first upper limit power consumption. In addition, it is also possible to add the upper limit power consumption of other hardwares on the basis of the upper limit power consumption of the processor, the upper limit power consumption of the memory, and the upper limit power consumption of the power supply to obtain the first upper limit power consumption.
[0111] When determining the first lower limit power consumption, it is possible to determine that the sum of the lower limit power consumption of the processor, the lower limit power consumption of the memory, and the lower limit power consumption of the power supply is the first lower limit power consumption. In addition, it is also possible to add the lower limit power consumption of other hardwares on the basis of the lower limit power consumption of the processor, the lower limit power consumption of the memory, and the lower limit power consumption of the power supply to obtain the first lower limit power consumption.
[0112] After determining the first upper limit power consumption and the first lower limit power consumption, the target server identifier, the first upper limit power consumption, and the first lower limit power consumption of the target server can be stored in the power consumption control policy library to perform power consumption control on the target server using the first upper limit power consumption and the first lower limit power consumption.
[0113] According to an embodiment of the present application, determining the first upper limit power consumption and the first lower limit power consumption of the target server based on the upper limit power consumption and the lower limit power consumption of hardware such as the processor, the memory, and the power supply improves 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 server limit power consumption determination method further includes: determining a target power consumption range for the target server based on the first upper limit power consumption and the 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 range, the first lower limit power consumption can be determined as the minimum value of the target power consumption range, and the first upper limit power consumption can be determined as the maximum value of the target power consumption range.
[0116] When dividing the target power consumption range according to the preset ratio, the length of each power consumption sub-range can be determined according to the preset ratio and the length of the target power consumption range, and then the specific range of each power consumption sub-range can be determined according to the first upper limit value, the first lower limit value, and the length of each power consumption sub-range.
[0117] The low-power sub-interval can be used to control the power consumption of the target server when the target server is in a low-load state, so as to save energy. The conventional power consumption sub-interval can be used to control the power consumption of the target server when the target server is in a conventional load state.
[0118] The power consumption sub-interval can also include a high-power sub-interval. The high-power sub-interval can 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 conventional power consumption sub-interval and a low-power sub-interval, a matching power consumption sub-interval can be determined according to the load state of the target server, the flexibility of the limit power consumption can be improved, and further the flexibility of power consumption control of the target server can be improved.
[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. According to the historical power consumption of multiple servers with the same server model as the target server, determining the second limit power consumption of the target server when executing tasks of multiple task types respectively includes: 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 according to the historical power consumption upper limit values of the multiple historical power consumption time series data; determining the second lower limit power consumption for the task type according to the historical power consumption lower limit values of the multiple historical power consumption time series data.
[0121] Since the target server can have a second limit power consumption corresponding to each of multiple task types, for each task type, the second limit power consumption of the target server when executing tasks of the task type can be determined according to the multiple historical power consumption time series data of the task type. For example, the task types can include upgrade tasks, computing tasks, stress test tasks, etc.
[0122] The historical power consumption time series data can be the power consumption data of the server during the period of executing historical tasks. For example, the historical power consumption time series data can be a sequence composed of multiple historical power consumption data, and each historical power consumption data corresponds to a historical task execution moment.
[0123] When determining the second upper limit power consumption, the average value or the maximum value of the multiple historical power consumption upper limit values can be determined as the second upper limit power consumption. When determining the second lower limit power consumption, the average value or the minimum value of the multiple historical power consumption lower limit values can be determined as the second lower limit power consumption.
[0124] After determining the second upper limit power consumption and the second lower limit power consumption, the fan speed for the target server can also be determined according to the fan speeds of multiple servers when executing historical tasks. For example, for any task type, multiple historical fan speed data are obtained, and the target fan speed corresponding to the task type is determined by using the multiple historical fan speed data, so as to control the target server by using the target fan speed.
[0125] According to an embodiment of the present application, by determining the second upper limit power consumption and the second lower limit power consumption for the target server according to the historical power consumptions of multiple servers of the same model, the flexibility of the second limit power consumption is improved.
[0126] Figure 5 The flowchart of determining the second limit power consumption according to an embodiment of the present application is shown.
[0127] As Figure 5 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 the task type are obtained from the historical power consumptions. In operation S530, the historical power consumption time series data are parsed to obtain a historical power consumption upper limit value and a historical power consumption lower limit value. In operation S540, the second limit power consumption is determined according to the historical power consumption upper limit value and the historical power consumption lower limit value.
[0129] According to an embodiment of the present application, the server power consumption control method includes: determining whether the 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, performing power consumption control on the target server by using the 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 multiple task types respectively according to the target task type of the target task, and performing power consumption control on the target server by using the target limit power consumption.
[0130] When performing power consumption control on the target server, the target server can be interacted with through the interface of the target server to obtain the task execution situation of the target server, and then it is determined whether the target server has a target task to be executed according to the task execution situation.
[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 and has universality, when the target server does not have a target task to be executed, the first limit power consumption can be used to perform power consumption control on the target server.
[0132] When performing power consumption control on a target server, the first limit power consumption or the target limit power consumption can be sent to the baseboard management controller of the target server, so that the baseboard management controller performs power consumption control 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 has no tasks to be executed, the target server is power consumption controlled by using the first limit power consumption, and when the target server has tasks to be executed, the target server is power consumption controlled according to the target limit power consumption corresponding to the target task type, thereby improving the flexibility of power consumption control for the target server.
[0134] According to an embodiment of the present application, for any task type, power consumption timing data of the target server when executing tasks of this 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 this task type, the second limit power consumption is modified based on the power consumption limit value.
[0135] Since the second limit power consumption is not determined according to the execution situation of the target server, there is an inaccurate situation. After the target server is put into use, the second limit power consumption can be modified according to the power consumption data of the target server when executing tasks.
[0136] For example, the second limit power consumption for the upgrade task type is 400W - 1200W, and the power consumption limit value of the target server when executing the upgrade task is 1300W. At this time, the second limit power consumption can be modified to 400W - 1300W.
[0137] According to an embodiment of the present application, by using the actual power consumption of the target server when executing tasks to modify the second limit power consumption, the accuracy of the second limit power consumption is further improved.
[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; using the first limit power consumption to perform power consumption control on the target server includes: in response to the current moment being in the first preset time period, using the low power consumption sub-interval to perform power consumption control on the target server; in response to the current moment being in the second preset time period, using the normal power consumption sub-interval to perform power consumption control on the target server.
[0139] The first preset time period can be a time period when the load of the target server is relatively low. At this time, the target server executes fewer tasks. Therefore, the low power consumption sub-interval can be used to perform power consumption control on the target server to save energy. The first preset time period can be, for example, 0 - 6 o'clock.
[0140] Accordingly, the second preset time period may be a time period when the target server is in a normal load state, for example, it may be from 7 to 24 hours.
[0141] According to an embodiment of the present application, by using the power consumption sub-interval corresponding to the current moment, power consumption control is performed on the target server, further improving the flexibility of power consumption control for the target server.
[0142] Figure 6 The flowchart of the server control method according to an embodiment of the present application is shown.
[0143] As Figure 6 shown, the server control method includes operation S610 to operation 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, according to the target task type of the target task, the target limit power consumption corresponding to the target task type is determined. In operation S630, in response to determining that the target server does not have a target task to be executed, according to the preset time period corresponding to the current moment, the power consumption sub-interval corresponding to the preset time period 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. The following will be combined with Figure 7 to describe this device in detail.
[0146] Figure 7 The structural block diagram of the server limit power consumption determination device according to an embodiment of the present application is shown.
[0147] As Figure 7 shown, the server limit power consumption determination device 700 of this embodiment includes a first determination module 710, a second determination module 720, and a third determination module 730.
[0148] The first determination module 710 is used to determine the hardware limit power consumption of each of the multiple target hardwares of the target server according to the target hardware information of each of the multiple target hardwares. In one embodiment, the first determination module 710 may be used to execute operation S210 described above, which will not be elaborated here.
[0149] The second determination module 720 is used to determine the first limit power consumption of the target server when the multiple target hardwares operate at their respective hardware limit power consumptions according to the multiple hardware limit power consumptions. In one embodiment, the second determination module 720 may be used to execute operation S220 described above, which will not be elaborated here.
[0150] The third determination module 730 is configured to determine the second limit power consumption of the target server when executing tasks of multiple task types respectively according to the historical power consumption of multiple servers having the same server model as the target server, where the historical power consumption characterizes the power consumption of the multiple servers when executing historical tasks. In one embodiment, the third determination module 730 may be configured to perform the operation S230 described above, which will not be elaborated herein.
[0151] According to an embodiment of the present application, the first determination module 710 includes an information acquisition sub-module and a hardware determination sub-module.
[0152] The information acquisition sub-module is configured to obtain multiple pieces of target hardware information by using hardware information keywords, where the target hardware information includes processor information, memory information, and power supply information.
[0153] The hardware determination sub-module is configured 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 according to the processor information, the memory information, and the power supply information.
[0154] 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. The hardware determination sub-module 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 configured to determine a first processor power consumption correction value based on the ratio of the processor base frequency to the processor limit frequency, where the first processor power consumption correction value characterizes the impact on the processor power consumption when the processor runs at the processor limit frequency.
[0156] The core determination unit is configured to determine 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 characterizes the impact on the processor power consumption when multiple cores of the processor are all in an operating state.
[0157] The thread determination unit is configured to determine a third processor power consumption correction value based on the number of processor threads and a preset thread power consumption coefficient, where the third processor power consumption correction value characterizes the impact on the processor power consumption when the processor concurrently processes multiple threads.
[0158] The power consumption correction unit is configured to determine 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 a preset compensation power consumption.
[0159] The processing lower limit determination unit is configured to determine the processor base power consumption as the processor lower limit power consumption.
[0160] 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. The hardware determination sub-module further includes a dynamic determination unit, a static determination unit, and a memory upper limit determination unit.
[0161] The dynamic determination unit is configured to 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.
[0162] The static determination unit is configured to determine the memory static power consumption based on the memory capacity, the memory base voltage, and the capacity power consumption coefficient for the memory type, as the memory lower limit power consumption.
[0163] The memory upper limit determination unit is configured 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 the power supply upper limit power consumption and the power supply lower limit power consumption. The hardware determination sub-module further includes a power supply upper limit determination unit and a power supply lower limit determination unit.
[0165] The power supply upper limit determination unit is configured to determine the power supply upper limit power consumption based on the power supply upper limit power, the first power supply power consumption correction value corresponding to the power supply temperature, and the second power supply power consumption correction value corresponding to the power supply state. The first power supply power consumption correction value represents the influence of the power supply temperature on the power supply power consumption, and the second power supply power consumption correction value represents the influence of the power supply state on the power supply power consumption.
[0166] The power supply lower limit determination unit is configured to determine the power supply lower limit power consumption based on the power supply upper limit power and a preset power consumption coefficient.
[0167] According to an embodiment of the present application, the information acquisition sub-module includes a retrieval matching unit and a similarity matching unit.
[0168] The retrieval matching unit is configured to use the hardware information keywords to retrieve the hardware information matching the hardware information keywords in the hardware information set of the target server, and obtain a first matching result.
[0169] The similarity matching unit is configured to perform similarity matching in the hardware information set based on the similarity between the hardware information keywords and the hardware information in the hardware information set when the first matching result indicates that the hardware information set does not include the hardware information matching the hardware information keywords, and obtain a second matching result.
[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 820 includes a first upper limit determination sub-module and a first lower limit determination sub-module.
[0171] The first upper limit determination sub-module is used to determine the first upper limit power consumption based on the upper limit power consumption of the processor, the upper limit power consumption of the memory, and the upper limit power consumption of the power supply.
[0172] The first lower limit determination sub-module is used to determine the first lower limit power consumption based on the lower limit power consumption of the processor, the lower limit power consumption of the memory, and the lower limit power consumption of the power supply.
[0173] According to the embodiments of the present application, the second limit power consumption includes the second upper limit power consumption and the second lower limit power consumption for each of multiple task types, and the third determination module 830 includes a timing acquisition sub-module, a second upper limit determination sub-module, and a second lower limit determination sub-module.
[0174] The timing acquisition sub-module is used to acquire, for any task type, multiple historical power consumption timing data for the task type.
[0175] The second upper limit determination sub-module is used to determine the second upper limit power consumption for the task type according to the historical power consumption upper limit values of the multiple historical power consumption timing data.
[0176] The second lower limit determination sub-module is used to determine the second lower limit power consumption for the task type according to the historical power consumption lower limit values of the multiple historical power consumption timing data.
[0177] According to the embodiments of the present application, the similarity matching unit includes a substring determination sub-unit, a similarity determination sub-unit, and a target determination sub-unit.
[0178] The substring determination sub-unit is used to determine, for any hardware information, the maximum common substring between the hardware information and the hardware information keyword.
[0179] The similarity determination sub-unit 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 maximum common substring.
[0180] The target determination sub-unit is used to determine the target hardware information from multiple hardware information based on the similarity between the hardware information keyword and each hardware information.
[0181] According to the embodiments of the present application, the second determination module 820 further includes an interval determination sub-module and an interval division sub-module.
[0182] The interval determination sub-module is used to determine the target power consumption interval for the target server based on the first upper limit power consumption and the first lower limit power consumption.
[0183] The interval division sub-module 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 a low power consumption sub-interval and a normal power consumption sub-interval.
[0184] According to an embodiment of the present application, any multiple of the first determination module 710, the second determination module 720, and the third determination module 730 may be combined and implemented in one module, or any one of them may be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules may be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment 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 chip, a system on substrate, a system on package, an application specific integrated circuit (ASIC), or any other reasonable way of integrating or packaging circuits, etc., implemented by hardware or firmware, or implemented in any one of the three implementation manners of software, hardware, and firmware, or in an appropriate combination of any several of them. 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, and when the computer program module is run, it may execute the corresponding functions.
[0185] Figure 8 The structural block diagram of a server control device according to an embodiment of the present application is shown.
[0186] As Figure 8 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 perform power consumption control on the target server by using the first limit power consumption in response to determining that the target server does not have a target task to be executed.
[0188] The second control module 820 is configured to, in response to determining that the target server has a target task to be executed, determine a target limit power consumption corresponding to the target task type from the second limit power consumptions of the target server for each of multiple task types according to the target task type of the target task, and perform power consumption control on the target server by using the target limit power consumption; wherein, the first limit power consumption and the second limit power consumption are determined by a 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 period is lower than the load of the target server in the second preset period; the first control module 810 further includes a first control sub-module and a second control sub-module.
[0190] The first control sub-module is configured to perform power consumption control on the target server by using a low-power sub-interval in response to the current moment being within a first preset time period.
[0191] The second control sub-module is configured to perform power consumption control on the target server by using a normal power consumption sub-interval in response to the current moment being within a second preset time period.
[0192] According to an embodiment of the present application, any multiple of the first control module 810 and the second control module 820 may be combined and implemented in one module, or any one of them may be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules may be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment 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 chip, a system on a substrate, a system in a package, an application specific integrated circuit (ASIC), or any other reasonable manner of integrating or packaging circuits, etc., implemented by hardware or firmware, or implemented in any one of the three implementation manners of software, hardware, and firmware, or in any appropriate combination of several of them. 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, and when the computer program module is run, it can execute corresponding functions.
[0193] Figure 9 The block diagram of an electronic device suitable for implementing the method for determining the extreme power consumption of a server according to an embodiment of the present application is shown.
[0194] As Figure 9 shown, the electronic device 900 according to an embodiment of the present application includes a processor 901, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 902 or the program loaded from the storage section 908 into the random access memory (RAM) 903. The processor 901 may include, for example, a general microprocessor (such as a CPU), an instruction set processor, and / or a related chipset, and / or a dedicated microprocessor (such as an application specific integrated circuit (ASIC)), etc. The processor 901 may also include on-board 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 an embodiment of the present application.
[0195] In the RAM 903, various programs and data required for the operation of the electronic device 900 are stored. 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 embodiments of the present application by executing the programs in the ROM 902 and / or the RAM 903. It should be noted that the programs can also be stored in one or more memories other than the ROM 902 and the RAM 903. The processor 901 can also perform various operations of the method flow according to the embodiments of the present application by executing the programs stored in one or more memories.
[0196] According to an embodiment of the present application, the electronic device 900 may further include an input / output (I / O) interface 905, and the input / output (I / O) interface 905 is also connected to the bus 904. The electronic device 900 may further include one or more of the following components connected to the input / output (I / O) interface 905: an input portion 906 including a keyboard, a mouse, etc.; an output portion 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage portion 908 including a hard disk, etc.; and a communication portion 909 including a network interface card such as a LAN card, a modem, etc. The communication portion 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the input / output (I / O) interface 905 as required. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as required so that a computer program read therefrom can be installed into the storage portion 908 as required.
[0197] The present 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 separately without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiments of the present application is implemented.
[0198] According to an embodiment of the present application, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In the present application, the computer-readable storage medium may be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, device, or apparatus. For example, according to an embodiment of the present application, the computer-readable storage medium may include the above-described ROM 902 and / or RAM 903 and / or one or more memories other than ROM 902 and RAM 903.
[0199] An embodiment of the present application also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product runs in a computer system, the program code is used to enable the computer system to implement the server limit power consumption determination method provided by the embodiment of the present application.
[0200] When the computer program is executed by the processor 901, it executes the above functions defined in the system / apparatus of the embodiment of the present application. According to an embodiment of the present application, the above-described systems, apparatuses, modules, units, etc. can be implemented by computer program modules.
[0201] In one embodiment, the computer program can rely on tangible storage media such as optical storage devices and magnetic storage devices. In another embodiment, the computer program can also be transmitted and distributed in the form of signals on a network medium, and be downloaded and installed through the communication part 909, and / or be installed from the removable medium 911. The program code contained in the computer program can be transmitted by any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0202] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or be installed from the removable medium 911. When the computer program is executed by the processor 901, it executes the above functions defined in the system of the embodiment of the present application. According to an embodiment of the present application, the above-described systems, devices, apparatuses, modules, units, etc. can be implemented by computer program modules.
[0203] According to embodiments of the present application, program code for executing the computer programs provided by the embodiments of the present application can be written in any combination of one or more programming languages. Specifically, these computing 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, such as Java, C++, Python, the "C" language, or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's 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's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., by connecting through the Internet using an Internet service provider).
[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 the embodiments have been described separately above, this does not mean that the measures in each embodiment cannot be used advantageously in combination. Without departing from the scope of the present application, those skilled in the art can make various substitutions and modifications, and all of these substitutions and modifications should fall within the scope of the present application.
Claims
1. A method for determining the maximum power consumption of a server, characterized in that, The method includes: Determining the hardware limit power consumption of each of the multiple target hardwares according to the target hardware information of each of the multiple target hardwares of the target server; Determining a first limit power consumption of the target server when the multiple target hardwares operate at their respective hardware limit power consumptions according to the multiple hardware limit power consumptions; Determining a second limit power consumption of the target server when executing tasks of multiple task types according to the historical power consumptions of multiple servers having the same server model as the target server, where the historical power consumption represents the power consumption of the multiple servers when executing historical tasks.
2. The method according to claim 1, wherein The determining the hardware limit power consumption of each of the multiple target hardwares according to the target hardware information of each of the multiple target hardwares of the target server includes: Using hardware information keywords to obtain the multiple target hardware information, where the target hardware information includes processor information, memory information, and power supply information; Determining 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 according to the processor information, the memory information, and the power supply information.
3. The method according to claim 2, wherein The processor limit power consumption includes a processor upper limit power consumption and a processor lower limit power consumption. 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 to the processor limit frequency, where the first processor power consumption correction value represents the impact on the processor power consumption when the processor operates 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 the impact on the processor power consumption when multiple cores of the processor are all 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, where the third processor power consumption correction value represents the impact on the processor power consumption when the processor concurrently processes multiple threads; 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 a preset compensation power consumption; Determining the processor base power consumption as the processor lower limit power consumption.
4. The method according to claim 2, characterized in that The memory limit power consumption includes a memory upper limit power consumption and a memory lower limit power consumption. Determining the memory limit power consumption corresponding to the memory information includes: Determining the memory dynamic power consumption based on the number of memory blocks, the memory base frequency, the memory limit frequency, and a memory power consumption coefficient corresponding to the memory type; Determining the memory static power consumption based on the memory capacity, the memory base voltage, and a capacity power consumption coefficient for the memory type as the memory lower limit power consumption; Determining the memory upper limit power consumption based on the memory dynamic power consumption, the memory static power consumption, and a module power consumption corresponding to the memory module type.
5. The method according to claim 2, wherein 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: Determine the upper limit power consumption of the power supply based on the upper limit power of the power supply, the first power consumption correction value corresponding to the power supply temperature, and the second power consumption correction value corresponding to the power supply state, where the first power consumption correction value represents the influence of the power supply temperature on the power consumption of the power supply, and the second power consumption correction value represents the influence of the power supply state on the power consumption of the power supply; Determine the lower limit power consumption of the power supply based on the upper limit power of the power supply and a preset power consumption coefficient.
6. The method according to claim 2, characterized in that The obtaining of multiple pieces of the target hardware information by using the hardware information keywords includes: Use the hardware information keywords to retrieve hardware information matching the hardware information keywords in the hardware information set of the target server to obtain a first matching result; In the case where the first matching result indicates that the hardware information set does not include hardware information matching the hardware information keywords, perform similarity matching in the hardware information set based on the similarity between the hardware information keywords 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 limit power consumption includes a first upper limit power consumption and a first lower limit power consumption. The determination of the first limit power consumption of the target server when the multiple target hardware operate at their respective hardware limit power consumptions according to the multiple hardware limit power consumptions includes: Determine the first upper limit power consumption based on the upper limit power consumption of the processor, the upper limit power consumption of the memory, and the upper limit power consumption of the power supply; Determine the first lower limit power consumption based on the lower limit power consumption of the processor, the lower limit power consumption of the memory, and the lower limit power consumption of the power supply.
8. The method according to claim 1, characterized in that, 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 determination of the second limit power consumption of the target server when executing tasks of multiple task types according to the historical power consumptions of multiple servers having the same server model as the target server includes: For any one of the task types, obtain multiple historical power consumption time series data for the task type; Determine the second upper limit power consumption for the task type according to the historical power consumption upper limit values of the multiple historical power consumption time series data; Determine the second lower limit power consumption for the task type according to the historical power consumption lower limit values of the multiple historical power consumption time series data.
9. The method according to claim 6, wherein The performing of similarity matching in the hardware information set based on the similarity between the hardware information keywords and the hardware information in the hardware information set to obtain a second matching result includes: For any one of the hardware information, determine the longest common substring between the hardware information and the hardware information keywords; Determine the similarity between the hardware information keywords and the hardware information based on the first string length of the hardware information, the second string length of the hardware information keywords, and the third string length of the longest common substring; Determine the target hardware information from the multiple pieces of hardware information based on the similarity between the hardware information keywords and each piece of hardware information.
10. The method according to claim 7, characterized in that, The method further includes: Determine a target power consumption range for the target server based on the first upper limit power consumption and the first lower limit power consumption; Divide the target power consumption range according to a preset ratio to obtain a plurality of power consumption sub-ranges, where the power consumption sub-ranges include a low power consumption sub-range and a normal power consumption sub-range.
11. 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, use the 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, determine the target limit power consumption corresponding to the target task type from the second limit power consumptions of the target server for each of the multiple task types, 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 method according to any one of claims 1 to 10.
12. The method according to claim 11, wherein The first limit power consumption is divided into a low power consumption sub-range and a normal power consumption sub-range; 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 using the first limit power consumption to control the power consumption of the target server includes: In response to the current moment being in the first preset time period, use the low power consumption sub-range to control the power consumption of the target server; In response to the current moment being in the second preset time period, use the normal power consumption sub-range to control the power consumption of the target server.
13. An electronic device, comprising: One or more processors; A memory for storing one or more computer programs, 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 12.
14. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, The computer program or instruction, when executed by the processor, implements the steps of the method according to any one of claims 1 to 12.
15. A computer program product, comprising a computer program, where the computer program, when executed by the processor, implements the steps of the method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Server power consumption upper limit control method and system and related components
CN111949478A
Server idle state identification method and device, equipment and storage medium
CN116841821A
Load balancing method and device, electronic equipment and storage medium
CN118860662A
Power source consumption management apparatus for four-way server
US20240220385A1
Power consumption adjustment method and apparatus
WO2022246759A1