Method, apparatus and terminal for determining power configuration of server
By analyzing historical power consumption data of servers, classifying power consumption patterns, and designing power configuration methods, the problem of inaccurate server power consumption prediction was solved, achieving accurate power configuration and energy-saving effects.
Patent Information
- Application Number
- CN202210482713.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-05
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2042-05-05
AI Technical Summary
Existing technologies make it difficult to accurately predict the power consumption of servers in subsequent time periods, which may lead to the risk of server overload or power waste, and the inability to reasonably determine power quotas, thereby increasing data center operating costs.
By acquiring historical power consumption data of servers, classifying various power consumption patterns, and using clustering and separation techniques to identify the power consumption fluctuation characteristics of servers, corresponding power configuration methods are designed to predict power demand in subsequent periods.
This effectively avoids the risk of server overload, reduces energy waste, improves the accuracy and efficiency of power allocation, and lowers data center operating costs.
Smart Images

Figure CN114764687B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present specification relates to the technical field of computer technology, and in particular, to a method and apparatus for determining power configuration of a server and a terminal. BACKGROUND
[0002] There can be multiple types of servers in a data center, and the power consumption of the servers will fluctuate for different traffic or traffic types, that is, the servers will need different power allocations at different times. Based on the power allocation required by the server, the number of servers in the cabinet / column can be reasonably set to improve power utilization.
[0003] However, there is currently no effective method to predict the power consumption of the server, and it is difficult to accurately predict the power consumption of the server in the subsequent period, so as to determine the power allocation required by the server in the subsequent period, which will result in that the required power cannot be supplied to the server based on the power allocation required by the server, so that the server is at risk of overload or power waste, etc., thereby resulting in a substantial increase in the operating cost of the data center. SUMMARY
[0004] The first aspect of the present specification provides a method for determining power configuration of a server, the method comprising: obtaining historical power consumption data of the server, the historical power consumption data being used to indicate power consumption of the server in a preset period; determining that the server is in a first power consumption mode in a plurality of power consumption modes according to the historical power consumption data, different power consumption modes corresponding to different power configuration determination methods, and different power consumption modes corresponding to different power consumption fluctuation degrees; predicting power consumption of the server in a period after the preset period according to the first power consumption mode, and determining power configuration required by the server matching the predicted power consumption according to the power configuration determination method corresponding to the first power consumption mode, to obtain a power configuration determination result.
[0005] In this scheme, different power consumption modes are designed to predict the subsequent power consumption of the server and predict the optimal power allocation required by the server in the subsequent period, thereby avoiding the risk of server overload and relieving the problem of excessive energy loss caused by excessive server power allocation.
[0006] In at least one implementation form of the first aspect of the present specification, the plurality of power consumption modes comprises at least one stable power consumption mode and at least one unstable power consumption mode, and the step of determining, according to the historical power consumption data, that the server is in a first power consumption mode from the plurality of power consumption modes can comprise: performing a separation degree determination on the historical power consumption data, the separation degree being used to indicate a fluctuation degree of power consumption of the server. In this step, if the separation degree is lower than a first expected value, the first power consumption mode is determined to be the stable power consumption mode; if the separation degree is higher than or equal to the first expected value, the first power consumption mode is determined to be the unstable power consumption mode.
[0007] In the above scheme, according to the fluctuation degree of power consumption of the server, the server with relatively stable power consumption is pre-divided into the category of stable power consumption mode, which helps to preferentially select the server with power consumption in the subsequent period being more easily predicted, so as to increase the accuracy of the power configuration determination result.
[0008] In at least one implementation form of the first aspect of the present specification, the method for determining the power configuration of the server can further comprise: removing abnormal power consumption data from the original historical power consumption data of the server to obtain the historical power consumption data.
[0009] In the above scheme, the removal of abnormal power consumption data can improve the reliability of the historical power consumption data, so as to facilitate the determination of the power consumption mode of the server.
[0010] In at least one implementation form of the first aspect of the present specification, the step of removing abnormal power consumption data from the original historical power consumption data of the server to obtain the historical power consumption data can comprise: dividing the original historical power consumption data according to a time granularity to obtain a plurality of power consumption samples; removing abnormal power consumption samples showing jumps from the plurality of power consumption samples based on a quantile method and / or a statistical index method to obtain the historical power consumption data.
[0011] In at least one implementation form of the first aspect of the present specification, if the first power consumption mode is the stable power consumption mode, the power configuration required by the server to match the predicted power consumption is determined according to the power configuration determination method corresponding to the first power consumption mode to obtain the power configuration determination result, comprising: taking the current power configuration of the server as the power configuration determination result.
[0012] In at least one implementation form of the first aspect of the present specification, there are a plurality of unstable power consumption modes, and the step of determining, according to the historical power consumption data, that the server is in a first power consumption mode from the plurality of power consumption modes can further comprise: if the first power consumption mode is an unstable power consumption mode, clustering the historical power consumption data to determine a power consumption state corresponding to a result of each cluster category; and determining the power consumption mode corresponding to the first power consumption mode based on the power consumption states corresponding to the results of all cluster categories.
[0013] If the server is in the unstable power consumption mode, it means that the server has a large fluctuation in power consumption, and multiple power consumption states appear. In the above scheme, the power consumption states are divided into categories by clustering, and the number of occurrences and the order of each power consumption state can be obtained. According to the distribution law of each power consumption state, the power consumption state that may appear in the subsequent period can be determined, so as to improve the accuracy of the power configuration determination result.
[0014] In at least one implementation form of the first aspect of the present specification, the step of clustering the historical power consumption data to determine the power consumption state corresponding to the result of each cluster category can comprise: classifying the power consumption state corresponding to the result of the cluster category with a duration not less than the second expected value and a power consumption not greater than the third expected value as a stable idle state; classifying the power consumption state corresponding to the result of the cluster category with a duration not less than the second expected value and a power consumption greater than the third expected value as a stable non-idle state; classifying the power consumption state corresponding to the result of the multiple cluster categories with a duration less than the second expected value, repeatedly fluctuating power consumption and adjacent to each other as a disordered state; and classifying the power consumption state corresponding to the result of the multiple cluster categories with a duration less than the second expected value, located between adjacent stable idle states and / or stable non-idle states and adjacent to each other as a transition state.
[0015] In at least one implementation form of the first aspect of the present specification, the step of determining the power consumption mode corresponding to the first power consumption mode based on the power consumption state corresponding to the result of all cluster categories can comprise: if the power consumption state corresponding to the cluster category in the first power consumption mode only includes the disordered state, determining the first power consumption mode as a disordered mode; and if the power consumption state corresponding to the cluster category in the first power consumption mode includes at least two of the stable idle state, the stable non-idle state, the disordered state and the transition state, determining the first power consumption mode as a mixed mode.
[0016] In at least one implementation form of the first aspect of the present specification, in the case where the first power consumption mode is determined as the disordered mode, the step of determining the power configuration required by the server to match the predicted power consumption according to the power configuration determination method corresponding to the first power consumption mode to obtain the power configuration determination result can comprise: arranging the data in the historical power consumption data from high to low in turn; starting from the highest power consumption data, intercepting part of the historical power consumption data, and taking the average value of the intercepted data as the power consumption in the to-be-predicted power consumption state of the server to determine the power configuration of the server in the to-be-predicted power consumption state.
[0017] In at least one implementation form of the first aspect of the present specification, in the case that the first power consumption mode is determined as the mixed mode, the step of determining the power configuration matching the predicted power consumption required by the server according to the power configuration determination method corresponding to the first power consumption mode to obtain the power configuration determination result can comprise: sorting the cluster categories according to time, determining the to-be-predicted power consumption state of the server based on the power consumption state corresponding to the cluster category closest in time, to determine the power configuration of the server in the to-be-predicted power consumption state.
[0018] In at least one implementation form of the first aspect of the present specification, in the case that the power consumption state corresponding to the cluster category closest in time is the transition state or the stable idle state, the step of determining the to-be-predicted power consumption state of the server based on the power consumption state corresponding to the cluster category closest in time to obtain the power configuration determination result can comprise: taking the power consumption state corresponding to the previous cluster category of the cluster category closest in time as the power consumption state in the to-be-predicted power consumption state of the server.
[0019] In at least one implementation form of the first aspect of the present specification, in the case that the power consumption state corresponding to the cluster category closest in time is the stable non-idle state, the step of determining the to-be-predicted power consumption state of the server based on the power consumption state corresponding to the cluster category closest in time to obtain the power configuration determination result can comprise: taking the stable non-idle state as the power consumption state in the to-be-predicted power consumption state of the server.
[0020] In at least one implementation form of the first aspect of the present specification, in the case that the power consumption state corresponding to the cluster category closest in time is the disordered state, the step of determining the to-be-predicted power consumption state of the server based on the power consumption state corresponding to the cluster category closest in time to obtain the power configuration determination result can comprise: arranging the power consumption data included by the cluster category closest in time in the historical power consumption data in descending order of power consumption; starting from the highest power consumption data, intercepting part of the historical power consumption data, and taking the average value of the intercepted data as the power consumption in the to-be-predicted power consumption state of the server to determine the power configuration determination result.
[0021] In at least one implementation form of the first aspect of the present specification, the server is one of a server cluster, and the method further comprises: determining a power consumption pattern of the server in the server cluster having historical power consumption data not less than a preset time period, and determining the power configuration determination result according to a power configuration determination method corresponding to the corresponding power consumption pattern; performing element granularity division on all servers in the server cluster, and classifying servers having the same working mode into a group, and for servers in the server cluster not having historical power consumption data or having historical power consumption data less than the preset time period, determining the power configuration determination result based on a power configuration determination method corresponding to a power consumption pattern of a server in the same group having historical power consumption data not less than the preset time period.
[0022] The second aspect of the present specification provides a determination apparatus of a power configuration of a server, which comprises an obtaining module, a determining module and a predicting module. The obtaining module is configured to obtain historical power consumption data of the server, and the historical power consumption data is used to indicate power consumption of the server in a preset time period. The determining module is configured to determine that the server is in a first power consumption mode in a plurality of power consumption modes according to the historical power consumption data, different power consumption modes correspond to different power configuration determination methods, and different power consumption modes correspond to different power consumption fluctuation degrees. The predicting module is configured to predict power consumption of the server in a time period after the preset time period according to the first power consumption mode, and determine a power configuration required by the server matching the predicted power consumption according to a power configuration determination method corresponding to the first power consumption mode, to obtain a power configuration determination result.
[0023] The third aspect of the present specification provides a terminal, which comprises a processor and a memory. The memory is used to store execution instructions, and the processor executes the execution instructions to implement the determination method of the power configuration of the server in the first aspect.
[0024] The fourth aspect of the present specification provides a computer readable storage medium, which stores execution instructions, and when a processor executes the execution instructions, the determination method of the power configuration of the server in the first aspect can be implemented. BRIEF DESCRIPTION OF DRAWINGS
[0025] Figure 1 The flow chart of the determination method of the power configuration of the server provided by an embodiment of the present specification.
[0026] Figure 2 The flow chart of the specific implementation of part of the steps of the determination method shown in the figure. Figure 1
[0027] Figure 3 The flow chart of the determination method of the power configuration of the server provided by an embodiment of the present specification.
[0028] Figure 4 A flow chart of the specific implementation of part steps of the determination method is shown. Figure 3 A flow chart of the specific implementation of part steps of the determination method is shown.
[0029] Figure 5 A power consumption profile of a server provided by an embodiment of the present specification in a hybrid mode.
[0030] Figure 6 A power consumption profile of a server provided by an embodiment of the present specification in another hybrid mode.
[0031] Figure 7 A power consumption profile of a server provided by an embodiment of the present specification in another hybrid mode.
[0032] Figure 8 A structure block diagram of a determination device of a power configuration of a server provided by an embodiment of the present specification.
[0033] Figure 9 A structure diagram of a terminal provided by an embodiment of the present specification. DETAILED DESCRIPTION
[0034] The technical solutions in the embodiments of the present specification will be described clearly and completely below with reference to the drawings in the embodiments of the present specification. Obviously, the described embodiments are only part of the embodiments of the present specification, rather than all the embodiments. Based on the embodiments in the present specification, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the protection scope of the present specification.
[0035] Data centers can significantly improve the utilization of information resources, thereby generating a good return on investment for the informatization of enterprises, and with the rapid development of social economy in the information age, the use of data centers is also growing. When data center manufacturers introduce servers, they need to focus on the energy consumption of the entire server based on revenue considerations, as it directly determines the amount of electricity consumed by the server during its entire life cycle. Therefore, how to reduce the energy consumption of the server has always been a key consideration in designing data centers. For example, in practical applications, the number of servers needs to be reasonably planned in the cabinet / column of the data center, and as the amount and types of business increase, it may be necessary to increase or decrease the number of servers in the cabinet / column to adapt to business needs. However, if the number of servers in the cabinet / column is increased, as the server usage rate rises, there may be an overload risk due to the rising power consumption of the server; if the data center determines the power quota required by the server based on a higher power consumption standard to avoid the above overload risk, it will also lead to overuse of the power supply of the cabinet / column, resulting in excessive energy waste, and also waste of the space of the cabinet / column, thereby increasing the operating cost of the data center.
[0036] In practical applications, methods such as giving power consumption values based on power consumption dictionaries, full-time set sampling portraits, and tuple granularity portraits can be used to determine the power consumption of the server to determine the power quota required by the server accordingly. However, the accuracy of predicting the power consumption of the server in the subsequent period by the above-mentioned methods is very low, and cannot simultaneously meet the two needs of avoiding server overload risk and reasonably determining the power quota required by the server.
[0037] For example, in the method of determining server power consumption based on power consumption dictionary given power consumption value, the server power consumption dictionary is queried according to the load rate of the server specified by the related business, so that the power consumption at the load rate is taken as the on-shelf power consumption, thereby determining the power consumption of the server in the subsequent period. However, in this method, the load rate of the server specified by the business is mainly estimated by manual, and there are a series of problems such as inaccurate estimated power consumption, incomplete measured data of power consumption dictionary, and differences between experimental load and actual load of power consumption dictionary, which makes the determined power consumption of the server in the subsequent period and the real power consumption have a large error, thereby existing an overload risk, or leading to an estimated power quota that is too large and causing excessive energy waste.
[0038] For example, in a method of determining server power consumption based on full-time set sampling images, a sliding window can be used to average the power consumption of the server per day to obtain data in the hour with the highest power consumption per day, and then all the highest power consumption data and their corresponding time in a certain time period are summarized to form an image to determine the power consumption of the server. However, in this method, longer power consumption data is required, which includes too much dirty data and interferes with the estimation of the current stage power consumption data, making it difficult to accurately determine the power consumption of the server in the subsequent period.
[0039] For example, in a method of determining server power consumption based on tuple granularity images, the tuple image of a server with a short running time or whose power consumption has not yet reached a normal working state (e.g., the target server described below) can be used to estimate the power consumption of the server. Here, the tuple image can refer to using the power consumption data of a normal server of the same model, department, and product line to image the target server, thereby directly obtaining the power consumption of the target server. This solution can alleviate the server overload risk problem to some extent, but this method is too general and lacks refinement, i.e., the actual power consumption of the target server cannot be accurately obtained, and there is still a risk of server overload and the determined power allocation is too large (much larger than the actual power consumption of the server), resulting in excessive waste of energy.
[0040] To solve the above problems, the power consumption data of each server in the data center during operation can be statistically analyzed to analyze the power consumption regularity of the server. Based on the power consumption regularity of the server, the subsequent power consumption of the server can be inferred. However, the above method will face some technical problems in actual application, for example: if the power consumption data of the server in a short running time period is used, the load risk problem existing before a long running time may be ignored; if the power consumption data of the server in a long running time period is used, there will be more dirty data in the power consumption data, which will affect the analysis result, making the predicted power consumption too high or too low compared to the actual power consumption.
[0041] In view of the above situation, this specification provides a method, a determination device and a terminal for determining the power configuration of a server. Based on the fluctuation of the power consumption of the server and its corresponding power configuration, the power consumption mode of the server is classified in advance. Accordingly, different power consumption modes correspond to specific power configuration methods. In this way, when predicting the power consumption of the server, the power consumption mode of the server can be identified based on the fluctuation of the historical power consumption of each server, and then the power consumption of the server in the subsequent time period can be predicted based on the power configuration method corresponding to the identified power consumption mode, so as to infer the optimal power quota corresponding to the server in the subsequent time period. This method can avoid the risk of server overload while alleviating the situation of excessive energy loss due to excessive server power quota, that is, it solves the problem of balancing benefits and risks in the process of allocating power consumption of the server.
[0042] Hereinafter, a method, a device, and a terminal for determining the power configuration of a server according to at least one embodiment of this specification will be described with reference to the accompanying drawings.
[0043] like Figure 1 As shown, the method for determining the power configuration of a server provided by at least one embodiment of this specification may include the following steps S110 to S130.
[0044] S110: Obtain historical power consumption data of the server.
[0045] Historical power consumption data is used to indicate the power consumption of the server within a preset time period. For example, historical power consumption data can come from a power consumption table registered when purchasing or configuring the server. This power consumption data can be power consumption data at a preset time granularity. For example, the preset time granularity can be designed based on actual business conditions. For example, the business planning cycle can be divided into equal parts to obtain the preset time granularity. For example, assuming the business planning cycle is weekly, the preset time granularity can be daily.
[0046] The preset period ends at the present time, that is, as the server runs, the historical power consumption data is intercepted from the power consumption data of the entire server by means of a sliding window. While ensuring that the intercepted power consumption data is sufficient for analyzing the power consumption fluctuation pattern of the entire server, it does not include power consumption data from too long ago (which may include dirty data) as the server runs, thereby reducing the risk of inaccurate configuration determination results due to including too much dirty data. The preset period can be designed according to actual business conditions. For example, if the business planning cycle is designed to be in intervals of weeks (7 days) (for example, business planning and adjustment are performed once a week), the preset period can be a multiple of weeks, for example, it can be set to ten weeks, twenty weeks, etc.
[0047] S120, determine, according to the historical power consumption data, that the server is in a first power consumption mode among multiple power consumption modes. Different power consumption modes correspond to different power configuration determination methods, and different power consumption modes correspond to different power consumption fluctuation degrees.
[0048] By counting the relevant information of the power configuration corresponding to the different power consumptions of the server, the power consumption mode of the server can be divided in advance according to the power consumption fluctuation degree of the server. Correspondingly, each power consumption mode corresponds to a specific power configuration determination method, which is used to determine the power quota required by the server. In this way, the power consumption fluctuation degree can be obtained according to the historical power consumption data of the current server, and the current power consumption mode (first power consumption mode) can be obtained and the power configuration determination method matched with the power consumption mode can be determined.
[0049] S130, predict the power consumption of the server in a period after a preset period according to the first power consumption mode, and determine the power configuration required by the server matched with the predicted power consumption according to the power configuration determination method corresponding to the first power consumption mode, to obtain the power configuration determination result.
[0050] In the above steps S110-S130, based on the analysis of the historical power consumption data of the current server, the power consumption fluctuation degree of the current server can be obtained, and the matched power consumption mode (first power consumption mode) can be determined. Based on the power consumption mode, the power consumption of the current server in the subsequent period can be predicted, and the power configuration required in the subsequent period can be determined based on the power configuration determination method corresponding to the power consumption mode (first power consumption mode), so as to determine the optimal power quota (power configuration determination result) required by the server in the subsequent period. This makes the server not overload due to insufficient power quota to match the power consumption load, thereby avoiding the risk of server overload, and also can alleviate or solve the problem of excessive energy loss caused by excessive power quota of the server.
[0051] It should be noted that the subject of determining the power configuration of the server (performing the above steps S110-S130) can be itself or other servers such as a central server. For example, the server can be a server in a server cluster, and a server in the server cluster can be configured to determine the power configuration of each server.
[0052] The power consumption fluctuation of the server can be in various forms. The power consumption fluctuation of some servers is relatively small, i.e., the power consumption is relatively stable in a long term. If the power consumption of the server is maintained stable, the server will have a high probability to continue maintaining the current power consumption level. Thus, in the above determination method, the power consumption mode of the server with relatively stable power consumption (e.g., the stable power consumption mode described below) can be separately divided as a category for priority determination. In this way, not only the determination result of the power configuration of part of the servers (assuming that the server determines the power consumption mode corresponding to the first category) can be relatively more accurate, but also the number of servers faced when identifying the power consumption mode of the server with obvious power consumption fluctuation can be reduced, which helps to improve the operation speed when determining the power configuration.
[0053] For example, in the determination method of the power configuration of the server provided in at least one embodiment of the present specification, the plurality of power consumption modes includes at least one stable power consumption mode and at least one unstable power consumption mode. Thus, the step S120 described above can include: performing separation degree determination on the historical power consumption data, the separation degree being used to indicate the fluctuation degree of the power consumption of the server. The separation degree (or the dispersion degree) can be the correlation ratio of the mean value and the standard deviation of the power consumption data set. If the separation degree is low, it can reflect that the power consumption of the server does not fluctuate greatly to a certain extent.
[0054] In step S120, as shown in Figure 2 , in the process of performing separation degree determination on the historical power consumption data (process 101 in Figure 2 ), it is determined whether the separation degree is a first expected value (process 102 in Figure 2 ). If the separation degree is lower than the first expected value, it is determined that the first power consumption mode is a stable power consumption mode 103. If the separation degree is higher than or equal to the first expected value, it is determined that the first power consumption mode is an unstable power consumption mode 104. In this scheme, according to the fluctuation degree of the power consumption of the server, the server with relatively stable power consumption is pre-divided into the category of stable power consumption mode, which helps to preferentially select the server with power consumption in the subsequent period that can be more easily predicted, so as to increase the accuracy of the determination result of the power configuration.
[0055] In the case where the power consumption of the server is stable, the power consumption can also be high or low. Thus, according to the high or low of the power consumption, a plurality of stable power consumption modes can be designed, and the power consumption states (e.g., including the power consumption size) in different stable power consumption modes are different. For example, as shown in Figure 2As shown, whether the server is in an idle state is determined based on the server's CPU load, so that the server's power consumption mode is divided into a stable idle mode and a stable non-idle mode. When the server's power consumption mode is classified as stable idle mode, the server's CPU load is relatively small, and the power consumption level in this state cannot represent the power consumption data of the server during normal operation. When the server's power consumption mode is classified as stable non-idle mode, it indicates that the server is operating normally, and the power consumption level in this state represents the power consumption data of the server during normal operation.
[0056] For example, in an embodiment of the present specification, the demarcation criterion for power consumption in stable idle mode and stable non-idle mode can be set based on the occupancy rate of the server's CPU when it is at the boundary of whether it is working normally. If the power consumption is lower than the demarcation criterion, it means that the server's CPU has not yet started to be used to process business-related data. For example, the CPU occupancy rate corresponding to the demarcation criterion is any value within the range of 3% to 20%, such as 5%, 8%, 10%, 15%, etc. It should be noted that the CPU occupancy rate corresponding to the demarcation criterion can be determined or manually set according to the operating status of the server under actual business, and is not limited to the above-mentioned numerical range. For example, Figure 2 As shown, in step S120, after determining that the first power consumption mode is the stable power consumption mode 103, it is determined whether the power consumption is lower than the above-mentioned boundary standard ( Figure 2 In step 105), if the power consumption is lower than the demarcation standard, the first power consumption mode is determined to be a stable idle mode 106; if the power consumption is greater than or equal to the demarcation standard, the first power consumption mode is determined to be a stable non-idle mode 107.
[0057] It should be noted that servers in stable idle mode are prone to the risk of overload. After the server's power consumption mode is determined to be stable idle mode, this type of server can be classified to verify the working status of the server, or the power quota required for this type of server can be separately designed to reduce the risk of overload.
[0058] For example, the method for determining the power configuration of a server provided in at least one embodiment of this specification may also include the following steps: Figure 3 Step S100 shown: Abnormal power consumption data is removed from the server's original historical power consumption data to obtain historical power consumption data. If the original historical power consumption data is used directly as historical power consumption data, it may be contaminated with abnormal power consumption data. This abnormal power consumption data does not represent the normal operating state of the server but increases the degree of power consumption fluctuation of the server, making it more difficult to pre-classify and determine the server's power consumption mode. In this solution, removing abnormal power consumption data can improve the reliability of the historical power consumption data, making it easier to determine the server's power consumption mode.
[0059] In the method for determining the power configuration of the server provided in at least one embodiment of the present specification, the specific implementation of step S100 can be: dividing the original historical power consumption data according to a time granularity to obtain a plurality of power consumption samples; removing abnormal power consumption samples presenting jumps from the plurality of power consumption samples based on the quantile method and / or the statistical index method to obtain historical power consumption data. In the data processing of the quantile method and / or the statistical index method, the abnormal power consumption samples present as jump points and obvious abnormal points.
[0060] In the case where the server is determined to be in the stable power consumption mode, the power consumption of the server is basically stable, so the power consumption of the server in the subsequent period can be directly obtained; however, in the case where the server is determined to be in the unstable power consumption mode, the server includes a plurality of power consumption states in the entire preset period, and various power consumption states present a plurality of combinations in different orders of time periods, which greatly increases the difficulty of the design work in the early stage if a power consumption mode is designed for each combination and a corresponding power configuration determination method is configured. For example, assuming that four power consumption states are preset, the preset period is set to have at most five power consumption states limited by the second expected value, and even if only the case where there are five power consumption states is counted, the number of unstable power consumption modes is 4x3x3x3x3=324.
[0061] In the determination of the power configuration of the server in the subsequent period, the power consumption data of the current period or the period close to the current period is more likely to approach the real power consumption that may occur in the subsequent period. Therefore, the specific power consumption types included in the stable power consumption mode and the unstable power consumption mode can be designed in advance based on the number of power consumption states occurring in the preset period and the power consumption state presented in the current period. In the following, the above method is described through several specific embodiments.
[0062] In the method for determining the power configuration of the server provided in some embodiments of the present specification, if the first power consumption mode is the stable power consumption mode, step S130 can include: taking the current power configuration of the server as the power configuration determination result. As described in the foregoing related embodiments, the power consumption in the stable power consumption mode is relatively stable, and the entire preset period (including the current period) only corresponds to one power consumption state, which will probably continue, so the power consumption of the server in the current period can be directly taken as the power consumption to be predicted in the subsequent period.
[0063] In the method for determining the power configuration of the server provided in some other embodiments of the present specification, a plurality of unstable power consumption modes can be set, and the step S120 can include: if the first power consumption mode is an unstable power consumption mode, clustering the historical power consumption data to determine the power consumption state corresponding to the result of each cluster category; and determining the power consumption mode corresponding to the first power consumption mode based on the power consumption state corresponding to the result of all cluster categories. In the above scheme, the cluster method is used to divide the categories of the power consumption state of the server, and the number of times, the order, the combination, and the current stage of the power consumption state of each power consumption state can be obtained. Based on this, the distribution rule of each power consumption state can be analyzed, and the power consumption state that can appear in the subsequent period of the server can be determined, so as to improve the accuracy of the power configuration determination result.
[0064] For example, the types of the power consumption state that can appear in the server are pre-classified as stable idle state, stable non-idle state, disordered state, and transition state, and the determination criteria of the four power consumption states are: the power consumption state corresponding to the result of the cluster category with the duration not less than the second expected value and the power consumption not greater than the third expected value is classified as the stable idle state; the power consumption state corresponding to the result of the cluster category with the duration not less than the second expected value and the power consumption greater than the third expected value is classified as the stable non-idle state; the power consumption state corresponding to the result of the plurality of cluster categories with the duration less than the second expected value, the power consumption repeatedly fluctuating, and being adjacent to each other is classified as the disordered state; and the power consumption state corresponding to the result of the plurality of cluster categories with the duration less than the second expected value, being located between the adjacent stable idle state and / or stable non-idle state, and being adjacent to each other is classified as the transition state.
[0065] The second expected value can be designed according to the set expected period, for example, it can be 1 / 3, 1 / 4, etc. of the expected period, or it can be a specific time period. The third expected value can be the "division standard" used to determine whether the CPU participates in the business processing work in the foregoing embodiments.
[0066] It should be noted that in the embodiments of the present specification, the power consumption state of the server can be classified according to actual needs, and is not limited to the above four.
[0067] Next, taking the classification of the power consumption state as the stable idle state, the stable non-idle state, the disordered state, and the transition state as an example, an implementation of the steps S120 and S130 in the above embodiments of the present specification is described.
[0068] For example, in at least one embodiment of the present specification, the unstable power consumption mode is subdivided into two categories: disordered mode and mixed mode. Specifically, as shown in FIG. 2, in the step S120, the historical power consumption data is clustered Figure 4 Figure 4 After the process 108 in the method 100, the step of determining the power consumption mode corresponding to the first power consumption mode based on the power consumption state corresponding to the result of all clustering categories can include: determining whether the clustering result only includes the disordered state (S130). Figure 4 After the process 109 in the method 100, if the power consumption state corresponding to the clustering category in the first power consumption mode only includes the disordered state, the first power consumption mode is determined as the disordered mode 111; if the power consumption state corresponding to the clustering category in the first power consumption mode includes at least two of the stable idle state, the stable non-idle state, the disordered state and the transition state (i.e., does not only include the disordered state), the first power consumption mode is determined as the mixed mode 110.
[0069] If the power consumption state of the server is always in the disordered state, i.e., in the case that the first power consumption mode is determined as the disordered mode, the above step S130 can include: arranging the data in the historical power consumption data from high to low in turn; starting from the highest power consumption data, intercepting part of the historical power consumption data, and taking the average value of the intercepted data as the power consumption in the power consumption state to be predicted of the server, to determine the power configuration of the server in the power consumption state to be predicted.
[0070] In the disordered mode, the power consumption state of the subsequent period is also maintained as the disordered state, but the power consumption fluctuation in the disordered state is large, and if all the power consumption data is used to take the average as the power consumption of the subsequent period, there may be a risk of excessive load, so the data with large power consumption can be collected to take the average as the power consumption data of the subsequent period, so as to determine the power configuration. For example, the proportion of the intercepted data from the historical power consumption data can be 40% to 98%, such as 50%, 60%, 70%, 80%, 90%, etc. It should be noted that the smaller the proportion of the intercepted data, the greater the predicted power consumption of the subsequent period, which can further reduce the risk of excessive load. The proportion of the intercepted data can be designed according to the actual business situation, and can not be limited to the above numerical range.
[0071] In the mixed mode, the current power consumption state of the server can be any one of the stable idle state, the stable non-idle state, the disordered state and the transition state, and the transition state cannot be used to accurately determine whether the power consumption of the server is long-term maintained, and the server in the stable idle state has an overload risk. Therefore, it is necessary to determine the current power consumption state of the server to predict the power consumption state of the server in the subsequent period in combination with the arrangement rule of each power consumption state. For example, in the case that the first power consumption mode is determined as the mixed mode, the above step S130 can include: sorting the clustering categories according to time, determining the power consumption state to be predicted of the server based on the power consumption state corresponding to the clustering category with the latest time, to determine the power configuration of the server in the power consumption state to be predicted.
[0072] The following, in the server power consumption mode is determined as the mixed mode, with the current period of power consumption state (time the latest cluster category corresponding to the power consumption state) is stable idle state, stable non-idle state, disordered state and transition state as an example, the specific implementation of the above step S130 is described.
[0073] In one specific example, in the case where the power consumption state corresponding to the time latest cluster category is the transition state or the stable idle state, the step of determining the to-be-predicted power consumption state of the server based on the power consumption state corresponding to the time latest cluster category to obtain the power configuration determination result can include: taking the power consumption state corresponding to the previous cluster category of the time latest cluster category as the power consumption state in the to-be-predicted power consumption state of the server. Specifically as Figure 5 shown, the current stage power consumption state of the server is the stable idle state, and the power consumption state of the previous time period is the disordered state, so the power consumption state of the server in the subsequent period is also predicted to present the disordered state. It should be noted that, Figure 5 The trend curve in the figure includes scatter points (each point corresponds to a power consumption sample), and the other line represents the CPU occupancy rate of the server. The horizontal coordinate represents time (days), the value range interval of one vertical coordinate is 150-500, and the unit of the power consumption is W. The value range interval of the other vertical coordinate is 0-100, and the occupancy rate is a percentage. In addition, the power consumption when the predicted power consumption state is the disordered state can be referred to the related description of the disordered mode in the foregoing embodiment, which is not repeated here.
[0074] It should be noted that, in the example as Figure 5 shown, because the transition state and the stable idle state are preset to be unable to be used as the determination result of the power consumption state of the subsequent period, the power consumption state corresponding to the previous cluster category of the time latest cluster category is taken as the power consumption state in the to-be-predicted power consumption state of the server, and the other power consumption state that is closest to the current period power consumption state (transition state or stable idle state) and excludes the transition state and the stable idle state is obtained from the near to the far, which is the disordered state or the stable non-idle state.
[0075] In another specific example, as Figure 6 shown, in the case where the power consumption state corresponding to the time latest cluster category is the stable non-idle state, the step of determining the to-be-predicted power consumption state of the server based on the power consumption state corresponding to the time latest cluster category to obtain the power configuration determination result can include: taking the stable non-idle state as the power consumption state in the to-be-predicted power consumption state of the server. It should be noted that, Figure 6 The trend curve in the figure and the meanings of the coordinates can be referred to the related description of the attached Figure 5 in the foregoing embodiment, which is not repeated here.
[0076] In another specific example, Figure 7 As shown, when the power consumption state corresponding to the most recent cluster category is a disordered state, the step of determining the power consumption state of the server to be predicted based on the power consumption state corresponding to the most recent cluster category to obtain the power configuration determination result may include: arranging the power consumption data included in the historical power consumption data by the most recent cluster category in order from high to low according to power consumption; intercepting part of the historical power consumption data starting from the highest power consumption data, and taking the average value of the intercepted data as the power consumption in the power consumption state to be predicted of the server to determine the power configuration determination result, that is, the power consumption state of the server in the subsequent time period is predicted to be a disordered state. It should be noted that, Figure 7 The meaning of the situation curve and each coordinate in the above can be found in the attached Figure 5 in addition, regarding the predicted power consumption state being the power consumption in the disordered state, reference can be made to the related description of the disordered mode in the aforementioned embodiment, which will not be repeated here.
[0077] According to the above description, when the power consumption mode of the server is determined to be in a mixed mode, the current time period or a reliable power consumption state closest to the current time period (such as a disordered state and a stable non-idle state) is used to predict the power consumption state of the server in subsequent time periods, and only the power consumption data in a time segment of the preset time period is used for prediction, so that the determination result will not be interfered with by the power consumption data of other time periods, so as to obtain a more accurate determination result.
[0078] In at least one embodiment of this specification, the method for determining a server's power configuration is provided, and the server is a server in a server cluster. In actual applications, some servers in a data center have been operating for a long time and have relatively reliable historical power consumption data, while other servers may have insufficient or unreliable historical power consumption data due to new configurations or changes in service types. Therefore, in actual operations, these servers can be categorized to determine their power configurations separately.
[0079] For example, the method for determining the power configuration of the server provided by at least one of the embodiments of the present specification can further include: determining the power consumption mode of the server in the server cluster that has historical power consumption data not less than a preset time period, and determining the power configuration determination result according to the power configuration determination method corresponding to the corresponding power consumption mode; performing element granularity division on all servers in the server cluster, and classifying servers with the same working mode into a group, and for servers in the server cluster that do not have historical power consumption data or have historical power consumption data less than the preset time period, determining the power configuration determination result based on the power consumption mode of the server in the same group that has historical power consumption data not less than the preset time period. In this way, for servers with reliable historical power consumption data, the power consumption state of the subsequent period is predicted according to the steps in the foregoing embodiments, and the corresponding power configuration is determined; and for servers without reliable historical power consumption data, the power consumption state of the subsequent period can be directly referred to the predicted power consumption state of the servers of the same type (such as the same or similar model, business object, etc.).
[0080] At least one of the embodiments of the present specification provides a determination device of a power configuration of a server, as shown in the figure, Figure 8 The determination device includes an acquisition module 10, a determination module 20 and a prediction module 30. The acquisition module 10 is configured to acquire historical power consumption data of the server, and the historical power consumption data is used to indicate the power consumption of the server in a preset time period. The determination module 20 is configured to determine that the server is in a first power consumption mode in a plurality of power consumption modes according to the historical power consumption data, and different power consumption modes correspond to different power configuration determination methods, and different power consumption modes correspond to different power consumption fluctuation degrees. The prediction module 30 is configured to determine the power configuration required by the server to match the predicted power consumption according to the power configuration determination method corresponding to the first power consumption mode, to obtain a power configuration determination result. The process of the determination device for determining the power configuration of the server can be referred to the related description of the method for determining the power configuration of the server in the foregoing embodiments, which will not be repeated here.
[0081] At least one of the embodiments of the present specification provides a terminal, as shown in the figure, Figure 9 The terminal 200 includes a memory 210 and a processor 220. The memory 210 is used to store execution instructions, and the processor 220 executes the execution instructions to implement the method for determining the power configuration of the server in the foregoing embodiments.
[0082] The processor can include one or more processing cores. The processor connects various parts within the terminal by various interfaces and lines, and performs various functions of the terminal and processes data by running or executing instructions stored in the memory and calling data stored in the memory. For example, the processor can be implemented in at least one of hardware forms of digital signal processing, field programmable gate array, programmable logic array. The processor can be integrated with a combination of one or more of a central processing unit, an image processor, a modem, and the like.
[0083] The memory can include a random access memory and can also include a read only memory. For example, the memory includes a non-transitory computer readable medium to store instructions.
[0084] The computer readable storage medium stores an execution instruction, and when a processor executes the execution instruction, the determination method of the power configuration of the server in the above embodiments can be implemented. For example, when the instruction is executed, the following operations can be performed: obtaining historical power consumption data of the server, the historical power consumption data being used to indicate power consumption of the server in a preset time period; determining that the server is in a first power consumption mode in a plurality of power consumption modes according to the historical power consumption data, different power consumption modes corresponding to different power configuration determination methods, and different power consumption modes corresponding to different power consumption fluctuation degrees; and determining the power configuration required by the server to match the predicted power consumption according to the power configuration determination method corresponding to the first power consumption mode, and obtaining a power configuration determination result.
[0085] For example, the readable storage medium includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like.
[0086] The above only describes the preferred embodiments of the present specification and does not limit the present specification. Any modification, equivalent replacement, etc. made within the spirit and principle of the present specification shall be included in the protection scope of the present specification.
Claims
1. A method for determining power configuration of a server, characterized in that: include: Acquire historical power consumption data of the server, where the historical power consumption data is used to indicate the power consumption of the server within a preset time period; Determining, based on the historical power consumption data, that the server is in a first power consumption mode among multiple power consumption modes, where different power consumption modes correspond to different power configuration determination methods, and different power consumption modes correspond to different power consumption fluctuation degrees, where the multiple power consumption modes include: a stable power consumption mode and an unstable power consumption mode, where the stable power consumption mode includes: a stable idle mode and a stable non-idle mode, and where the unstable power consumption mode includes a disordered mode and a mixed mode; The power consumption of the server in the period after the preset period is predicted according to the first power consumption mode, and the power configuration required by the server that matches the predicted power consumption is determined according to the power configuration determination method corresponding to the first power consumption mode to obtain a power configuration determination result.
2. The determination method according to claim 1, characterized in that The determining, according to the historical power consumption data, that the server is in a first power consumption mode among multiple power consumption modes includes: Determining a degree of separation of the historical power consumption data, where the degree of separation is used to indicate a degree of fluctuation in power consumption of the server; If the separation degree is lower than a first expected value, determining that the first power consumption mode is a stable power consumption mode; If the separation degree is higher than or equal to the first expected value, it is determined that the first power consumption mode is an unstable power consumption mode.
3. The determination method according to claim 1, characterized in that Also includes: The historical power consumption data is obtained by removing abnormal power consumption data from original historical power consumption data of the server.
4. The determination method according to claim 3, characterized in that: The removing abnormal power consumption data from original historical power consumption data of the server to obtain the historical power consumption data includes: Dividing the original historical power consumption data according to time granularity to obtain multiple power consumption samples; Abnormal power consumption samples showing jumps are removed from the multiple power consumption samples based on a quantile method and / or a statistical indicator method to obtain the historical power consumption data.
5. The determination method according to any one of claims 2 to 4, characterized in that: If the first power consumption mode is the stable power consumption mode, determining a power configuration required by the server that matches the predicted power consumption according to the power configuration determination method corresponding to the first power consumption mode to obtain a power configuration determination result includes: The current power configuration of the server is used as the power configuration determination result.
6. The determination method according to any one of claims 2 to 4, characterized in that: The unstable power consumption mode includes multiple unstable power consumption modes, and determining that the server is in a first power consumption mode among the multiple power consumption modes according to the historical power consumption data further includes: If the first power consumption mode is the unstable power consumption mode, clustering the historical power consumption data to determine a power consumption state corresponding to a result of each clustering category; The power consumption mode corresponding to the first power consumption mode is determined based on the power consumption states corresponding to the results of all the clustering categories.
7. The determination method according to claim 6, characterized in that: Clustering the historical power consumption data to determine a power consumption state corresponding to a result of each clustering category includes: classifying the power consumption state corresponding to the result of the clustering category whose duration is not less than the second expected value and power consumption is not greater than the third expected value as a stable idle state; classifying the power consumption state corresponding to the result of the clustering category whose duration is not less than the second expected value and whose power consumption is greater than the third expected value as a stable non-idle state; classifying the power consumption states corresponding to the results of the plurality of cluster categories whose duration is less than the second expected value, power consumption fluctuates repeatedly and is adjacent to each other as a disordered state; The power consumption states corresponding to the results of the plurality of cluster categories whose duration is less than the second expected value, located between two adjacent stable idle states and / or stable non-idle states and adjacent to each other are classified as transition states.
8. The determination method according to claim 7, characterized in that: The determining, based on the power consumption states corresponding to the results of all the clustering categories, the power consumption mode corresponding to the first power consumption mode includes: If the power consumption states corresponding to the clustering categories in the first power consumption mode only include disordered states, determining the first power consumption mode as a disordered mode; If the power consumption states corresponding to the cluster categories in the first power consumption mode include at least two of a stable idle state, a stable non-idle state, a disordered state, and a transition state, the first power consumption mode is determined to be a mixed mode.
9. The determination method according to claim 8, characterized in that: When the first power consumption mode is determined to be a disordered mode, determining a power configuration required by the server that matches the predicted power consumption according to the power configuration determination method corresponding to the first power consumption mode to obtain a power configuration determination result includes: Arrange the data in the historical power consumption data in order from high to low; Part of the historical power consumption data is intercepted starting from the highest power consumption data, and the average value of the intercepted data is used as the power consumption of the server in the power consumption state to be predicted, so as to determine the power configuration of the server in the power consumption state to be predicted.
10. The determination method according to claim 8, characterized in that: When the first power consumption mode is determined to be a mixed mode, determining a power configuration required by the server that matches the predicted power consumption according to the power configuration determination method corresponding to the first power consumption mode to obtain a power configuration determination result includes: The cluster categories are sorted by time, and the power consumption state to be predicted of the server is determined based on the power consumption state corresponding to the cluster category with the latest time, so as to determine the power configuration of the server in the power consumption state to be predicted.
11. The determination method according to claim 10, characterized in that: The determining the power consumption state to be predicted of the server based on the power consumption state corresponding to the cluster category most recently, and obtaining a power configuration determination result, includes: When the power consumption state corresponding to the most recent cluster category is the transition state or the stable idle state, taking the power consumption state corresponding to the previous cluster category of the most recent cluster category as the power consumption state in the power consumption state to be predicted of the server; When the power consumption state corresponding to the cluster category that is most recent in time is the stable non-idle state, taking the stable non-idle state as the power consumption state in the power consumption state to be predicted of the server; When the power consumption state corresponding to the most recent clustering category is the disordered state, the power consumption data included in the most recent clustering category in the historical power consumption data are arranged in order from high to low according to power consumption, and part of the historical power consumption data is intercepted starting from the highest power consumption data, and the average value of the intercepted data is used as the power consumption in the power consumption state to be predicted of the server, so as to determine the power configuration determination result.
12. The determination method according to claim 1, characterized in that: The server is a server in a server cluster, and the determination method further includes: Determining the power consumption mode of the server in the server cluster having historical power consumption data of not less than the preset period, and determining the power configuration determination result according to the power configuration determination method corresponding to the corresponding power consumption mode; All servers in the server cluster are divided into element granularity, and servers with the same working mode are classified into a group. For servers in the server cluster that have no historical power consumption data or have historical power consumption data less than the preset time period, the power configuration determination result is determined based on the power configuration determination method corresponding to the power consumption mode of the servers in the same group that have historical power consumption data not less than the preset time period.
13. A device for determining power configuration of a server, characterized in that: include: an acquisition module configured to acquire historical power consumption data of the server, wherein the historical power consumption data is used to indicate the power consumption of the server within a preset time period; a determination module configured to determine, based on the historical power consumption data, that the server is in a first power consumption mode among multiple power consumption modes, wherein different power consumption modes correspond to different power configuration determination methods, and different power consumption modes correspond to different power consumption fluctuation degrees, the multiple power consumption modes include: a stable power consumption mode and an unstable power consumption mode, the stable power consumption mode includes: a stable idle mode and a stable non-idle mode, and the unstable power consumption mode includes a disordered mode and a mixed mode; The prediction module is configured to predict the power consumption of the server in a period after the preset period based on the first power consumption mode, and determine the power configuration required by the server that matches the predicted power consumption based on the power configuration determination method corresponding to the first power consumption mode to obtain a power configuration determination result.
14. A terminal, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store execution instructions, and the processor executes the execution instructions to implement the method for determining the power configuration of the server according to any one of claims 1 to 12.
15. A computer-readable storage medium, characterized in that The computer-readable storage medium stores an execution instruction, and when the processor executes the execution instruction, the method for determining the power configuration of the server according to any one of claims 1 to 12 is implemented.
Citation Information
Patent Citations
Power load distribution method and device, computer equipment and storage medium
CN113449929A
Server cluster management method and device, electronic equipment and storage medium
CN114201369A