Load prediction method and device, electronic device, and computer-readable storage medium
By acquiring and fitting performance and traffic prediction functions, the problem of difficulty in accurately predicting server load in the existing technology is solved, accurate prediction of server load and reasonable resource allocation are achieved, and user experience and promotional activities are improved.
Patent Information
- Application Number
- CN202110087665.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-22
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2041-01-22
AI Technical Summary
The prior art is difficult to accurately estimate the load of servers or service clusters, resulting in unreasonable resource allocation, which may cause resource waste or service interruption.
By obtaining the performance prediction function and traffic prediction function of the server under test, using performance indicator data and online traffic data to fit, predict the traffic and performance indicator values at the target moment in the future, thereby achieving accurate prediction of server load.
Improve the accuracy of server load, help to rationally configure resources, avoid resource waste and service interruption, and improve the effectiveness of user experience and promotional activities.
Smart Images

Figure CN113760675B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and more specifically, to a load prediction method and device, an electronic device, and a computer-readable storage medium. Background Art
[0002] At present, in large-scale e-commerce applications, due to the huge number of users, when the website conducts centralized promotions, it is necessary to accurately estimate the load of each server or service cluster in the face of massive user requests. If the actual situation is lower than the estimate, it will cause a waste of server or cluster resources. If the actual situation is higher than the estimate, it may cause the server or cluster to be unable to withstand user traffic, resulting in service interruption or delay, seriously affecting user experience, further affecting the effectiveness of promotional activities, and wasting a large amount of capital investment in the early stage of promotion.
[0003] In the process of realizing the concept disclosed in the present invention, the inventors found that there are at least the following problems in the related technology: when adopting the method of estimating the carrying capacity of the server or service cluster in the related technology, it is impossible to obtain a relatively accurate traffic prediction value of the server interface at the target time, and it is impossible to obtain a relatively accurate performance indicator prediction value of the server under the predicted traffic condition. As a result, it is impossible to achieve a relatively accurate estimation of the server load, and ultimately it is difficult to achieve a reasonable allocation of resources for the server or service cluster. Summary of the invention
[0004] In view of this, the present disclosure provides a load prediction method and apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
[0005] One aspect of the present disclosure provides a load prediction method, comprising:
[0006] Obtain a performance prediction function of the server under test, wherein the performance prediction function is a function fitted using performance indicator data, and the performance indicator data includes data obtained by performing service tests on the server under test under different traffic conditions; obtain a traffic prediction function obtained by fitting online traffic data of a service interface of the server under test; predict the traffic prediction value of the service interface of the server under test at a future target time using the traffic prediction function; and input the traffic prediction value into the performance prediction function to obtain a performance indicator prediction value of the server under test.
[0007] According to an embodiment of the present disclosure, the above-mentioned method of obtaining the performance prediction function of the server under test includes: obtaining data obtained by performing various single service tests on the server under test under different traffic conditions; fitting the data obtained from the above-mentioned single service tests to obtain a single service performance prediction function; and obtaining the performance prediction function of the server under test based on multiple of the above-mentioned single service performance prediction functions.
[0008] According to an embodiment of the present disclosure, obtaining the performance prediction function of the server under test based on the multiple single service performance prediction functions includes: superimposing the multiple single service performance prediction functions to obtain the performance prediction function of the server under test.
[0009] According to an embodiment of the present disclosure, the data obtained by performing each single service test on the above-mentioned server under different traffic conditions includes: in a single service state, performing different traffic condition tests on the service interface of the above-mentioned server under test; obtaining the measured values of multiple performance indicators of the above-mentioned server under test under different traffic conditions; the data obtained by the above-mentioned single service test are fitted to obtain a single service performance prediction function, including: using the measured values of multiple performance indicators of the above-mentioned server under different traffic conditions to fit and obtain a single service performance prediction function.
[0010] According to an embodiment of the present disclosure, in a single service state, performing different flow condition tests on the service interface of the server under test includes: performing different flow condition tests on the service interface of the server under test by one of the pressurization methods selected from instantaneous pressurization, gradual pressurization, and gradient pressurization.
[0011] According to an embodiment of the present disclosure, the traffic prediction function obtained by fitting the online traffic data of the service interface of the server under test includes: obtaining through online real-time sampling, multiple online traffic measured values of the service interface traffic of the server under test corresponding to each time node in multiple time nodes; and fitting the multiple time nodes and the multiple online traffic measured values to obtain the traffic prediction function.
[0012] According to an embodiment of the present disclosure, the above-mentioned fitting method is a linear regression fitting of the least squares method.
[0013] Another aspect of the present disclosure provides a load prediction device, including: a first acquisition module, used to obtain a performance prediction function of a server under test, wherein the performance prediction function is a function obtained by fitting using performance indicator data, and the performance indicator data includes data obtained by performing service tests on the server under test under different traffic conditions; a second acquisition module, used to obtain a traffic prediction function obtained by fitting online traffic data of a service interface of the server under test; a prediction module, used to predict a traffic prediction value of the service interface of the server under test at a future target moment through the traffic prediction function; and a third acquisition module, used to input the traffic prediction value into the performance prediction function to obtain a performance indicator prediction value of the server under test.
[0014] According to an embodiment of the present disclosure, the above-mentioned first acquisition module includes: a first acquisition unit, used to obtain data obtained by performing each single service test on the above-mentioned server under different traffic conditions; a second acquisition unit, used to fit the data obtained by the above-mentioned single service test to obtain a single service performance prediction function; and a third acquisition unit, used to obtain the performance prediction function of the above-mentioned server under test based on multiple of the above-mentioned single service performance prediction functions.
[0015] According to an embodiment of the present disclosure, the third acquisition unit is used to superimpose multiple of the above-mentioned single service performance prediction functions to obtain the performance prediction function of the above-mentioned server under test.
[0016] According to an embodiment of the present disclosure, the above-mentioned first acquisition unit includes: a first test sub-unit, which is used to perform different traffic condition tests on the service interface of the above-mentioned server under test in a single service state; a first acquisition sub-unit, which is used to obtain the actual measured values of multiple performance indicators of the above-mentioned server under test under different traffic conditions; the above-mentioned second acquisition unit includes: a second acquisition sub-unit, which is used to use the actual measured values of multiple performance indicators of the above-mentioned server under test under different traffic conditions to perform fitting to obtain a single service performance prediction function.
[0017] According to an embodiment of the present disclosure, the first test subunit is used to: perform different flow condition tests on the service interface of the server under test by one of the pressurization methods including instantaneous pressurization, gradual pressurization, and gradient pressurization.
[0018] According to an embodiment of the present disclosure, the above-mentioned second acquisition module includes: a fourth acquisition unit, which is used for online real-time sampling to obtain multiple online traffic measured values of the service interface traffic of the above-mentioned server under test corresponding to each time node in multiple time nodes; and a fifth acquisition unit, which is used to fit the above-mentioned multiple time nodes and the above-mentioned multiple online traffic measured values to obtain the above-mentioned traffic prediction function.
[0019] According to an embodiment of the present disclosure, the above-mentioned fitting method is a linear regression fitting of the least squares method.
[0020] Another aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the load prediction method as described above.
[0021] Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the load prediction method as described above when executed.
[0022] Another aspect of the present disclosure provides a computer program product, which includes computer executable instructions. When the computer executable instructions are executed, they are used to implement the load prediction method as described above.
[0023] According to the embodiments of the present disclosure, the performance prediction function is a function obtained by fitting the data obtained by performing service tests on the tested server under different traffic conditions, and the traffic prediction function is a traffic prediction function obtained by fitting the online traffic data of the service interface of the tested server. Therefore, the performance prediction function is close to the real performance function of the server, and the traffic prediction function is close to the real traffic function of the server. Furthermore, the traffic prediction value at the future target moment obtained by the traffic prediction function is closer to the real traffic value, and the performance index value of the server at the future target moment obtained by inputting the traffic prediction value into the performance prediction function is closer to the real server performance index value, and finally a relatively accurate prediction of the server load is achieved. Therefore, at least partially overcomes the problem in the prior art that it is impossible to obtain a relatively accurate traffic prediction value of the server interface at the target moment, and it is impossible to obtain a relatively accurate performance index prediction value of the server under the predicted traffic condition, and then it is impossible to achieve a relatively accurate prediction of the server load, and finally it is difficult to achieve a reasonable configuration of the resources of the server or service cluster. The estimated result of the server load obtained by the load prediction method according to the embodiment of the present invention can be used as a reference for the subsequent configuration of the resources of the tested server or service cluster, thereby saving unnecessary waste of server or service cluster resources. Furthermore, after reasonable configuration, since the resource configuration of the server or service cluster matches the user traffic, it will not cause service interruption or delay, and the user experience is good. In website promotion activities, it can achieve a better promotion effect and increase the promotion revenue of merchants. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0025] Figure 1 An exemplary system architecture to which the load prediction method of the present disclosure can be applied is schematically shown;
[0026] Figure 2 A flow chart of a load prediction method according to an embodiment of the present disclosure is schematically shown;
[0027] Figure 3 A flow chart of a load prediction method according to another embodiment of the present disclosure is schematically shown;
[0028] Figure 4 A curve diagram schematically showing pressure variation over time in an instantaneous pressurization method according to an embodiment of the present disclosure is shown;
[0029] Figure 5 A schematic diagram showing a pressure variation curve over time in a gradual pressurization method according to an embodiment of the present disclosure;
[0030] Figure 6 A schematic diagram showing a pressure variation curve over time of a gradient pressurization method according to an embodiment of the present disclosure;
[0031] Figure 7 A block diagram schematically shows a load prediction device according to an embodiment of the present disclosure; and
[0032] Figure 8 A block diagram of an electronic device for implementing a load prediction method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0033] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0034] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0035] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.
[0036] In the case of using expressions such as "at least one of A, B, and C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.). In the case of using expressions such as "at least one of A, B, or C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, or C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0037] Before elaborating on the embodiments of the present disclosure in detail, the system structure and application scenarios involved in the load prediction method provided in the embodiments of the present disclosure are first introduced as follows.
[0038] Figure 1 The following schematically shows an exemplary system architecture to which the load prediction method of the present disclosure can be applied. It should be noted that: Figure 1 What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0039] like Figure 1 As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.
[0040] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients and / or social platform software, etc. (only as examples).
[0041] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0042] The server 105 may be a server that provides various services, including but not limited to service 1, service 2, service 3, service 4, etc. Service 1, service 2, service 3, service 4 may be, for example, services that support websites browsed by users using terminal devices 101, 102, 103. The backend management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0043] It should be noted that the load prediction method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the load prediction device provided in the embodiment of the present disclosure can generally be set in the server 105. The load prediction method provided in the embodiment of the present disclosure can also be executed by a computer, server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Correspondingly, the load prediction device 700 provided in the embodiment of the present disclosure can also be set in a computer, server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Alternatively, the load prediction method provided in the embodiment of the present disclosure can also be executed by the terminal devices 101, 102, or 103, or can also be executed by other terminal devices different from the terminal devices 101, 102, or 103. Correspondingly, the load prediction device provided in the embodiment of the present disclosure may also be set in the terminal device 101, 102, or 103, or in other terminal devices different from the terminal device 101, 102, or 103.
[0044] According to an embodiment of the present disclosure, the terminal device 101, 102, or 103 sends a request to the server 105, such as a query request or a payment request for a certain product, and the server 105 responds accordingly based on the specific request of the terminal device 101, 102, or 103; the server 105 can execute the load prediction method provided by the embodiment of the present disclosure locally, or other terminal devices, servers, or server clusters that receive the load prediction method can execute the load prediction method provided by the embodiment of the present disclosure.
[0045] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0046] A service cluster is a set of servers that work together to provide a service platform that is more stable, efficient, and scalable than a single service. A cluster is generally composed of two or more servers, each of which is called a cluster node. Cluster nodes can communicate with each other, and a cluster may provide multiple services. In the process of implementing the present disclosure, it was found that the following methods can be used to estimate the carrying capacity of a service cluster:
[0047] Method 1: Perform stress testing (hereinafter referred to as stress testing) on a single machine or a small cluster and a single service to evaluate the overall cluster performance limit, and then perform the evaluation according to the intensity of the promotion. Stress testing of a single service can fully test the cluster's ability to provide a certain service, but a cluster generally provides multiple services. In reality, when a cluster provides multiple services at the same time, stress evaluation usually relies on experience, which can easily lead to inaccurate evaluation.
[0048] Method 2: Through single-click or small cluster multi-service simultaneous stress testing, perform cluster performance limit stress testing according to the normal traffic ratio of different services, and then evaluate according to the intensity of the promotion. In this method, multiple services in the unified cluster are allocated according to the daily or promotional traffic, and the simulated traffic allocation is prone to distortion and misjudgment.
[0049] In view of this, the embodiments of the present disclosure provide a load prediction method, a load prediction device, an electronic device, a computer-readable storage medium, and a computer program product to at least partially solve the above technical problems, which are described in detail below.
[0050] Figure 2 The flowchart of the load prediction method according to the embodiment of the present disclosure is schematically shown.
[0051] like Figure 2 As shown, the method includes operations S201 to S204.
[0052] In operation S201, a performance prediction function of the server under test is obtained, wherein the performance prediction function is a function obtained by fitting using performance indicator data. Furthermore, the performance indicator data includes data obtained by performing service tests on the server under test under different traffic conditions.
[0053] Specifically, the performance indicator data refers to the corresponding measured values of multiple performance indicators of the above-mentioned server under different traffic conditions; in the embodiment of the present disclosure, the measured values of performance indicators refer to the operating status data of the server, such as but not limited to CPU utilization, memory utilization, CPU load, number of TCP connections, number of threads, etc.; different traffic conditions refer to different numbers of service requests per unit time initiated by the client or test end to the server under test.
[0054] The performance prediction function is a prediction function of the performance index value of the tested server as the traffic changes. The following example illustrates the specific meaning of the performance prediction function. For example, for the performance index of CPU usage, the actual performance function of the server is: Where x is the traffic of a certain service. Multiple traffic measured values and multiple performance index measured values under different traffic conditions are obtained by sampling. Using multiple traffic measured values and multiple performance index measured values, an approximate curve is obtained by curve fitting. It is the performance prediction function of the server under test.
[0055] In operation S202, a traffic prediction function is obtained by fitting the online traffic data of the service interface of the server under test.
[0056] In the embodiments of the present disclosure, the traffic prediction function refers to a prediction function of the traffic of the service interface of the tested server over time. For example, the real function of the traffic of a service interface of the tested server over time is: i '=f(t)', where t is a time node, multiple time nodes are sampled and recorded, as well as the measured value of the service interface flow of the tested server corresponding to each time node. The approximate curve Q is obtained by curve fitting for multiple time nodes and multiple measured flow values. i =f(t), which is the traffic prediction function of a service on the server.
[0057] In operation S203, the traffic prediction function is used to predict the traffic prediction value of the service interface of the server under test at a future target time.
[0058] In operation S204, the traffic prediction value is input into the performance prediction function to obtain a performance indicator prediction value of the server under test.
[0059] According to the embodiments of the present disclosure, the performance prediction function is a function obtained by fitting the data obtained by performing service tests on the tested server under different traffic conditions, and the traffic prediction function is a traffic prediction function obtained by fitting the online traffic data of the service interface of the tested server. Therefore, the performance prediction function is close to the real performance function of the server, and similarly, the traffic prediction function is close to the real traffic function of the server. Furthermore, the traffic prediction value at the future target moment obtained by the traffic prediction function is closer to the real traffic value, and the performance index value of the server at the future target moment obtained by inputting the traffic prediction value into the performance prediction function is closer to the real server performance index value, and finally a relatively accurate prediction of the server load is achieved. Therefore, at least partially overcomes the problem in the prior art that it is impossible to obtain a relatively accurate traffic prediction value of the server interface at the target moment, and it is impossible to obtain a relatively accurate performance index prediction value of the server under the predicted traffic condition, and then it is impossible to achieve a relatively accurate prediction of the server load, and finally it is difficult to achieve a reasonable configuration of the resources of the server or service cluster. The estimated result of the server load obtained by the load prediction method according to the embodiment of the present invention can be used as a reference for the subsequent configuration of the resources of the tested server or service cluster, thereby saving unnecessary waste of server or service cluster resources. Furthermore, after reasonable configuration, since the resource configuration of the server or service cluster matches the user traffic, it will not cause service interruption or delay, and the user experience is good. In website promotion activities, it can achieve a better promotion effect and increase the promotion revenue of merchants.
[0060] In addition, in the embodiments of the present disclosure, the traffic prediction function is a traffic prediction function obtained by fitting the online traffic data of the service interface of the server under test, that is, the traffic prediction function is obtained by sampling the traffic data in real time online during the actual operation of the server, which further improves the authenticity of the traffic prediction function and the accuracy of the traffic prediction value at the target time, and ultimately further improves the accuracy of the server load estimation.
[0061] As an optional embodiment, after obtaining the predicted value of the performance index of the tested server in operation S204, it is determined whether the predicted value of the performance index exceeds the threshold configured by the server. If it exceeds the threshold configured by the server, an alarm is issued, and after the alarm, the flow prediction at the subsequent time is continued from operation S202; if it does not exceed the threshold configured by the server, the flow prediction at the subsequent time is also continued from operation S202. Adding an alarm can timely remind the server maintenance personnel or engineers, so as to facilitate timely adjustment of the resource configuration of the tested server or service cluster.
[0062] As an optional embodiment, the load prediction method provided by the embodiment of the present disclosure can be applied to single-service or multi-service scenarios (for example, scenarios using service clusters). Specifically, when applied to multi-service scenarios, when obtaining the performance prediction function of the server or service cluster under test, the method that can be adopted is: first, obtain the data obtained by performing each single service test on the above-mentioned server or service cluster under different traffic conditions, and then, use the data obtained from the single service test to perform fitting to obtain a single service performance prediction function, and obtain the performance prediction function of the above-mentioned server or service cluster under test based on multiple of the above-mentioned single service performance prediction functions.
[0063] As an optional embodiment, when obtaining the performance prediction function of the server or service cluster under test based on multiple single service performance prediction functions, the multiple single service performance prediction functions are superimposed to obtain the performance prediction function of the server or service cluster under test.
[0064] The embodiment of the present disclosure adopts a method of obtaining a performance prediction function of a tested server or service cluster based on multiple single-service performance prediction functions, which has more obvious advantages when applied to service cluster load prediction. The load prediction method provided by the embodiment of the present disclosure has the functions of single-service performance prediction and multi-service performance prediction. Therefore, on the one hand, it can detect the service quality of each service in the service cluster, and on the other hand, it can accurately evaluate the load of each service as the traffic changes, which is convenient for integrating the conditions of each service in the service cluster, and finally evaluating the actual load of the service cluster. Under the condition of different traffic ratios of each service in the service cluster, the performance limit of the overall cluster can be evaluated, and the service cluster load can be evaluated more accurately, reducing the losses caused by inaccurate evaluation. At the same time, it can also serve as the main judgment basis for real-time cluster adjustment.
[0065] As an optional embodiment, before fitting with the data obtained from the single service test, it is determined whether all single service tests have been completed. If all single service tests have been completed, the data obtained from the single service test is used for fitting; if all single service tests have not been completed, the unfinished single service tests need to be continued. By adding a judgment step, it can be ensured that all single service tests of the server or service cluster are completed, so as to avoid inaccurate predictions due to missed tests.
[0066] As an optional embodiment, obtaining data obtained by performing each single service test on the above-mentioned server under different traffic conditions includes: in a single service state, performing different traffic condition tests on the service interface of the above-mentioned server under test to obtain actual measured values of multiple performance indicators of the above-mentioned server under different traffic conditions, and then using the actual measured values of multiple performance indicators of the above-mentioned server under test under different traffic conditions to perform fitting to obtain a single service performance prediction function.
[0067] As an optional embodiment, the measured values of multiple performance indicators of the above-mentioned server under different traffic conditions are used to fit and obtain a single service performance prediction function. The above-mentioned fitting method is least squares curve fitting. In the embodiments of the present disclosure, the above-mentioned fitting method is not limited to the least squares fitting method, but can be extended to other algorithms in machine learning.
[0068] As an optional embodiment, in the process of obtaining data obtained by performing each single service test on the server under test under different traffic conditions, performing different traffic condition tests on the service interface of the server under test includes: performing different traffic condition tests on the service interface of the server under test by one of the pressurization methods selected from instantaneous pressurization, gradual pressurization, and gradient pressurization.
[0069] Figure 4 The figure schematically shows a curve diagram of pressure variation over time in the instantaneous pressurization method according to an embodiment of the present disclosure.
[0070] Instantaneous stress testing refers to simulating a large number of concurrent requests at the same time through stress testing tools, and applying all loads to the target server at the same time, testing the server's ability to handle sudden traffic. The main application scenarios are flash sales, rush purchases, red envelope grabbing and other activities.
[0071] Figure 5 The graph schematically shows the pressure variation over time in the gradual pressurization method according to an embodiment of the present disclosure.
[0072] Gradual pressurization refers to simulating a general online pressure curve, usually a parabola. For example, within a promotion cycle, the pressure gradually changes over time. The main application scenarios are daily general activities and promotions.
[0073] Figure 6 The figure schematically shows a curve of pressure variation over time in the gradient pressurization method according to an embodiment of the present disclosure.
[0074] Gradient pressure is similar to gradual pressure, but the purpose of pressure is different. It is to find the maximum load capacity of the system more quickly, that is, the maximum flow (throughput) and concurrency of the system under the premise of meeting business requirements while the response time of the service meets business requirements. Figure 6As shown, it can be seen that by adopting the gradient pressurization method, each flow value (or pressure value) will be stable for a period of time, and there will be no instantaneous rise or fall. Therefore, the measured values of the performance indicators obtained under various flow conditions are relatively accurate; and the flow value (or pressure value) shows a trend of gradually rising in stages, which will cover a relatively large flow range. The sampling range of the flow value and the measured value of the performance indicator is wider, and the data sample is richer. Therefore, the performance prediction function obtained by fitting the flow value and the measured value of the performance indicator is also more accurate.
[0075] In the embodiments of the present disclosure, the method of testing the service interface of the server under test under different flow conditions (i.e., stress testing) is not limited to instantaneous pressurization, gradual pressurization, and gradient pressurization. Other pressurization methods may also be used as long as the actual measured values of multiple performance indicators of the server under test under different flow conditions can be obtained.
[0076] As an optional embodiment, the traffic prediction function obtained by fitting the online traffic data of the service interface of the server under test includes: obtaining through online real-time sampling, multiple online traffic measured values of the service interface traffic of the server under test corresponding to each time node in multiple time nodes; and fitting the multiple time nodes and the multiple online traffic measured values to obtain the traffic prediction function.
[0077] As an optional embodiment, in the process of fitting the above-mentioned multiple time nodes and the above-mentioned multiple online traffic measured values to obtain the above-mentioned traffic prediction function, the above-mentioned fitting method is the linear regression fitting of the least squares method. In the embodiment of the present disclosure, the above-mentioned fitting method is not limited to the least squares fitting method, and can be extended to other algorithms in machine learning; and the traffic prediction function is not limited to the linear regression method when fitting by the least squares method, and can also adopt the least squares multiple function fitting. In the embodiment of the present disclosure, the above-mentioned fitting method is the linear regression fitting of the least squares method. The reason is that because the traffic prediction function is a function obtained by online real-time sampling fitting, considering the timeliness of real-time prediction, it is necessary to calculate and fit the traffic prediction function in a very short time. Based on the linear regression fitting, a single function fitting is adopted, and the regression speed is fast, and the traffic prediction can be completed quickly, which allows R&D and operation and maintenance personnel to understand the possible maximum traffic in the future more quickly, and to gain valuable decision-making time for servers or service clusters and services.
[0078] As an optional embodiment, the prediction result using the traffic prediction function should be slightly higher than the actual value as much as possible to prevent misjudgment and cause service anomalies of the server or service cluster.
[0079] Figure 3A flow chart of a load prediction method according to another embodiment of the present disclosure is schematically shown.
[0080] like Figure 3 As shown, the method includes operations S301 to S310. In the method, S301 to S304 are the test phase, the purpose of which is to obtain the performance prediction function of the tested server in advance; S305 to S310 are the implementation prediction phase, the purpose of which is to obtain the predicted value of the performance index of the tested server during the actual operation process and to make a decision on whether to alarm.
[0081] In operation S301, in a single service state, a service interface of a tested server is tested under different traffic conditions.
[0082] In operation S302, actual measured values of multiple performance indicators of the tested server under different traffic conditions are obtained.
[0083] In operation S303, determine whether the different traffic condition tests for all services have been completed. If the different traffic condition tests for all services have been completed, perform operation S304; if the different traffic condition tests for all services have not been completed, return to operation S301 and continue to perform different traffic condition tests on the unfinished services.
[0084] In operation S304, multiple measured values of performance indicators of the tested server under different traffic conditions are used for fitting to obtain a single service performance prediction function, and multiple single service performance prediction functions are superimposed to obtain a performance prediction function of the tested server.
[0085] In operation S305, online real-time sampling is performed to obtain a plurality of online flow measurement values of the service interface flow of the tested server corresponding to each time node in a plurality of time nodes.
[0086] In operation S306, multiple time nodes and multiple online traffic measured values are fitted to obtain a traffic prediction function obtained by fitting the online traffic data of the service interface of the tested server.
[0087] In operation S307, the traffic prediction function is used to predict the traffic prediction value of the service interface of the test server at the future target time.
[0088] In operation S308, the traffic prediction value is input into a performance prediction function to obtain a performance indicator prediction value of the server under test.
[0089] In operation S309, determine whether the performance indicator prediction value of the tested server obtained in operation S308 exceeds the threshold of the server configuration; if it exceeds the threshold of the server configuration, perform an alarm prompt of operation S310, and continue to perform traffic prediction for subsequent times from operation S305 after the alarm prompt of operation S310; if it does not exceed the threshold of the server configuration, continue to perform traffic prediction for subsequent times from operation S305.
[0090] The following example illustrates the use of Figure 3 The load prediction method shown in the figure obtains the specific process of the performance prediction function of the measured server:
[0091] For example, for the performance indicator of CPU usage, the load prediction method is used to obtain the predicted value of the CPU usage of the server cluster at the future target moment. The specific operations are as follows:
[0092] In operation S301, in a single service state, each service interface of the service cluster is tested under different traffic conditions. There are multiple different services deployed in the service cluster, each service is relatively independent, and there is no clear relationship between the pressure (traffic) conditions of each service. Among them, the different traffic condition test, that is, the stress test method, adopts a gradient pressurization method;
[0093] In operation S302, actual measured values of multiple performance indicators of the tested service cluster under different traffic conditions are obtained;
[0094] In operation S303, it is determined whether the different flow condition tests of all services are completed. If the different flow condition tests of all services are completed, operation S304 is performed; if the different flow condition tests of all services are not completed, the process returns to operation S301 to continue to perform different flow condition tests on the unfinished services;
[0095] In operation S304, for the tested service cluster, a fitting function is obtained by using a least squares polynomial fitting method based on a plurality of flow measured values recorded by sampling and recording, and a plurality of performance indicator measured values under different flow conditions: (where i is a single service), that is, the single service performance prediction function corresponding to the service interface, where x is the traffic of the service;
[0096] Among them, the least squares polynomial fitting method is as follows:
[0097] Given a data point p i (x i ,y i ), where i = 1, 2, ..., m; find the approximate curve of the true curve y = f(x) And make the deviation between the approximate curve and the true curve y=f(x) as small as possible;
[0098] Among them, the approximate curve At point p i Deviation
[0099]
[0100] When the sum of squared deviations is minimum, that is:
[0101]
[0102] Get an approximate curve
[0103] Combine multiple of the above single service performance prediction functions Superimpose them to obtain the performance prediction function of the tested service cluster:
[0104]
[0105] In operation S305, online real-time sampling is performed to obtain multiple online flow measurement values of the service interface flow of the tested service cluster corresponding to each time node in the multiple time nodes;
[0106] In operation S306, the function Q is obtained by linear regression fitting of the least squares method for the multiple time nodes of the sampled records and the measured value of the service interface flow of the tested server corresponding to each time node. i =f(t), which is the traffic prediction function of each service interface traffic that changes at any time;
[0107] In operation S307, the traffic prediction function is used to predict the traffic prediction value of the service interface of the service cluster at the future target time. That is, the value of the node at the future target time is input into the traffic prediction function Q i =f(t), output flow prediction value Q i ;
[0108] In operation S308, the traffic prediction value is input into the performance prediction function Among them, the traffic prediction value Q output in the previous step i As the prediction function in this step, x i Input; Output: The predicted value of CPU usage of the service cluster under test;
[0109] In operation S309, determine whether the CPU usage prediction value of the tested service cluster obtained in operation S308 exceeds the threshold configured for the service cluster; if it exceeds the threshold configured for the service cluster, perform an alarm prompt of operation S310, and continue to perform traffic prediction for subsequent times from operation S305 after the alarm prompt of operation S310; if it does not exceed the threshold configured for the service cluster, continue to perform traffic prediction for subsequent times from operation S305.
[0110] Figure 7 A block diagram of a load prediction device 700 according to an embodiment of the present disclosure is schematically shown.
[0111] The load prediction device 700 can be used to implement reference Figure 2 The method shown.
[0112] like Figure 7 As shown, the load prediction device 700 includes: a first acquisition module 710 , a second acquisition module 720 , a prediction module 730 and a third acquisition module 740 .
[0113] The first acquisition module 710 is used to obtain the performance prediction function of the server under test, wherein the above-mentioned performance prediction function is a function fitted by using performance indicator data, and the above-mentioned performance indicator data includes data obtained by performing service tests on the above-mentioned server under different traffic conditions; the second acquisition module 720 is used to obtain the traffic prediction function obtained by fitting the online traffic data of the service interface of the above-mentioned server under test; the prediction module 730 is used to predict the traffic prediction value of the service interface of the above-mentioned server under test at a future target time through the above-mentioned traffic prediction function; the third acquisition module 740 is used to input the above-mentioned traffic prediction value into the above-mentioned performance prediction function to obtain the performance indicator prediction value of the above-mentioned server under test.
[0114] According to the embodiment of the present disclosure, the performance prediction function obtained by the first acquisition module 710 is a function obtained by fitting the data obtained by performing service tests on the tested server under different traffic conditions, and the traffic prediction function obtained by the second acquisition module 720 is a traffic prediction function obtained by fitting the online traffic data of the service interface of the tested server. Therefore, the performance prediction function is close to the real performance function of the server, and similarly, the traffic prediction function is close to the real traffic function of the server. Furthermore, the traffic prediction value at the future target moment obtained by the traffic prediction function is closer to the real traffic value, and the performance index value of the server at the future target moment obtained by inputting the traffic prediction value into the performance prediction function is closer to the real server performance index value, and finally a relatively accurate prediction of the server load is achieved. Therefore, at least partially overcomes the problem in the prior art that it is impossible to obtain a relatively accurate traffic prediction value of the server interface at the target moment, and it is impossible to obtain a relatively accurate performance index prediction value of the server under the predicted traffic condition, and then it is impossible to achieve a relatively accurate prediction of the server load, and finally it is difficult to achieve a reasonable configuration of the resources of the server or service cluster. The estimated result of the server load obtained by the load prediction method according to the embodiment of the present invention can be used as a reference for the subsequent configuration of the resources of the tested server or service cluster, thereby saving unnecessary waste of server or service cluster resources. Furthermore, after reasonable configuration, since the resource configuration of the server or service cluster matches the user traffic, it will not cause service interruption or delay, and the user experience is good. In website promotion activities, it can achieve a better promotion effect and increase the promotion revenue of merchants.
[0115] In addition, in the embodiment of the present disclosure, the traffic prediction function obtained by the second acquisition module 720 is a traffic prediction function obtained by fitting the online traffic data of the service interface of the server under test, that is, the traffic prediction function is obtained by sampling the traffic data in real time online through the second acquisition module 720 during the actual operation of the server, which further improves the authenticity of the traffic prediction function and the accuracy of the traffic prediction value at the target time, and ultimately further improves the accuracy of the server load estimation.
[0116] As an optional embodiment, the above-mentioned first acquisition module 710 includes: a first acquisition unit, used to obtain data obtained by performing each single service test on the above-mentioned server under different traffic conditions; a second acquisition unit, used to fit the data obtained by the above-mentioned single service test to obtain a single service performance prediction function; and a third acquisition unit, used to obtain the performance prediction function of the above-mentioned server under test based on multiple of the above-mentioned single service performance prediction functions.
[0117] As an optional embodiment, the third acquisition unit is used to superimpose multiple of the above-mentioned single service performance prediction functions to obtain the performance prediction function of the above-mentioned server under test.
[0118] The embodiment of the present disclosure achieves the purpose of obtaining the performance prediction function of the tested server or service cluster according to multiple single-service performance prediction functions through the first acquisition unit, the second acquisition unit, and the third acquisition unit, and has more obvious advantages when applied to service cluster load prediction. In the load prediction device 700 provided by the embodiment of the present disclosure, the first acquisition unit and the second acquisition unit are used to obtain the single-service performance prediction function, and the third acquisition unit is used for the performance prediction function of multiple services. The load prediction device 700 has the functions of single-service performance prediction and multi-service performance prediction. Therefore, on the one hand, the service quality of each service in the service cluster can be detected, and on the other hand, the load of each service can be accurately evaluated with the change of traffic flow, which is convenient for integrating the situation of each service in the service cluster, and finally evaluating the actual load of the service cluster. Under the condition of different traffic ratios of each service in the service cluster, the performance limit of the overall cluster can be evaluated, and the service cluster load can be evaluated more accurately to reduce the loss caused by inaccurate evaluation. At the same time, it can also serve as the main judgment basis for real-time cluster adjustment.
[0119] As an optional embodiment, the above-mentioned first acquisition unit includes: a first test sub-unit, used to test the service interface of the above-mentioned server under different traffic conditions in a single service state; a first acquisition sub-unit, used to obtain the actual measured values of multiple performance indicators of the above-mentioned server under different traffic conditions; the above-mentioned second acquisition unit includes: a second acquisition sub-unit, used to use the actual measured values of multiple performance indicators of the above-mentioned server under different traffic conditions to perform fitting to obtain a single service performance prediction function.
[0120] As an optional embodiment, the first test subunit is used to: perform different flow condition tests on the service interface of the tested server by using one of the pressurization modes of instantaneous pressurization, gradual pressurization, and gradient pressurization.
[0121] In the embodiment of the present disclosure, the first test subunit can be used to test the service interface of the tested server under different flow conditions by means of gradient pressure; Figure 6As shown, it can be seen that by adopting the gradient pressurization method, each flow value (or pressure value) will be stable for a period of time, and there will be no instantaneous rise or fall. Therefore, the actual measured values of the performance indicators obtained under various flow conditions are relatively accurate; and the flow value (or pressure value) shows a trend of gradually rising in stages, which will cover a relatively large flow range. The sampling range of the flow value and the actual measured value of the performance indicator is wider, and the data samples are richer. Therefore, the performance prediction function obtained by fitting the flow value and the actual measured value of the performance indicator by the load prediction device 700 is also more accurate.
[0122] According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits, or at least part of the functions of any one of them can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be at least partially implemented as hardware circuits, such as field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems on chips, systems on substrates, systems on packages, application specific integrated circuits (ASICs), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, submodules, units, and subunits can be at least partially implemented as computer program modules, and when the computer program modules are run, the corresponding functions can be performed.
[0123] For example, any multiple of the first acquisition module 710, the second acquisition module 720, the prediction module 730, and the third acquisition module 740 can be combined in one module / unit / subunit for implementation, or any one of the modules / units / subunits can be split into multiple modules / units / subunits. Alternatively, at least part of the functions of one or more of these modules / units / subunits can be combined with at least part of the functions of other modules / units / subunits and implemented in one module / unit / subunit. According to an embodiment of the present disclosure, at least one of the first acquisition module 710, the second acquisition module 720, the prediction module 730, and the third acquisition module 740 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or by any one of the three implementation methods of software, hardware, and firmware, or by a suitable combination of any of them. Alternatively, at least one of the first acquisition module 710 , the second acquisition module 720 , the prediction module 730 , and the third acquisition module 740 may be at least partially implemented as a computer program module, and when the computer program module is executed, a corresponding function may be performed.
[0124] The electronic device provided by the embodiment of the present disclosure includes: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the load prediction method as described above.
[0125] Figure 8 A block diagram of an electronic device suitable for implementing the method described above according to an embodiment of the present disclosure is schematically shown. Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0126] like Figure 8As shown, the electronic device 800 according to an embodiment of the present disclosure includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage section 808 into a random access memory (RAM) 803. The processor 801 can include, for example, a general microprocessor (e.g., CPU), an instruction set processor, and / or a related chipset, and / or a dedicated microprocessor (e.g., an application specific integrated circuit (ASIC)), and so on. The processor 801 can also include on-board memory for caching purposes. The processor 801 can include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0127] In the RAM 803, various programs and data required for the operation of the electronic device 800 are stored. The processor 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. The processor 801 performs various operations of the method flow according to an embodiment of the present disclosure by executing the programs in the ROM 802 and / or the RAM 803. It should be noted that the program can also be stored in one or more memories other than the ROM 802 and the RAM 803. The processor 801 can also perform various operations of the method flow according to an embodiment of the present disclosure by executing the programs stored in the one or more memories.
[0128] According to an embodiment of the present disclosure, the electronic device 800 can further include an input / output (I / O) interface 805, and the input / output (I / O) interface 805 is also connected to the bus 804. The system 800 can further include one or more of the following components connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed so that a computer program read from it can be installed into the storage section 808 as needed.
[0129] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.
[0130] Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which, when executed, are used to implement the load prediction method described above. The computer-readable storage medium may be included in the device / apparatus / system described in the above embodiments; or it may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0131] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it may include, but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device.
[0132] For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 802 and / or the RAM 803 described above and / or one or more memories other than the ROM 802 and the RAM 803 .
[0133] Another aspect of the present disclosure provides a computer program product, which includes computer executable instructions, namely, program codes for executing the method provided by the embodiments of the present disclosure. When the computer program product runs on an electronic device 800, the program code is used to enable the electronic device 800 to implement the load prediction method provided by the embodiments of the present disclosure.
[0134] When the computer program is executed by the processor 801, the above functions defined in the system / device of the embodiment of the present disclosure are executed. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0135] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 809, and / or installed from a removable medium 811. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0136] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0137] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions. It can be understood by those skilled in the art that the features recorded in the various embodiments and / or claims of the present disclosure can be combined and / or combined in a variety of ways, even if such a combination or combination is not explicitly recorded in the present disclosure. In particular, without departing from the spirit and teaching of the present disclosure, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0138] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A load prediction method, include: Obtaining a performance prediction function of the server under test, wherein the performance prediction function is a function obtained by fitting using performance indicator data, and the performance indicator data includes data obtained by performing service tests on the server under test under different traffic conditions, wherein different traffic conditions refer to different numbers of service requests per unit time initiated by a client or a test end to the server under test; Obtaining a flow prediction function obtained by fitting online flow data of the service interface of the server under test; Predicting the traffic prediction value of the service interface of the tested server at a future target time by using the traffic prediction function; and The traffic prediction value is input into the performance prediction function to obtain the performance indicator prediction value of the tested server.
2. The load prediction method according to claim 1, in, The function of obtaining the performance prediction function of the server under test includes: Obtaining data obtained by performing each single service test on the server under test under different traffic conditions; Using the data obtained from the single service test to perform fitting, a single service performance prediction function is obtained; and The performance prediction function of the server under test is obtained according to the multiple single service performance prediction functions.
3. The load prediction method according to claim 2, in, The step of obtaining the performance prediction function of the server under test according to the plurality of single service performance prediction functions comprises: A plurality of the single service performance prediction functions are superimposed to obtain a performance prediction function of the tested server.
4. The load prediction method according to claim 2, in, The obtaining of data obtained by performing each single service test on the tested server under different traffic conditions includes: In a single service state, the service interface of the tested server is tested under different traffic conditions; Obtaining actual measured values of multiple performance indicators of the tested server under different traffic conditions; The fitting using the data obtained from the single service test to obtain a single service performance prediction function includes: The measured values of multiple performance indicators of the tested server under different traffic conditions are used for fitting to obtain a single service performance prediction function.
5. The load prediction method according to claim 4, in, In a single service state, performing different traffic condition tests on the service interface of the tested server includes: The service interface of the tested server is tested under different flow conditions by using a pressurization method selected from the group consisting of instantaneous pressurization, gradual pressurization, and gradient pressurization.
6. The load prediction method according to claim 1, in, The acquiring of a flow prediction function obtained by fitting the online flow data of the service interface of the server under test comprises: Online real-time sampling obtains multiple online flow measurement values of the service interface flow of the tested server corresponding to each time node in multiple time nodes; and The multiple time nodes and the multiple online flow measurement values are fitted to obtain the flow prediction function.
7. The load prediction method according to claim 6, in: The fitting method is the linear regression fitting of the least square method.
8. A load prediction device, include: A first acquisition module is used to acquire a performance prediction function of the server under test, wherein the performance prediction function is a function obtained by fitting using performance indicator data, and the performance indicator data includes data obtained by performing service tests on the server under test under different traffic conditions, wherein different traffic conditions refer to different numbers of service requests per unit time initiated by a client or a test end to the server under test; A second acquisition module is used to acquire a flow prediction function obtained by fitting the online flow data of the service interface of the server under test; A prediction module, used to predict the traffic prediction value of the service interface of the tested server at a future target time through the traffic prediction function; The third acquisition module is used to input the traffic prediction value into the performance prediction function to obtain the performance indicator prediction value of the server under test.
9. An electronic device, include: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement the method according to any one of claims 1 to 7.
11. A computer program product, comprising computer executable instructions, which are used to implement the method of any one of claims 1 to 7 when executed.
Citation Information
Patent Citations
Method for calculating improvement strategies of performance of energy consumption systems, and energy consumption system monitoring device
CN108876078A
A cloud platform resource utilization prediction method and terminal equipment
CN109714395A