A server management method, program product, and device based on load prediction
By predicting the future load of slave servers from the master server and adjusting operating parameters using mapping relationships and PID controllers, the problems of lag and low energy efficiency in existing technologies are solved, thereby optimizing server operation management and reducing energy consumption.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZIGUANG HENGYUE TECH CO LTD
- Filing Date
- 2025-10-17
- Publication Date
- 2026-06-05
AI Technical Summary
In existing server management technologies, static threshold adjustment or dynamic adjustment based on real-time load lacks predictability of future load, leading to problems such as slow response, low energy efficiency, and accelerated hardware wear and tear.
The master server predicts future load based on load data periodically uploaded from the slave server, and uses mapping relationships and PID controllers to adjust operating parameters, especially making smooth fine-tuning within the load range boundaries to avoid frequent jumps in operating parameters.
It enables proactive and forward-looking server operation management, reduces energy consumption, avoids hardware lifespan depletion and performance fluctuations, and optimizes server operation strategies.
Smart Images

Figure CN120950342B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of server technology, and more specifically, to a server management method, program product, and device based on load prediction. Background Technology
[0002] With the rapid development of cloud computing and artificial intelligence, the energy consumption of intelligent computing servers has become increasingly prominent. In related technologies, server operation and management often employ static threshold adjustments or dynamic adjustments based on real-time load, but these methods suffer from various problems such as response lag, low energy efficiency, and accelerated hardware wear. Therefore, optimizing server operation and management has become a pressing technical problem to be solved in this field. Summary of the Invention
[0003] The purpose of this application is to provide a server management method, program product, and device based on load prediction, so as to achieve the technical effect of optimizing server operation and management.
[0004] The first aspect of this application provides a server management method based on load prediction, wherein the server includes a master server and slave servers, the method is applied to the master server, and the method includes:
[0005] Based on the load data periodically uploaded by the server, predict the load of the server in the future.
[0006] Based on the predicted load and the preset mapping relationship, the first operating parameters of the slave server are determined; wherein the mapping relationship is used to indicate the corresponding operating parameters in different load ranges; the operating parameters include frequency and / or voltage.
[0007] If the predicted load is within the boundary range of the load interval, the first operating parameter is adjusted based on the load deviation to obtain the second operating parameter; wherein, the load deviation is used to characterize the difference between the predicted load and the boundary value of the load interval;
[0008] The slave server is controlled to run under target operating parameters; the target operating parameters are either the first operating parameters or the second operating parameters.
[0009] In the above implementation process, firstly, by predicting the load of the slave server in the future using load data periodically uploaded from the slave server, the master server can adjust the operating parameters of the slave server in advance based on the predicted load. Compared with static threshold adjustment or dynamic adjustment based on real-time load in related technologies, the operation management of this application is more forward-looking and proactive. Secondly, when the predicted load is within the boundary range of the load interval, adjusting the first operating parameter based on the mapping relationship through load deviation can effectively prevent the operating parameter from jumping, thereby reducing the energy consumption of the slave server, avoiding the consumption of hardware lifespan, and eliminating performance jitter caused by the jump of operating parameters, thus optimizing the server's operation management strategy.
[0010] Further, the first operating parameter includes a first voltage; the step of adjusting the first operating parameter based on the load deviation to obtain the second operating parameter includes:
[0011] Determine the control parameters of the PID controller;
[0012] The voltage adjustment value is determined based on the control parameters and the load deviation.
[0013] Based on the first voltage and the voltage adjustment value, the second voltage in the second operating parameters is determined.
[0014] In the above implementation process, when the predicted load is within the boundary range of the load range, the introduction of a PID controller to smoothly fine-tune the first voltage can effectively prevent voltage jumps from the server, avoid hardware oscillations and performance jitters, and thus optimize the server's operation and management strategy.
[0015] Furthermore, the control parameters include proportional gain, integral gain, and derivative gain; determining the control parameters of the PID controller includes:
[0016] Based on the predicted load, determine the load pattern of the slave server in the future time.
[0017] If the load mode is a burst load mode, increase the proportional gain and the derivative gain and decrease the integral gain;
[0018] If the load mode is a stable load mode, reduce the proportional gain and the derivative gain and increase the integral gain.
[0019] In the above implementation process, the load pattern of the slave server in the future is determined by predicting the load change trend. Then, the control parameters of the PID controller are adaptively adjusted for different load patterns to meet the performance requirements of the slave server under different load patterns.
[0020] Furthermore, the control parameters include proportional gain, integral gain, and derivative gain; determining the control parameters of the PID controller includes:
[0021] Based on the power consumption and quality of service parameters of the slave server, the energy efficiency index of the slave server is determined;
[0022] If the change trend of the energy efficiency index indicates that the increase in the service quality parameter is greater than the first magnitude threshold, and the power consumption decreases, then the proportional gain and the derivative gain are increased and the integral gain is decreased.
[0023] If the trend of the energy efficiency index indicates that the power consumption and the service quality parameter continue to oscillate, then reduce the proportional gain and increase the differential gain;
[0024] If the trend of the energy efficiency index indicates that the service quality parameter is greater than the preset service quality parameter threshold, then the integral gain is increased.
[0025] If the trend of the energy efficiency index indicates that the service quality parameter is less than the service quality parameter threshold, and the increase in power consumption is greater than the second magnitude threshold, then the proportional gain and the integral gain are reduced.
[0026] In the above implementation process, the energy efficiency index of the slave server is determined by monitoring the service quality and power consumption of the slave server, and the adjustment of the control parameters of the PID controller is guided based on the changing trend of the energy efficiency index, so that the slave server can meet the service requirements while maintaining the optimal operating state.
[0027] Furthermore, the slave server includes a first processing unit and a second processing unit; the method further includes:
[0028] Determine the time limit priority for each task in the first processing unit;
[0029] The first task, whose time priority is lower than the first priority threshold, is migrated to the second processing unit for execution.
[0030] In the above implementation process, by migrating the first task with lower time limit requirements to the second processing unit according to the time limit priority of each task in the first processing unit, the first processing unit can concentrate on executing the tasks with high time limit requirements, thereby realizing reasonable allocation and scheduling of tasks and improving the rationality of management and scheduling of slave servers.
[0031] Furthermore, the slave servers include multiple servers, and the method further includes:
[0032] If the current load capacity of the slave server does not match the predicted load, a target slave server whose load capacity matches the predicted load is determined from among the multiple slave servers;
[0033] The second task in the current slave server is migrated to the target slave server for execution.
[0034] In the above implementation process, by assessing the load capacity of the slave servers, the second task in the slave server that cannot bear the predicted load can be migrated to the target slave server for execution in a timely manner. This can effectively solve the problems of load imbalance, slave server overheating and hardware failure, and realize effective and timely management and scheduling of slave servers.
[0035] Further, determining the target slave server from the plurality of slave servers includes:
[0036] Based on the data volume of the second task and the migration distance from the current slave server to each of the slave servers, the task migration cost for each of the slave servers is determined;
[0037] Based on the task migration cost and load capacity corresponding to each slave server, a target slave server is determined from the plurality of slave servers.
[0038] In the above implementation process, the task migration cost of each slave server is calculated by combining the data volume of the second task and the migration distance. Then, the target slave server that can take over the second task is selected from all slave servers by combining the task migration cost and load capacity, thereby reducing migration costs and saving energy while achieving load balancing.
[0039] Furthermore, the method also includes:
[0040] Determine the time limit priority for each task in the current slave server;
[0041] Identify the second task whose time priority is lower than the second priority threshold.
[0042] In the above implementation process, by selecting the second task with lower time limit requirements for task migration, load balancing is achieved while meeting service performance requirements.
[0043] Furthermore, the method also includes:
[0044] Based on the power consumption and quality of service parameters of the slave server, the energy efficiency index of the slave server is determined;
[0045] The target threshold is adjusted based on the energy efficiency index; the target threshold includes one or more of the following: the boundary value of the load range, the second priority threshold, the load threshold of the target slave server, and the task migration cost threshold.
[0046] In the above implementation process, the default target thresholds in the server cluster are dynamically adjusted through energy efficiency indicators, thereby optimizing the energy efficiency indicators of the entire server cluster. While maintaining service quality, energy consumption is reduced as much as possible, thus optimizing the operation and management of the server.
[0047] A second aspect of this application provides a computer program product, the computer program product including a computer program, which, when executed by a processor, implements any of the methods described in the first aspect.
[0048] A third aspect of this application provides an electronic device, the electronic device comprising:
[0049] processor;
[0050] Memory used to store processor-executable instructions;
[0051] Wherein, when the processor invokes the executable instructions, it implements the operation of any of the methods described in the first aspect.
[0052] A fourth aspect of this application provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of any of the methods described in the first aspect. Attached Figure Description
[0053] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0054] Figure 1 This is a schematic diagram illustrating an application scenario of an embodiment of this application;
[0055] Figure 2 A flowchart illustrating a server management method based on load prediction, provided for an embodiment of this application;
[0056] Figure 3 This is a schematic diagram of the structure of the load prediction model provided in the embodiments of this application;
[0057] Figure 4 This is a hardware structure diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0058] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0059] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0060] In related technologies, server operation management often employs static threshold adjustments or dynamic adjustments based on real-time load. This operation management includes adjusting the server's operating power. However, relying solely on the current load to adjust operating power cannot cope with sudden load fluctuations, leading to a delayed response. Setting the server's operating frequency and voltage to fixed values results in energy waste during low-load periods. Furthermore, static threshold adjustments or dynamic adjustments based on real-time load lack foresight regarding future loads, relying solely on passive adjustments based on the current load. Load fluctuations cause frequent start-ups and shutdowns of server cores and threads, and frequent voltage fluctuations in the processor, accelerating hardware aging. Therefore, current server operation management solutions lack prediction of future loads, making it difficult to balance energy efficiency and service quality. Optimizing server operation management has become a pressing technical problem in this field.
[0061] To address at least one of the aforementioned technical problems, this application provides a server management method based on load prediction. Figure 1 The application scenarios of embodiments of this application are illustrated. For example... Figure 1 As shown, the server cluster 100 includes multiple servers. These servers include one or more master servers 110 and one or more slave servers 120. The master server 110, also called the master node or management node, is primarily responsible for task management and scheduling, and manages one or more slave servers 120. The slave servers 120, also called managed servers or computing nodes, are managed by the master server 110 and execute assigned tasks. This application provides a server management method based on load prediction, applied to the master server 110, including... Figure 2 Steps 210-240 are shown.
[0062] Step 210: Based on the load data periodically uploaded by the slave server, predict the predicted load of the slave server in the future.
[0063] For example, each master server 110 may manage one or more slave servers 120. In step 210, all slave servers 120 managed by the master server 110 may periodically upload load data to the master server 110. Therefore, step 210 may include: predicting the predicted load of each slave server at a future time based on the load data periodically uploaded by each slave server.
[0064] The upload cycle for load data can be set according to actual needs, such as 10 seconds. Load data may include one or more of the following: utilization of the first processor of server 120, memory usage (including cache usage and / or swap partition usage), disk read / write throughput (i.e., read / write speed, in MB / s), network bandwidth utilization (including uplink traffic and / or downlink traffic), and utilization of the second processor. The first processor may be a CPU (Central Processing Unit), and the second processor may be a GPU (Graphics Processing Unit). The predicted load of the slave server in the future may include the predicted load of the slave server 120 at one or more future moments, and / or the predicted load trend over a future time period. The predicted load may be expressed as a percentage; a higher predicted load value indicates a higher load level on the slave server 120 in the future. The predicted load trend may be determined based on the predicted load at multiple future moments, for example, represented as a curve. The predicted load trend can determine the load pattern of the slave server 120 in the future.
[0065] Optionally, the main server 110 can preprocess the uploaded load data. The preprocessing includes, but is not limited to, one or more of denoising, normalization, and feature fusion. Specifically, in denoising preprocessing, a sliding window can be used to perform mean filtering on the uploaded load data. The size of the sliding window can be set to 5 data points to eliminate instantaneous jitter. In normalization preprocessing, Min-Max normalization can be performed on multi-source heterogeneous data, that is, normalization processing is performed on each type of load data. In feature fusion preprocessing, the utilization rate of the first processor, memory usage rate, and disk read / write throughput can be weighted and fused to obtain a comprehensive load index. The weight corresponding to the utilization rate of the first processor is 0.5, the weight corresponding to the memory usage rate is 0.3, and the weight corresponding to the disk read / write throughput is 0.2.
[0066] As an example, step 210 may specifically include steps 211-212.
[0067] Step 211: Based on the load data periodically uploaded from the server, obtain the load time series of the server;
[0068] Step 212: Based on the load time series, predict the load of the server in the future.
[0069] In step 211, for each slave server 120, the load time series for each slave server 120 can be obtained by arranging the load data uploaded by the slave server in multiple upload cycles in chronological order. As an example, the master server 110 can be configured with a circular queue, with one circular queue corresponding to each slave server 120. The master server 110 can cache the load data of each slave server 120 in each upload cycle into the corresponding circular queue in chronological order, thereby obtaining the load time series. For example, the load time series may include load data of the slave server 120 over a historical 60 minutes. If the upload cycle is 10 seconds, then the load time series includes 360 load data points.
[0070] In step 212, the master server 110 can use the load time series corresponding to each slave server 120 to predict the predicted load of each slave server 120 in the future. As an example, the master server can be equipped with a trained load prediction model. In this way, the load time series corresponding to each slave server 120 can be input into the trained load prediction model to obtain the predicted load of that slave server 120.
[0071] As an example, load forecasting models can include LTM (Long Short-Term Memory) forecasting models. Figure 3 As shown, the LSTM prediction model includes an input layer, a two-layer LSTM structure, and an output layer. The input layer receives the load time series. A dropout layer is inserted between the two LSTM layers. The first LSTM layer has 64 neurons with the tanh function (hyperbolic tangent function) as the activation function, and the second LSTM layer has 32 neurons. The dropout rate of the dropout layer is set to 0.2 to prevent overfitting. The output layer is a fully connected layer that outputs the predicted load from the server at future times. For example, the future time could be 5 minutes from now. If the data interval for the predicted load is 10 seconds, the output layer can output the predicted load for 30 time points within the next 5 minutes.
[0072] Thus, for each circular queue, when the circular queue is full of load data, the load prediction model's prediction process is triggered. Specifically, when the circular queue is full of load data and new load data is uploaded, the oldest load data in the queue can be deleted according to the first-in, first-out principle, and the newly uploaded load data can be recorded into the circular queue in chronological order.
[0073] As an example, the training process for the load prediction model can be implemented using the publicly available dataset SPECpower_ssj2008 and a custom load generation tool to generate training data. The training data includes one or more of the following: training data simulating bursty tasks, periodic tasks, and mixed load scenarios. Furthermore, mean-squared error (MSE) combined with smoothed L1 filtering can be used as the loss function for the load prediction model to balance long-term and short-term prediction accuracy. During training, the AdamW optimizer can be used for parameter optimization, with a learning rate of 0.01 and weight decay set to... .
[0074] Additionally, incremental learning can be used periodically to update the load forecasting model parameters. For example, a sliding window can be used to retain data for multiple days (e.g., 7 days), and then the model parameters can be updated every 24 hours using the data retained in the sliding window through incremental learning. Furthermore, the prediction error of the load forecasting model can be monitored. When the prediction error exceeds the error threshold (e.g., 15%) multiple times consecutively (e.g., 3 times), the load forecasting model is triggered to retrain.
[0075] This completes the prediction of the load from server 120.
[0076] Step 220: Based on the predicted load and the preset mapping relationship, determine the first operating parameters of the slave server; wherein the mapping relationship is used to indicate the corresponding operating parameters in different load ranges; the operating parameters include frequency and / or voltage.
[0077] For example, the master server 110 may pre-store a mapping relationship between load intervals and operating parameters. That is, this mapping relationship records the operating parameters corresponding to each load interval. A load interval refers to a continuous load range. When the predicted load of the slave server 120 falls into a certain load interval, the operating parameters corresponding to that load interval can be determined as the first operating parameters of the slave server 120. The operating parameters include frequency and / or voltage, and the first operating parameters include a first frequency and / or a first voltage. The frequency indicates the operating frequency of one or more processing units in the slave server 120, and the voltage indicates the operating voltage of one or more processing units in the slave server 120. As an example, the mapping relationship can be shown in Table 1.
[0078] Table 1
[0079]
[0080] For example, if the predicted load is 60%, and it falls within the load range of 50%-80%, then the first frequency is determined to be 3.0GHz and the first voltage is 1.2V, thus obtaining the first operating parameters.
[0081] Step 230: If the predicted load is within the boundary range of the load interval, the first operating parameter is adjusted based on the load deviation to obtain the second operating parameter; wherein, the load deviation is used to characterize the difference between the predicted load and the boundary value of the load interval.
[0082] It's understandable that when the predicted load is within the boundary of a load range, it means the predicted load is close to the boundary value of that range. However, when the operating parameters corresponding to two adjacent load ranges are discontinuous, because the predicted load is close to the boundary value, it may repeatedly fall between the two load ranges within a short period. In this case, the first operating parameter determined based on the load range will fluctuate rapidly. If the slave server 120 is adjusted according to this first operating parameter, it will cause frequent and significant switching of its operating parameters. For example, assuming the predicted load fluctuates between 49% and 51%, such fluctuations are quite common. According to the mapping relationship given in Table 1, the first operating parameter will repeatedly switch between 2.4GHz, 1.0V and 3.0GHz, 1.2V. Since the switching of operating parameters itself introduces energy consumption, such frequent and significant voltage and frequency jumps will further increase the energy consumption of the slave server 120. Furthermore, voltage fluctuations will exert electrical stress on the processor, thus frequent voltage fluctuations will reduce hardware lifespan. At the same time, the processor pauses instruction execution during frequency switching, so frequent frequency jumps can cause processor performance jitter.
[0083] To address the frequent and significant fluctuations in operating parameters that may occur when the predicted load approaches the boundary value of the load range, this embodiment proposes adjusting the first operating parameter based on the load deviation when the predicted load is within the boundary range of the load range, thereby obtaining the second operating parameter.
[0084] As an example, first determine the load range into which the predicted load falls, and then determine the open boundary value of that load range. It's understandable that, because the operating parameters corresponding to two adjacent load ranges are discontinuous, some load ranges are partially open / partially closed. The so-called open boundary value refers to the boundary value not included in the partially open / partially closed load range. Taking Table 1 as an example, if the load range 20%-50% is a partially open / partially closed range [20%, 50%), then 50% is the boundary value not included in this load range, which is the open boundary value. Conversely, if the load range 20%-50% is a partially open / partially closed range (20%, 50%), then 20% is the boundary value not included in this load range, which is the open boundary value.
[0085] After determining the open boundary value within the load interval into which the predicted load falls, the load interval boundary range can be determined from this load interval based on a preset interval size. That is, the load interval boundary range is a sub-interval within the load interval. Specifically, if the open boundary value is the left boundary value of the load interval, then the open boundary value is also the left boundary value of the load interval boundary range; if the open boundary value is the right boundary value of the load interval, then the open boundary value is also the right boundary value of the load interval boundary range. Continuing with Table 1 as an example, for the load interval [20%, 50%), the open boundary value 50% is the right boundary value. If the preset interval size is 1%, then the load interval boundary range [49%, 50%) can be determined from the load interval [20%, 50%). Similarly, for the load interval (20%, 50%), the open boundary value 20% is the left boundary value. If the preset interval size is 1%, then the load interval boundary range (20%, 21%) can be determined from the load interval (20%, 50%).
[0086] If the predicted load falls within the boundary range of the corresponding load interval, the adjustment values for the operating parameters are determined based on the load deviation. The load deviation refers to the difference between the predicted load and the boundary value of the load interval. For example, the load deviation is the difference between the predicted load and the open boundary value of the load interval. The load deviation and the adjustment values for the operating parameters are negatively correlated. That is, the closer the predicted load is to the open boundary value, the smaller the load deviation, and the larger the adjustment value for the operating parameters.
[0087] For example, for the load range boundary (20%, 21%), a smaller load deviation means a smaller difference between the predicted load and the open boundary value of 20%. In other words, the closer the predicted load is to the open boundary value of 20%, the larger the adjustment value of the operating parameters should be. Similarly, for the load range boundary [49%, 50%), a smaller load deviation means a smaller difference between the predicted load and the open boundary value of 50%. In other words, the closer the predicted load is to the open boundary value of 50%, the larger the adjustment value of the operating parameters should be.
[0088] Finally, by adjusting the first operating parameter based on the adjustment value, the second operating parameter of server 120 can be obtained. The second operating parameter includes a second frequency and / or a second voltage. In this way, the operating parameters corresponding to two adjacent load ranges can be smoothly transitioned, avoiding abrupt changes in operating parameters.
[0089] Furthermore, if the predicted load is outside the load range boundary, there is no need to adjust the first operating parameter.
[0090] Step 240: Control the slave server to run under the target operating parameters; the target operating parameters are either the first operating parameters or the second operating parameters.
[0091] For example, if the predicted load of the slave server 120 is outside the load range boundary, then the first operating parameter is determined as the target operating parameter, that is, the slave server 120 is controlled to operate under the first operating parameter. Conversely, if the predicted load of the slave server 120 is within the load range boundary, then the second operating parameter is determined as the target operating parameter, that is, the slave server 120 is controlled to operate under the second operating parameter.
[0092] Alternatively, when the temperature of the server's processor exceeds a preset temperature threshold, the processor's operating frequency can be reduced to below a frequency threshold to protect the processor from overheating. The temperature threshold is, for example, 75°C, and the frequency threshold is, for example, 1.2 GHz.
[0093] As can be seen, the server management method based on load prediction provided in this application, firstly, predicts the load of the slave server in the future by periodically uploading load data from the slave server, enabling the master server to adjust the operating parameters of the slave server in advance according to the predicted load. Compared with static threshold adjustment or dynamic adjustment based on real-time load in related technologies, the operation management of this application is more forward-looking and proactive. Secondly, when the predicted load is within the boundary of the load range, adjusting the first operating parameter based on the mapping relationship through load deviation can effectively prevent the operating parameter from jumping, thereby reducing the energy consumption of the slave server, avoiding the consumption of hardware lifespan, and eliminating the performance jitter caused by the jump of operating parameters, thus optimizing the server operation management strategy.
[0094] The following provides a detailed description of steps 210-240.
[0095] According to some embodiments of this application, the load deviation in step 230 can be specifically determined using a PID controller (Proportional-Integral-Derivative controller). Furthermore, as mentioned above, the first operating parameter includes a first voltage. Therefore, adjusting the first operating parameter based on the load deviation in step 230 includes adjusting the first voltage based on the load deviation. Thus, step 230 specifically includes steps 231-233.
[0096] Step 231: Determine the control parameters of the PID controller.
[0097] For example, the control parameters include proportional gain (K). p ), integral gain (K) i) and differential gain (K d For example, control parameters can be default values and pre-stored in the main server 110.
[0098] Step 232: Determine the voltage adjustment value based on the control parameters and the load deviation.
[0099] For example, the control parameters, load deviation, and voltage regulation value satisfy the following relationship:
[0100]
[0101] Among them, V adjust Here, e(t) represents the voltage adjustment value; e(t) represents the load deviation, which is a function of time t. The integral of the load deviation e(t) over time t can be set according to actual needs. Let e(t) be the differential of the load deviation e(t) with respect to time t. Therefore, the adjustment values of the operating parameters mentioned above must include at least the voltage adjustment value V. adjust .
[0102] Step 233: Based on the first voltage and the voltage adjustment value, determine the second voltage in the second operating parameters.
[0103] Wherein, if the open boundary value is the left boundary value of the load range boundary (at which point the predicted load is greater than the open boundary value), then the difference between the first voltage and the voltage adjustment value is determined as the second voltage. For example, in the above example, if the load range 20%-50% is a semi-open, semi-closed range [20%, 50%], then when the predicted load is 20.5%, the predicted load falls within the load range [20%, 50%] and the corresponding load range boundary range [20%, 21%]. Thus, the first voltage can be determined to be 1.0V. Assuming that the voltage adjustment value is determined to be 0.1V based on any embodiment, and the open boundary value of 20% is the left boundary value of the load range boundary range [20%, 50%], then the predicted load falls within the load range [20%, 50%] and the corresponding load range boundary range [20%, 50%]. If the left boundary value is 21%, then the difference of 0.9V between the first voltage (1.0V) and the voltage adjustment value (0.1V) can be determined as the second voltage. Furthermore, as mentioned above, the closer the predicted load is to the open boundary value, the smaller the load deviation, and the larger the adjustment value of the operating parameters. Therefore, when the open boundary value is the left boundary value of the load range, the closer the predicted load is to the open boundary value, the smaller the predicted load, and the larger the adjustment value (such as the voltage adjustment value). Consequently, the difference between the first voltage and the voltage adjustment value (i.e., the second voltage) will be, allowing for a smooth transition between the voltages of the two load ranges.
[0104] If the open boundary value is the right boundary value of the load range (where the predicted load is less than the open boundary value), then the sum of the first voltage and the voltage adjustment value is determined as the second voltage. For example, in the above example, if the load range of 20%-50% is a semi-open, semi-closed range [20%, 50%), then when the predicted load is 49.5%, the predicted load falls within the load range [20%, 50%) and the corresponding load range boundary [49%, 50%). Thus, the first voltage can be determined to be 1.0V. Assuming that the voltage adjustment value is determined to be 0.1V based on any embodiment, and the open boundary value of 50% is the right boundary value of the load range boundary [49%, 50%), then the sum of the first voltage 1.0V and the voltage adjustment value 0.1V, 1.1V, can be determined as the second voltage. Furthermore, as mentioned above, the closer the predicted load is to the open boundary value, the smaller the load deviation, and the larger the adjustment value of the operating parameters. It can be seen that when the open boundary value is the right boundary value of the load range, the closer the predicted load is to the open boundary value, the larger the predicted load is, and the larger the adjustment value (such as the voltage adjustment value) is. Then the sum of the first voltage and the voltage adjustment value (i.e. the second voltage) will be larger, so that the voltage of the two load ranges can transition smoothly.
[0105] Of course, in addition to the first voltage, the first frequency can also be adjusted in a similar manner to obtain the second frequency. The adjustment process is the same as that for the first voltage, and will not be elaborated here.
[0106] As can be seen in this embodiment, when the predicted load is within the boundary range of the load interval, the introduction of a PID controller to smoothly fine-tune the first voltage can effectively prevent voltage jumps from the server, avoid hardware oscillations and performance jitters, and thus optimize the server's operation and management strategy.
[0107] Furthermore, in some embodiments, as described above, the control parameters of the PID controller include proportional gain, integral gain, and derivative gain. These control parameters can be pre-stored in the main server 110 in the form of default values. Thus, when executing step 231, the pre-stored control parameters can be read.
[0108] The default values for the control parameters can be determined based on hardware characteristics, such as the hardware model. For example, the proportional gain directly reflects the deviation between the predicted load and the current load. A larger proportional gain results in a faster response, but an excessively large proportional gain can lead to oscillations. The logic is to determine the critical gain K through a step response experiment. cr And determine the default value of the proportional gain as 0.5 times K. cr To maintain stability. For example, the default value for the proportional gain is 0.5.
[0109] Integral gain is used to eliminate long-term steady-state errors, such as small, persistent deviations. The default value for integral gain is the ratio of proportional gain to the integral time constant. A 5-second integral time constant represents the time within which steady-state errors are eliminated. For example, the default value for integral gain is 0.1. Furthermore, excessively high integral gain can lead to integral saturation, causing voltage overshoot.
[0110] The derivative gain is used to suppress voltage fluctuations caused by load abrupt changes or noise. The default value for the derivative gain is the product of the proportional gain and the derivative time constant. A derivative time constant of 0.1 seconds indicates sensitivity only to short-term fluctuations. For example, the default value for the derivative gain is 0.05.
[0111] In addition, in some embodiments, determining the control parameters in step 231 may specifically include steps 2311-2313.
[0112] Step 2311: Based on the predicted load, determine the load pattern of the slave server at the future time.
[0113] The load patterns include burst load patterns and stable load patterns. As described above, the predicted load can include the predicted load of server 120 at one or more future moments, and / or the predicted load trend over a future time period. Thus, based on the predicted load at the multiple future moments, or the predicted load trend over the future time period, the load pattern of the server in the future can be determined. For example, if the predicted load changes by a greater than a first change threshold over the future time period, the load pattern is determined to be a burst load pattern; if the predicted load changes by a less than a second change threshold over the future time period, the load pattern is determined to be a stable load pattern. The first change threshold being greater than the second change threshold, or the first change threshold being equal to the second change threshold, refers to the same threshold.
[0114] Step 2312: If the load mode is a burst load mode, increase the proportional gain and the derivative gain and decrease the integral gain.
[0115] For example, in burst load mode, the tolerance for task execution latency on slave server 120 is low, meaning slave server 120 is required to respond quickly to burst loads and rapidly adjust its operating parameters to match the burst load, preventing task backlog. In this case, to respond to load changes more quickly and suppress latency growth, the proportional gain can be increased. After increasing the proportional gain, slave server 120 becomes more sensitive to the difference between the predicted load and the actual load, allowing for faster response and striving to keep up with load changes instantly, avoiding performance degradation. Correspondingly, since the differential gain is the product of the proportional gain and the differential time constant, when the proportional gain is increased, the differential gain needs to be increased accordingly to keep the differential time constant constant. That is, the increased differential gain is determined based on the increased proportional gain and the differential time constant.
[0116] Furthermore, under sudden load scenarios, a high integral gain can easily lead to integral saturation during rapid response, resulting in voltage overshoot on the slave server—that is, a voltage spike exceeding demand. This not only wastes energy but can also put stress on the hardware. In addition, a high integral gain can offset the rapid response effect brought by a high-ratio gain and may even cause system oscillations. Therefore, it is necessary to reduce the integral gain to avoid overcorrection due to error accumulation during rapid response, thereby maintaining the stability of the slave server.
[0117] As an example, under burst load mode, the proportional gain can be increased from the default value of 0.5 to 0.7, while the integral gain can be decreased from the default value of 0.1 to 0.05. It's worth noting that increasing the proportional gain and decreasing the integral gain changes the ratio of proportional gain to integral gain, i.e., the integral time constant. For example, when the proportional gain is increased to 0.7 and the integral gain is decreased to 0.05, the integral time constant becomes 14 seconds. This means that a slower steady-state error elimination process is acceptable in exchange for a faster and more stable initial response.
[0118] Step 2313: If the load mode is a stable load mode, reduce the proportional gain and the derivative gain and increase the integral gain.
[0119] Conversely, under stable load conditions, the demand for rapid load response from server 120 decreases. In this case, energy conservation and stability of server 120 are prioritized. Therefore, the proportional gain can be reduced to prevent significant overshoot or oscillations in server 120, avoiding unnecessary voltage fluctuations and thus saving energy. Correspondingly, since the derivative gain is the product of the proportional gain and the derivative time constant, reducing the proportional gain requires a corresponding reduction in the derivative gain to maintain a constant derivative time constant. That is, the reduced derivative gain is determined based on the reduced proportional gain and the derivative time constant. Furthermore, to quickly eliminate long-term steady-state errors and maintain stability, the integral gain can be increased. As an example, under stable load conditions, the proportional gain can be reduced from the default value of 0.5 to 0.3, and the integral gain can be increased from the default value of 0.1 to 0.2.
[0120] Optionally, if the server's load pattern at the future time is neither a burst load pattern nor a steady load pattern, the default values of each control parameter can be read directly.
[0121] As can be seen in this embodiment, the load mode of the slave server in the future is determined by predicting the load change trend, and then the control parameters of the PID controller are adaptively adjusted for different load modes to meet the performance requirements of the slave server under different load modes.
[0122] In addition to determining the control parameters through steps 2311-2313, in some embodiments, the control parameters of the PID controller can also be determined through steps 2314-2318. That is, when performing step 231, it is possible to choose to perform steps 2311-2313 to determine the control parameters, or to choose to perform steps 2314-2318 to determine the control parameters.
[0123] Step 2314: Determine the energy efficiency index of the slave server based on the power consumption and service quality parameters of the slave server.
[0124] The master server 110 or each slave server 120 can periodically monitor the power consumption and service quality of the slave server 120. The master server 110 can obtain the power consumption and service quality parameters of each slave server 120. Specifically, the overall power consumption of the slave server 120 can be read through IPMI (Intelligent Platform Management Interface), with an accuracy of ±2W. Service quality parameters can include one or more of the following: task completion time (e.g., P99 latency), timeout rate, and error rate. It is known that the value of the service quality parameter is inversely related to the service quality; that is, the larger the value of the service quality parameter, the worse the service quality provided by the slave server 120, manifested in longer task completion times, higher timeout rates, or higher error rates.
[0125] Subsequently, the energy efficiency index of each slave server 120 can be determined based on its power consumption and quality of service parameters. As an example, power consumption, quality of service parameters, and energy efficiency index satisfy the following relationship: Energy efficiency index = ω1 Power consumption +ω2 The service quality parameter, where ω1+ω2=1, has a default value of 0.7. This means that when evaluating the energy efficiency of server 120, power consumption has a greater weight than the service quality parameter, and the power consumption of the server is given more importance.
[0126] Furthermore, higher power consumption and higher service quality parameter values result in higher energy efficiency indicators. Therefore, a higher energy efficiency indicator indicates a decrease in the energy efficiency of slave server 120. Master server 110 can periodically determine the energy efficiency indicator of each slave server 120 and determine the trend of its changes. The calculation period for the energy efficiency indicator can be 5 minutes. The trend of the energy efficiency indicator includes the trend of power consumption changes and the trend of service quality parameter changes.
[0127] As an example, if the energy efficiency index of the current cycle increases by more than the energy efficiency change threshold compared to the energy efficiency index of the previous cycle, any one of steps 2315-2318 is triggered. The energy efficiency change threshold is, for example, 5%.
[0128] Step 2315: If the change trend of the energy efficiency index indicates that the increase in the service quality parameter is greater than the first amplitude threshold, and the power consumption decreases, then increase the proportional gain and the derivative gain and decrease the integral gain.
[0129] As mentioned above, the changing trends of energy efficiency indicators include the changing trends of power consumption and service quality parameters. If the changing trend of service quality parameters indicates an increase in service quality parameters, and the increase exceeds a first threshold, and the changing trend of power consumption indicates a decrease in power consumption, it means that although server 120 has saved power consumption, its task completion time, timeout rate, and error rate are increasing significantly, and the service quality of server 120 is deteriorating. This may be due to server 120's slow response to load changes. In this case, the proportional gain can be increased (e.g., increased by 0.1), the derivative gain can be increased accordingly to keep the derivative time constant constant, and the integral gain can be decreased (e.g., decreased by 0.02), thereby speeding up the response of server 120 and sacrificing some stability to prioritize the performance of server 120.
[0130] Step 2316: If the trend of the energy efficiency index indicates that the power consumption and the service quality parameter continue to oscillate, then reduce the proportional gain and increase the differential gain.
[0131] For example, if the trend of energy efficiency indicators determines that the power consumption and service quality parameters of server 120 are continuously oscillating (i.e., both service quality parameters and power consumption fluctuate significantly), it indicates overshoot by the PID controller and system instability. In this case, reducing the proportional gain (e.g., decreasing it by 0.1) can reduce the amplification of the deviation by the PID controller, thereby reducing the overshoot of server 120 and suppressing oscillations. Furthermore, increasing the derivative gain (e.g., increasing it by 0.01) can output a reverse control quantity when the deviation change is about to cause overshoot in server 120, suppressing the change in deviation. This is equivalent to adding a "damper" to the PID controller, thereby slowing down the rate of change of server 120, preventing continuous oscillations, and improving stability.
[0132] Step 2317: If the trend of the energy efficiency index indicates that the service quality parameter is greater than the preset service quality parameter threshold, then increase the integral gain.
[0133] For example, if the service quality parameter is determined to be greater than a service quality parameter threshold based on its changing trend—for instance, if the service quality parameter consistently exceeds the threshold within a target time period—it indicates that the integral force in the PID controller is insufficient to eliminate steady-state error. In this case, the integral gain can be increased (e.g., by 0.02) to strengthen the integral action and eliminate long-term steady-state error. The service quality parameter threshold can be determined based on service quality requirements.
[0134] Step 2318: If the trend of the energy efficiency index indicates that the service quality parameter is less than the service quality parameter threshold, and the increase in power consumption is greater than the second amplitude threshold, then reduce the proportional gain and the integral gain.
[0135] For example, if the service quality parameter is determined to be less than a service quality parameter threshold based on its changing trend (e.g., the service quality parameter remains below the threshold throughout a target time period), it indicates that server 120 currently meets the service quality requirements. However, if the power consumption is determined to be increasing based on its changing trend, and the increase exceeds a second threshold, it indicates that the PID controller is operating too aggressively, leading to excessive power supply. In this case, the proportional gain (e.g., reduced by 0.05) and integral gain (e.g., reduced by 0.01) can be reduced to make the PID controller's control behavior more moderate and avoid unnecessary energy consumption.
[0136] As can be seen, this embodiment determines the energy efficiency index of the slave server by monitoring the service quality and power consumption of the slave server, and guides the adjustment of the control parameters of the PID controller based on the changing trend of the energy efficiency index, so that the slave server can meet the service requirements while maintaining the optimal operating state.
[0137] According to some embodiments of this application, based on any of the above embodiments, the server 120 includes a first processing unit and a second processing unit. The first processing unit may include one or more, and the second processing unit may include one or more. A processing unit is a component of a processor. The processor may be the first processor and / or the second processor described above. Taking a CPU as an example, a processing unit refers to a core in the CPU. A processor may include multiple processing units. Different processing units can be artificially assigned different functions and performance characteristics through software and power management strategies; that is, multiple processing units within the same processor are grouped and managed.
[0138] In this embodiment, the first processing unit is used to execute tasks with high time-limit requirements, and the second processing unit is used to execute tasks with low time-limit requirements. When the load on the slave server 120 is less than a first preset threshold, all tasks can be executed by the first processing unit to save power. However, when the predicted load on the slave server 120 is predicted to be greater than the first preset threshold, a more reasonable allocation of all tasks on the slave server 120 is needed to meet service quality requirements while minimizing power consumption. Based on this, the method further includes steps S11-S12 in addition to the above embodiments. Optionally, steps S11-S12 can be triggered when the predicted load on the slave server 120 is greater than the first preset threshold.
[0139] Step S11: Determine the time limit priority of each task in the first processing unit.
[0140] For example, each task in the first processing unit includes tasks that the first processing unit is currently executing but has not yet completed, and tasks to be executed. For each task, a time limit priority can be determined. The time limit priority characterizes the level of time requirement for the task. A higher time limit priority indicates a higher time requirement for the task. For example, batch processing tasks (such as Spark offline tasks) have lower time limit priorities, while real-time tasks (such as Redis requests) require millisecond-level responses and have higher time limit priorities. Multiple time limit priorities can be included; the process for evaluating the time limit priorities of different tasks can be found in relevant technologies and will not be elaborated here.
[0141] Step S12: Transfer the first task with a time limit priority lower than the first priority threshold to the second processing unit for execution.
[0142] For example, the first priority threshold can be set according to the actual situation. Tasks with a time limit priority lower than the first priority threshold are called first tasks, which refer to tasks with lower time limit requirements. Therefore, first tasks can be migrated to the second processing unit for execution. Here, the first task can include one or more, and the first task can include the task currently being executed by the first processing unit, as well as the tasks originally to be executed by the first processing unit.
[0143] Optionally, before executing step S12, the second processing unit, which is in a dormant state, can be woken up in advance to avoid task execution delays caused by cold starts. For example, a wake-up command can be sent to the second processing unit within a preset time (e.g., 50ms) before the predicted load increase to wake up the second processing unit. After waking up the second processing unit, the first task can then be migrated to the second processing unit for execution.
[0144] In addition, alternatively, regarding the processing method of the first task, besides migrating the first task to the second processing unit for execution, the execution of the first task can also be delayed, thereby ensuring that tasks with higher time requirements are executed first.
[0145] Furthermore, if the processor of server 120 supports group management of processing units, then in some embodiments, only the operating parameters of the first processing unit can be adjusted. That is, based on any of the above embodiments, target operating parameters are determined, and the first processing unit in server 120 is controlled to run under the target operating parameters. At the same time, the second processing unit is controlled to continue running under the current operating parameters. Since the first processing unit centrally processes tasks with high time requirements, only the operating parameters of the first processing unit can be adjusted, while keeping the operating parameters of the second processing unit unchanged, thereby ensuring that the server meets future load requirements while avoiding unnecessary power consumption.
[0146] Conversely, if the processor of server 120 does not support group management of processing units, then in some embodiments, it is necessary to adjust the operating parameters of the first and second processing units of server 120. That is, based on any of the above embodiments, target operating parameters are determined, and the first and second processing units in server 120 are controlled to operate under the target operating parameters.
[0147] Alternatively, after the migration of the first task is completed, the operating frequency of the processing units can be locked. Specifically, the operating frequencies of at least some processing units can be locked based on the processor's hardware characteristics and the operating system's scheduling policy. As an example, if the processor supports processing unit grouping control, then only the operating frequency of the first processing unit can be locked. As yet another example, if the processor does not support processing unit grouping control, then the operating frequencies of the first and second processing units can be locked.
[0148] Alternatively, after locking the operating frequency of at least some processing units, the locked processing units can be unlocked when the predicted load of the server 120 is less than the first preset threshold.
[0149] Optionally, when the current load of server 120 is less than a second preset threshold (e.g., 10%), redundant processing units that are not currently performing tasks are shut down. For example, the redundant processing unit may be any processing unit that is not performing a task in either the first processing unit or the second processing unit; or the redundant processing unit may be any processing unit that is not performing a task in the second processing unit.
[0150] For example, the CPU of server 120 may include 8 processing units (cores). Processing units 0-3 are the first processing units, and processing units 4-7 are the second processing units. When the predicted load of server 120 exceeds a first preset threshold, target operating parameters are determined based on any of the above embodiments, and processing units 0-3 are controlled to run under the target operating parameters, while processing units 4-7 remain running under their current operating parameters, and the operating frequency of processing units 0-3 is locked. Furthermore, the first task in processing unit 0-3 with a time limit priority lower than the first priority threshold is migrated to processing unit 4-7 for execution. Subsequently, when the subsequent predicted load of server 120 is less than the first preset threshold, the operating frequency of processing units 0-3 is unlocked, allowing a reduction in the operating frequency of processing units 0-3. And when the current load of server 120 is less than a second preset threshold (e.g., 10%), redundant processing units with currently unexecuted tasks are shut down.
[0151] As can be seen in this embodiment, by migrating the first task with lower time limit requirements to the second processing unit according to the time limit priority of each task in the first processing unit, the first processing unit can concentrate on executing the tasks with high time limit requirements, thereby realizing reasonable allocation and scheduling of tasks and improving the rationality of management and scheduling of the slave server.
[0152] According to some embodiments of this application, the server 120 includes multiple servers. Based on this, the method further includes steps S21 and S23 in addition to any of the above embodiments.
[0153] Step S21: If the current load capacity of the slave server does not match the predicted load, determine a target slave server whose load capacity matches the predicted load from among the multiple slave servers.
[0154] The current slave server refers to the slave server currently being scheduled and managed by the master server 110. A mismatch between the current slave server's load capacity and the predicted load means that even when all processing units in the current slave server are running at maximum operating parameters (i.e., full load), the performance required for the predicted load cannot be met. In this case, a target slave server whose load capacity matches the predicted load of the current slave server can be determined from the remaining slave servers. A target slave server whose load capacity matches the predicted load of the current slave server means that the target slave server still has remaining load capacity to handle the predicted load of the current slave server. It is understood that the target slave server can also determine its predicted load through any of the above embodiments. In this case, the target slave server should have remaining load capacity to handle its own predicted load and the predicted load of the current slave server for its load capacity to match the predicted load of the current slave server. As an example, when the current load of the target slave server is less than the load threshold, the target slave server's load capacity is considered to match the predicted load.
[0155] Step S23: Migrate the second task in the current slave server to the target slave server for execution.
[0156] After identifying the target slave server, the second task in the current slave server can be migrated to the target slave server for execution. The second task can be at least a portion of the tasks in the current slave server; that is, the second task can be all tasks in the current slave server, or only a portion of the tasks in the current slave server. Furthermore, the second task can include tasks currently being executed by the current slave server, and / or tasks pending execution in the current slave server.
[0157] Therefore, after obtaining the predicted load of the current slave server in step 210, before adjusting the operating parameters of the current slave server, it is possible to first assess whether the load capacity of the current slave server matches the predicted load. If they match, then the target operating parameters are determined and the current slave server is controlled to run under the target operating parameters. If they do not match, the operating parameters of the current slave server do not need to be adjusted; instead, the second task of the current slave server can be directly migrated to the target server for execution. That is, the matching of the slave server's load capacity with its predicted load is the triggering condition for steps 220-240.
[0158] Thus, when the load on a slave server changes slowly and is only slightly overloaded, the predicted load can be quickly responded to by adjusting the operating parameters. Conversely, when the load on a slave server is severely unbalanced, or when a failure or overheating occurs, tasks can be promptly migrated to the target slave server for execution, thereby freeing up the slave server's resources. By combining these two methods—adjusting operating parameters and migrating tasks between slave servers—to address predicted load, different load scenarios can be effectively handled.
[0159] As can be seen in this embodiment, by assessing the load capacity of the slave server and promptly migrating the second task in the slave server that cannot bear the predicted load to the target slave server for execution, the problems of load imbalance, slave server overheating and hardware failure can be effectively solved, and the effective and timely management and scheduling of the slave server can be achieved.
[0160] According to some embodiments of this application, the process of determining the target server in step S21 may specifically include steps S211-S212.
[0161] Step S211: Based on the data volume of the second task and the migration distance from the current slave server to each of the slave servers, determine the task migration cost for each of the slave servers.
[0162] For example, when calculating the migration cost of a task, two factors need to be considered: the amount of data in the second task and the migration distance between the current slave server and other servers. It is understandable that if the amount of data in the second task is large, the time required to migrate the second task from the current slave server to the target slave server will be longer, consuming more network bandwidth, thus increasing the migration cost and extending the task completion time. Similarly, if the migration distance between the current slave server and other slave servers is large, it will result in a longer data migration time for the second task, thereby extending its completion time.
[0163] As an example, the second task's data volume, migration distance, and task migration cost Emigrate Satisfy: E migrate =α Data volume + β Migration distance. Here, α = 0.1 J / MB, β = 0.05 J / hop, where J is joules, and a hop is a distance metric in network topology, representing the number of network devices traversed during the transmission from the data source node to the target node. It characterizes the migration distance between the current slave server and other slave servers. α is the energy cost coefficient per unit of data migration, representing the energy required to migrate 1MB of data (0.1 joules). β represents the energy required to traverse one hop of network distance (0.05 joules).
[0164] Thus, for each slave server, the task migration cost required to migrate the second task from the current slave server to the slave server can be obtained.
[0165] Step S212: Based on the task migration cost and load capacity corresponding to each slave server, determine the target slave server from the plurality of slave servers.
[0166] For example, candidate slave servers whose load capacity matches the predicted load of the current slave server can be identified first from among the remaining slave servers besides the current slave server. Then, the target slave server is determined from the candidate slave servers based on the task migration cost. For example, the candidate slave server with the lowest task migration cost can be identified as the target slave server.
[0167] Furthermore, the second task can include one or more, and correspondingly, the target slave server can include one or more. For example, the number of second tasks may be the same as the number of target slave servers, or there may be more second tasks than target slave servers. When there is only one second task and only one target slave server, the candidate slave server with the lowest task migration cost can be directly identified as the unique target slave server. However, when there are multiple second tasks and multiple target slave servers, it is necessary to determine which target slave server each second task should migrate to. In this case, a greedy algorithm can be used to optimize the task migration cost, i.e., the target slave server corresponding to each second task can be determined using a greedy algorithm. Specifically, for the current second task, firstly, a set of currently available candidate slave servers is determined, which includes one or more candidate slave servers. Then, the task migration cost of migrating the current second task from the current slave server to each candidate slave server is determined, and then the candidate slave server with the lowest task migration cost is selected as the target slave server. If the target slave server has no remaining load capacity after allocating the second task, then the target slave server is removed from the set of candidate slave servers. If the target slave server still has remaining load capacity after being assigned a second task, it is retained in the candidate slave server set and continues to be a candidate slave server for the next round of task assignment. Then, the next second task is obtained, and its corresponding target slave server is determined according to the same process, until all second tasks are assigned.
[0168] Optionally, the migration of the second task is only performed if the task migration cost is lower than a preset task migration cost threshold. It is understood that a task migration cost threshold can be set to control task migration costs. After determining the target slave server corresponding to each second task, for each second task, it is determined whether the task migration cost required to migrate the second task to the corresponding target slave server is less than the task migration cost threshold. If yes, the second task is migrated to the corresponding target slave server; otherwise, the second task is not migrated.
[0169] As can be seen in this embodiment, the task migration cost of each slave server is calculated by combining the data volume of the second task and the migration distance. Then, the target slave server that can take over the second task is selected from all slave servers by combining the task migration cost and the load capacity, thereby reducing the migration cost and saving energy while achieving load balancing.
[0170] According to some embodiments of this application, after performing step S21 and before performing step S23, a step S22 is further included: determining the second task in the current slave server. Specifically, step S22 includes steps S221-S222.
[0171] Step S221: Determine the time limit priority of each task in the current slave server.
[0172] As described above, the slave server 120 may include multiple processors, each processor may include multiple processing units, and each processing unit may include one or more tasks, or may not include any tasks. Thus, each task in the current slave server refers to the task included in each processing unit among all the processors included in the slave server. These tasks include tasks that are being executed but have not yet completed, and tasks awaiting execution. The process for determining the time limit priority of each task is described in step S11 above and will not be repeated here.
[0173] Step S222: Determine the second task whose time limit priority is lower than the second priority threshold.
[0174] For example, the second priority threshold can be set according to the actual situation. The second priority threshold can be the same as the first priority threshold, or it can be greater than or less than the first priority threshold. Tasks with a time limit priority lower than the second priority threshold are called second tasks, referring to tasks with lower time limit requirements. Second tasks can include one or more, and can include tasks currently being executed by the slave server, as well as previously pending tasks.
[0175] It is understandable that migrating tasks between servers takes time. For tasks with high time priority, task migration will undoubtedly prolong task completion time. Therefore, this embodiment chooses to migrate the second task with lower time priority, achieving load balancing while meeting service performance requirements.
[0176] According to some embodiments of this application, based on any of the above embodiments, the method further includes steps S31-S32.
[0177] Step S31: Determine the energy efficiency index of the slave server based on the power consumption and service quality parameters of the slave server.
[0178] The implementation process of step S31 is detailed in the implementation process of step 2314 above, and will not be repeated here.
[0179] Step S32: Adjust the target threshold based on the energy efficiency index; the target threshold includes one or more of the following: the boundary value of the load range, the second priority threshold, the load threshold of the target server, and the task migration cost threshold.
[0180] For example, the boundary values of the load intervals are essentially the threshold values that determine the adjustment of operating parameters. During the initialization of server cluster 100, the boundary values of each load interval can be set to default values, as shown in Table 1. However, during the operation of server cluster 100, the boundary values of the load intervals can be continuously adjusted based on the energy efficiency indicators of slave servers 120 to achieve dynamic optimization. Specifically, the boundary values of the load intervals can be adjusted separately for different slave servers 120, so that different slave servers 120 have different load intervals, meaning the mapping relationship between the load intervals and operating parameters is different for different slave servers 120; or the boundary values of the load intervals can be adjusted uniformly for all slave servers 120, so that all slave servers 120 have the same load interval, meaning the mapping relationship between the load intervals and operating parameters is the same for different slave servers 120.
[0181] The boundary values of load intervals can be adjusted based on energy efficiency metrics. For example, if the energy efficiency metric, representing a service quality parameter, exceeds a preset service quality parameter threshold, then the boundary values of one or more load intervals can be lowered. For instance, when the load reaches 45%-50%, the task's P99 latency has significantly exceeded the limit, meaning the service quality parameter exceeds the preset service quality parameter threshold. This indicates that the server frequency was increased too late, resulting in insufficient service quality assurance. In this case, the boundary values of the load intervals can be lowered, for example, from 50% to 45% in the 20%-50% load interval. Correspondingly, the boundary values in the original 50%-80% load interval are also lowered to 45%. The updated load intervals are 20%-45% and 45%-80%. In this way, server 120 will increase its operating frequency earlier in the load phase. Although energy consumption may increase slightly, it effectively ensures service quality, ultimately optimizing the energy efficiency metric (i.e., the energy efficiency metric decreases).
[0182] As another example, if the energy efficiency index indicates that power consumption exceeds a preset power consumption threshold, then the boundary values of one or more load ranges are increased. For instance, when the load frequently fluctuates between 49% and 55%, it causes the operating frequency of server 120 to frequently jump between 2.4GHz and 3.0GHz. If the task currently being executed by server 120 has low time requirements, for example, if the time priority of the currently executed task is lower than the first or second priority threshold, it indicates that the current frequency increase is too aggressive, resulting in unnecessary energy consumption and hardware wear. In this case, the boundary values of the load ranges can be increased, for example, increasing the boundary value of the 20%-50% load range from 50% to 55%. Correspondingly, the boundary value of the original 50%-80% load range is increased to 55%. The updated load ranges are 20%-55% and 55%-80%. This allows server 120 to increase its operating parameters only under higher loads. Although the service quality may decrease slightly (i.e., the service quality parameters will increase), it saves a significant amount of power consumption, ultimately optimizing the energy efficiency index (i.e., the energy efficiency index decreases).
[0183] Furthermore, exemplarily, the second priority threshold is used to determine the second task to be migrated to the target slave server. During the initialization of server cluster 100, the second priority threshold can be set to a default value. However, during the operation of server cluster 100, the second priority threshold can be continuously adjusted based on the energy efficiency indicators of slave servers 120 to achieve dynamic optimization. Since different slave servers 120 may be assigned to execute different types of tasks, the second priority threshold can be adjusted separately for each slave server 120, resulting in different second priority thresholds for each slave server 120; alternatively, the second priority threshold can be uniformly adjusted for all slave servers 120, resulting in all slave servers 120 having the same second priority threshold.
[0184] The second priority threshold can be adjusted based on energy efficiency indicators. For example, if the energy efficiency indicator represents a service quality parameter greater than a preset service quality parameter threshold, and / or power consumption greater than a preset power consumption threshold, then the second priority threshold is lowered. For instance, if a task's time limit priority is divided into four levels, priority 1 to priority 4, where priority 1 is the highest (representing the highest time limit requirement) and priority 4 is the lowest (representing the lowest time limit requirement), and the default value of the second priority threshold is priority 2, then tasks with a time limit priority equal to or lower than priority 2 are migrated to the target slave server for execution. That is, only priority 1 tasks are retained for execution on the current slave server, while tasks with priorities 2-4 are migrated to the target server. In this case, if the task's P99 latency has significantly exceeded the limit (i.e., the service quality parameter is greater than the preset service quality parameter threshold), this indicates that some tasks with high time limit priorities are not being processed in a timely manner. This may be because the migration of some tasks with higher time limit priorities in the second task has extended their completion time. Alternatively, high power consumption indicates a significant increase in power consumption due to excessive task migration from the slave server. Therefore, the second priority threshold can be lowered. For example, lowering the second priority threshold to priority 3 means that tasks with a priority equal to or lower than priority 3 are the second tasks migrated to the target slave server for execution. In other words, tasks with priorities 1-2 remain on the current slave server, while tasks with priorities 3-4 are migrated to the target server. By lowering the second priority threshold, the number of second tasks being migrated can be reduced, avoiding the migration of high-priority tasks. This reduces power consumption while improving service quality, ultimately optimizing energy efficiency metrics (i.e., a decrease in energy efficiency metrics).
[0185] Furthermore, exemplarily, the load threshold of the target slave server is used to determine whether the remaining slave servers are target slave servers whose load capacity matches the predicted load of the current slave server. During the initialization of server cluster 100, the load threshold can be set to a default value. However, during the operation of server cluster 100, the load threshold can be continuously adjusted based on the energy efficiency indicators of slave servers 120 to achieve dynamic optimization. Specifically, the load threshold can be adjusted separately for different slave servers 120, so that different slave servers 120 have different load thresholds; or the load threshold can be uniformly adjusted for all slave servers 120, so that all slave servers 120 have the same load threshold.
[0186] The load threshold for the target slave server can be adjusted based on energy efficiency metrics. For example, if the energy efficiency metric, representing a service quality parameter, exceeds a preset service quality parameter threshold, the load threshold for the target slave server can be lowered. For instance, if the default load threshold is 40%, it means that only servers with a current load below 40% will be considered as target slave servers whose load capacity matches the predicted load of the current target slave server. In this case, if the task's P99 latency has significantly exceeded the limit (i.e., the service quality parameter exceeds the preset service quality parameter threshold), it means that after migrating the second task, the target slave server will quickly become fully loaded. In this situation, the load threshold for the target slave server can be lowered, meaning that other servers need to have a lower current load to be considered as target slave servers with sufficient load capacity. This makes the selection of target slave servers more stringent, thus avoiding full load on the target slave server and ensuring that the second task can be processed promptly after migration.
[0187] Furthermore, for example, a task migration cost threshold is used to determine whether to migrate a second task. When the server cluster 100 is initialized, the task migration cost threshold can be set to a default value. However, during the operation of the server cluster 100, the task migration cost threshold can be continuously adjusted based on the energy efficiency indicators of the slave servers 120 to achieve dynamic optimization. Specifically, the task migration cost threshold can be adjusted separately for different slave servers 120, so that different slave servers 120 have different task migration cost thresholds; or the task migration cost threshold can be uniformly adjusted for all slave servers 120, so that all slave servers 120 have the same task migration cost threshold.
[0188] The task migration cost threshold can be adjusted based on energy efficiency metrics. For example, if the energy efficiency metric indicates power consumption exceeding a preset threshold, the task migration cost threshold can be lowered. For instance, if the default value for the task migration cost threshold is A, it means that task migration will only occur when the migration cost is below A. In this case, if power consumption is high, it indicates that the slave server's power consumption has significantly increased due to too many tasks being migrated. Therefore, the task migration cost threshold can be lowered so that task migration only occurs when the cost is lower, thereby reducing the slave server's power consumption.
[0189] As can be seen, in this embodiment, the energy efficiency index is dynamically adjusted to adjust various default target thresholds in the server cluster, thereby optimizing the energy efficiency index of the entire server cluster. While maintaining service quality, energy consumption is reduced as much as possible, thus optimizing the operation and management of the server.
[0190] Furthermore, in some embodiments, regarding the calculation of the energy efficiency index, as described above, power consumption, quality of service parameters, and the energy efficiency index satisfy the following relationship: Energy efficiency index = ω1 Power consumption +ω2 Service Quality Parameters. Based on this, when the server's load pattern in the future is a burst load pattern, the weight of reducing power consumption ω1 can be increased, and the weight of the service quality parameters ω2 can be increased accordingly.
[0191] Understandably, the weights of power consumption and service quality parameters determine which parameter to prioritize when evaluating energy efficiency. Under non-burst load conditions, power consumption is prioritized; that is, power consumption is reduced as much as possible within acceptable service quality limits. However, under burst load scenarios, both service quality and power consumption are equally important. In this case, to cope with burst loads, some power consumption can be "sacrificed" to ensure service quality. Therefore, the weight of power consumption is reduced, and the weight of service quality parameters is correspondingly increased.
[0192] The following are experimental data for a server management method based on load prediction provided in this application.
[0193] 1. Experimental Environment
[0194] Hardware: 8-node cluster (Intel Xeon Platinum 8360Y, 256GB RAM, NVMe SSD).
[0195] Load scenarios: Scenario A: Periodic load (daytime peak + nighttime trough); Scenario B: Sudden load (random injection of peak requests, lasting 5-10 minutes).
[0196] 2. Comparison of experimental data
[0197] Table 2 shows a comparison of the performance metrics of this method and the traditional method under periodic load in scenario A; Table 3 shows a comparison of the performance metrics of this method and the traditional method under burst load in scenario B.
[0198] Table 2
[0199]
[0200] Table 3
[0201]
[0202] In the table, DVFS stands for Dynamic Voltage and Frequency Scaling.
[0203] As can be seen, this application achieves dual optimization of energy efficiency and service quality for intelligent computing servers through the deep integration of load prediction and dynamic power adjustment, including:
[0204] 1. Improved energy efficiency: Compared with the traditional fixed power strategy, it can save more than 30% of energy consumption and reduce hardware temperature by about 17%.
[0205] 2. Service quality assurance: Task timeout rate <0.5%, peak latency optimization of approximately 21%.
[0206] 3. Technical universality: Supports heterogeneous hardware (CPU / GPU / ARM) and mixed workload scenarios, and is verified by the SPECpower standard.
[0207] Therefore, the server management method based on load prediction provided in this application can be widely applied to high-density computing scenarios such as cloud computing centers, AI training clusters, and HPC, providing core technical support for the greening of data centers.
[0208] Based on the server management method based on load prediction described in any of the above embodiments, this application also provides a computer program product, which includes one or more computer programs or instructions. The computer program or instructions may be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. When the computer program is executed by a processor, it implements the server management method based on load prediction described in any of the above embodiments.
[0209] Based on the server management method based on load prediction described in any of the above embodiments, this application also provides, as follows: Figure 4 The diagram shows the structure of an electronic device. Figure 4 At the hardware level, the electronic device includes a processor, an internal bus, a network interface, memory, and non-volatile storage, and may also include other hardware required for business operations. The processor reads the corresponding computer program from the non-volatile storage into memory and then runs it to implement the server management method based on load prediction described in any of the above embodiments. As an example, the electronic device may be a main server 110.
[0210] This application also provides a computer storage medium storing a computer program, which, when executed by a processor, can be used to perform a server management method based on load prediction as described in any of the above embodiments.
[0211] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0212] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0213] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0214] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0215] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0216] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
Claims
1. A server management method based on load prediction, characterized in that, The server includes a master server and a slave server, and the method is applied to the master server, the method comprising: Based on the load data periodically uploaded by the server, predict the load of the server in the future. Based on the predicted load and the preset mapping relationship, the first operating parameters of the slave server are determined; wherein the mapping relationship is used to indicate the corresponding operating parameters in different load intervals; the operating parameters include frequency and / or voltage; the operating parameters corresponding to two adjacent load intervals are not continuous; the first operating parameter includes a first voltage; Determine the open boundary value of the load interval into which the predicted load falls, and determine the load interval boundary range from the load interval based on a preset interval size, wherein the boundary value of the load interval boundary range is the open boundary value. If the predicted load is within the boundary range of the load interval, an adjustment value for the operating parameters is determined based on the load deviation, and the first operating parameter is adjusted based on the adjustment value to obtain the second operating parameter. This includes: determining the control parameters of the PID controller; determining a voltage adjustment value based on the control parameters and the load deviation; if the open boundary value is the left boundary value of the load interval boundary range, the difference between the first voltage and the voltage adjustment value is determined as the second voltage in the second operating parameter; if the open boundary value is the right boundary value of the load interval boundary range, the sum of the first voltage and the voltage adjustment value is determined as the second voltage in the second operating parameter; wherein, the load deviation is used to characterize the difference between the predicted load and the boundary value of the load interval; the load deviation is negatively correlated with the adjustment value; If the predicted load is outside the boundary range of the load interval, the first operating parameter will not be adjusted. The slave server is controlled to operate under target operating parameters; if the predicted load is outside the boundary range of the load interval, the target operating parameters are the first operating parameters; if the predicted load is within the boundary range of the load interval, the target operating parameters are the second operating parameters.
2. The method according to claim 1, characterized in that, The control parameters include proportional gain, integral gain, and derivative gain; the control parameters for determining the PID controller include: Based on the predicted load, determine the load pattern of the slave server in the future time. If the load mode is a burst load mode, increase the proportional gain and the derivative gain and decrease the integral gain; If the load mode is a stable load mode, reduce the proportional gain and the derivative gain and increase the integral gain.
3. The method according to claim 1, characterized in that, The control parameters include proportional gain, integral gain, and derivative gain; the control parameters for determining the PID controller include: Based on the power consumption and quality of service parameters of the slave server, the energy efficiency index of the slave server is determined; If the change trend of the energy efficiency index indicates that the increase in the service quality parameter is greater than the first magnitude threshold, and the power consumption decreases, then the proportional gain and the derivative gain are increased and the integral gain is decreased. If the trend of the energy efficiency index indicates that the power consumption and the service quality parameter continue to oscillate, then reduce the proportional gain and increase the differential gain; If the trend of the energy efficiency index indicates that the service quality parameter is greater than the preset service quality parameter threshold, then the integral gain is increased. If the trend of the energy efficiency index indicates that the service quality parameter is less than the service quality parameter threshold, and the increase in power consumption is greater than the second magnitude threshold, then the proportional gain and the integral gain are reduced.
4. The method according to claim 1, characterized in that, The slave server includes a first processing unit and a second processing unit; the method further includes: Determine the time limit priority for each task in the first processing unit; The first task, whose time priority is lower than the first priority threshold, is migrated to the second processing unit for execution.
5. The method according to claim 1, characterized in that, The slave servers include multiple servers, and the method further includes: If the current load capacity of the slave server does not match the predicted load, a target slave server whose load capacity matches the predicted load is determined from among the multiple slave servers; The second task in the current slave server is migrated to the target slave server for execution.
6. The method according to claim 5, characterized in that, Determining the target slave server from the plurality of slave servers includes: Based on the data volume of the second task and the migration distance from the current slave server to each of the slave servers, the task migration cost for each of the slave servers is determined; Based on the task migration cost and load capacity corresponding to each slave server, a target slave server is determined from the plurality of slave servers.
7. The method according to claim 5, characterized in that, The method further includes: Determine the time limit priority for each task in the current slave server; Identify the second task whose time priority is lower than the second priority threshold.
8. The method according to any one of claims 1-7, characterized in that, The method further includes: Based on the power consumption and quality of service parameters of the slave server, the energy efficiency index of the slave server is determined; The target threshold is adjusted based on the energy efficiency index; the target threshold includes one or more of the following: the boundary value of the load range, the second priority threshold, the load threshold of the target server, and the task migration cost threshold.
9. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-8.
10. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store processor-executable instructions; When the processor invokes the executable instructions, it implements the operation of any one of the methods described in claims 1-8.
11. A computer-readable storage medium, characterized in that, It stores computer instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1-8.