The present invention relates to a method for analyzing change impact on software components. More particularly, the present invention relates to a prediction-based method for analyzing change impact on software components.
When a software system including a number of software components is deployed over a computing equipment, such as server cluster, to meet requirements of a workload, changes of the software system are commonly used to improve the performance of the software system. Typical scenarios of the changes are upgrades of software or adjustments of component configuration parameters. Even a change is applied to one of the software components, some change impacts might inevitably happen and cause a ripple effect of performance and/or resource usage to other software components in the same application. For DevOps team of the software system, a key concern is to understand the change impact when the change is introduced to the software system.
While metrics in a software application system, such as memory utilization, CPU utilization, I/O throughput, response time, request per second, latency etc., could be monitored, the real “change impact” is difficult to measure as there is no guarantee that the workload, before and after the change, is about the same for the comparison, due to the dynamic and variant nature of the workload.
A traditional approach to analyze the change impacts on software components is illustrated in
In order to provide a precise way to evaluate the change impact to save operating costs, an innovative method is disclosed.
This paragraph extracts and compiles some features of the present invention; other features will be disclosed in the follow-up paragraphs. It is intended to cover various modifications and similar arrangements included within the spirit and scope of the appended claims.
According to an aspect of the present invention, a prediction-based method for analyzing change impact on software components comprises the steps of: a) providing a software system comprising a main software component for fulfilling requests from a workload and at least one auxiliary software component dealing with a specific job for the main software component, deployed over a computing hardware environment; b) collecting metrics associated with the workload and each auxiliary software component separately and sequentially before a change of the software system is introduced; c) calculating correlation coefficients between the collected metrics associated with the workload and that associated with each auxiliary software component; d) if an absolute value of the correlation coefficient is greater than a threshold value, building a prediction model from the collected metrics associated with the workload and the collected metrics associated with the corresponding auxiliary software component for predicting the metrics of the corresponding auxiliary software component in a period of time in the future; e) recording metrics associated with the corresponding auxiliary software component and the workload sequentially during an evaluating time beginning when the change of the software system was introduced; f) inputting the collected metrics associated with the workload and the corresponding auxiliary software component collected in step b) to the prediction model to obtain predicted metrics of the corresponding auxiliary software component; and g) calculating a performance difference value by using the recorded metrics associated with the corresponding auxiliary software component and the predicted metrics of the corresponding auxiliary software component.
According to another aspect of the present invention, a prediction-based method for analyzing change impact on software components comprises the steps of: a) providing a software system comprising a main software component for fulfilling requests from a workload and at least one auxiliary software component dealing with a specific job for the main software component, deployed over a computing hardware environment; b) collecting metrics associated with the workload and each auxiliary software component separately and sequentially before a change of the software system is introduced; c) calculating correlation coefficients between the collected metrics associated with the workload and that associated with each auxiliary software component; d) if an absolute value of the correlation coefficient is smaller than a threshold value, building a prediction model from the collected metrics associated with the corresponding auxiliary software component for predicting the metrics of the corresponding auxiliary software component in a period of time in the future; e) recording metrics associated with the corresponding auxiliary software component sequentially during an evaluating time beginning when the change of the software system was introduced; f) inputting the collected metrics associated with the corresponding auxiliary software component collected in step S02 to the prediction model to obtain predicted metrics of the corresponding auxiliary software component; and g) calculating a performance difference value by using the recorded metrics associated with the corresponding auxiliary software component and the predicted metrics of the corresponding auxiliary software component.
Preferably, the change of the software system may be an upgrade of the software system, an adjustment of application configuration parameters of the software system, installing a new auxiliary software component, or deleting a current auxiliary software component.
Preferably, the computing hardware environment may be a workstation host or a server cluster.
Preferably, the metric may be amount of used memory, amount of used CPU, I/O throughput, response time, request per second, or latency.
Preferably, the performance difference value may be mean percentage error.
Preferably, the collected metrics for building the prediction model may be of two categories.
Preferably, the prediction model may be built by a timeseries forecasting algorithm.
Preferably, timeseries forecasting algorithm may be ARIMA (Auto Regressive Integrated Moving Average) or SARIMA (Seasonal Auto Regressive Integrated Moving Average).
According to the present invention, the correlation between the metrics of the workload and that of each software component is taken into consideration. The prediction model can be built for predicting certain kind of metric for one software component in the future. Comparing the predicted metrics with real collected metrics, the change impact of said software component can be evaluated. The results can be used for further changes as well as saving operating costs.
The present invention will now be described more specifically with reference to the following embodiments.
Please refer to
In
A metric collector B is also installed in the computing hardware environment. It may be an independent data monitoring software to collect metrics associated with the software components from each of them. It should be emphasized that the metric collector B can collect metrics associated with the workload since they are identical to the metrics of the main software component A.
Please refer to
A second step of the prediction-based method is collecting metrics associated with the workload and each software component separately and sequentially before a change of the software system is introduced (S02). As mentioned above, latency associated with the workload and the amount of used CPU occupied by the auxiliary software components are used for illustration. This is to use the performance relationship between two different metrics to predict the future performance of one of them. In other embodiments, performance of only one metric is enough to predict itself in the future. An example is shown in
A third step of the prediction-based method is calculating correlation coefficients between the collected metrics associated with the workload and that by each auxiliary software component (S03). Correlation coefficient is a numerical measure of some type of correlation between two groups of variables. According to its calculation formula, Correlation coefficient varies between −1 and 1. Taking the data on item description No. 1 and No. 2 from T1 to T5 for calculation, the correlation coefficient is 0.81. Similarly, taking the data on item description No. 1 and No. 3 from T1 to T5 for calculation, the correlation coefficient is −0.18. Taking the data on item description No. 1 and No. 4 from T1 to T5 for calculation, the correlation coefficient is 0.96.
Based on the result of the step S03, the prediction-based method has different following steps. If an absolute value of the correlation coefficient is greater than a threshold value, a fourth step is building a prediction model from the collected metrics associated with the workload and the collected metrics associated with the corresponding auxiliary software component for predicting the metrics of the corresponding auxiliary software component in a period of time in the future (S04). Here, the threshold value restricts the relationship of the trends in the use of hardware resources or performance between the workload and each auxiliary software component. In this example, the threshold value is set as 0.7. It means the trends should be very close in the same direction or in the reverse direction, indicating there is a strong correlation between the collected metrics associated with the workload and the collected metrics associated with the corresponding auxiliary software component. In other embodiments, the threshold value can be any number between 0 and 1. It is not limited by the present invention. From
Then, based on the result of the step S04, a fifth step of the prediction-based method is recording metrics associated with the corresponding auxiliary software component and the workload sequentially during an evaluating time beginning when the change of the software system was introduced (S05). As described above, two auxiliary software components, the first auxiliary software component 1 and the third auxiliary software component 3, are so-called corresponding auxiliary software components in step S05. Therefore, the metrics associated thereto are recorded by the metric collector B. The verb “record” used here represent the same thing as the verb “collect” used in the step S02. They all describe that the metric collector B gets data from the software components. Different verbs are used to describe metrics separately in different steps. In this embodiment, the evaluating time starts from T6 and end at T10. The recorded metrics associated with the workload from T6 to T10 are 1, 3, 7, 2, and 1. There are 5 metric data associated with the first auxiliary software component 1 or the third auxiliary software component 3 recorded by the metric collector B. They are 2, 3, 4, 1, and 2 for the first auxiliary software component 1, and 1, 1, 3, 1, and 1 for the third auxiliary software component 3.
A sixth step of the prediction-based method is inputting the collected metrics associated with the workload and the corresponding auxiliary software component collected in step S02 to the prediction model to obtain predicted metrics of the corresponding auxiliary software component (S06). In
A last step of the prediction-based method is calculating a performance difference value by using the recorded metrics associated with the corresponding auxiliary software component and the predicted metrics of the corresponding auxiliary software component (S07). The performance difference value is used to describe the trend and approximate magnitude of the difference between predicted values and observed values. There are many methods to generate the performance difference value. In this embodiment, Mean Percentage Error (MPE) is used. MPE is the computed average of percentage errors by which prediction of a model differ from actual values of the quantity being predicted. The formula of MPE's is
where yi refers to all observed data, xi is predicted value corresponding to yi, and k is the number of different times for which the variable is estimated. In this embodiment, yi are the numbers at item description No. 8 or No. 10, from T6 to T10. Therefore, k is 5 for 5 sets of number are recorded. xi are numbers at item description No. 11 or No. 13, from T6 to T10. Calculating with relevant data above, the MPE for the recorded metrics associated with the first auxiliary software component 1 and the predicted metrics of the first auxiliary software component 1 is 50.00% while the MPE for the recorded metrics associated with the third auxiliary software component 3 and the predicted metrics of the third auxiliary software component 3 is −30.00%.
Please refer to
Under the condition that the absolute value of the correlation coefficient is smaller than the threshold value, the present invention has an alternative way to analyze change impact on software components. Please refer to
If an absolute value of the correlation coefficient is smaller than a threshold value, an alternative fourth step is building a prediction model from the collected metrics associated with the corresponding auxiliary software component for predicting the metrics of the corresponding auxiliary software component in a period of time in the future (S04′). Here, the threshold value keeps the same as 0.7. The absolute value of the correlation coefficient smaller than 0.7 also indicates there is a week correlation or no correlation between the collected metrics associated with the workload and the collected metrics associated with the corresponding auxiliary software component. From
Then, based on the result of the step S04′, an alternative fifth step of the prediction-based method is recording metrics associated with the corresponding auxiliary software component sequentially during an evaluating time beginning when the change of the software system was introduced (S05′). Here, the second auxiliary software component 2 is so-called corresponding software components in step S05′. Therefore, the metrics associated with the second auxiliary software component 2 are recorded by the metric collector B. The recorded metrics associated with the second auxiliary software component 2 from T6 to T10 are 3, 2, 3, 2, and 3.
An alternative sixth step of the prediction-based method is inputting the collected metrics associated with the corresponding auxiliary software component in step S02 to the prediction model to obtain predicted metrics of the corresponding auxiliary software component (S06′). In
A last alternative step of the prediction-based method is calculating a performance difference value by using the recorded metrics associated with the corresponding auxiliary software component and the predicted metrics of the corresponding auxiliary software component (S07′). Step S07 is exactly the same as step SOT but different in the way the calculated data are generated. MPE is still used as the performance difference value. According to the formula, yi are the numbers at item description No. 9, from T6 to T10. k is 5. xi are numbers at item description No. 12 from T6 to T10. Calculating with relevant data above, the MPE for the recorded metrics associated with the second auxiliary software component 2 and the predicted metrics of the second auxiliary software component 2 is 90.00%.
Please refer to
In the embodiment, the time point comes one by one continuously. In practice, there can be an interrupt between T5 and T6. Namely, data for building a prediction model can be collected much earlier than the change is introduced. In addition, since workload pattern is most likely based on time of the day, or day of the week, it will be beneficial to build the prediction models in similar time of the day (or day of the week) for the software system for each analysis. The collected/recorded metrics may be obtained at other times.
The change impact analysis has below advantages. First, impacted software component by the change can be identified as well as its affected value. For DevOps team, they want to know, after rolling out a new software change of one or more software component, the performance of the software system is gain or loss. Engineering team can confirm if the result is expected or if anything out of ordinary. This is a feedback to the engineering team. Secondly, it is easy to evaluate if some system parameter should be adjusted for such change. For example, the configuration settings of a database/backend service may add a new cluster node, several CPU or memory modules to the computing hardware environment. Operation team can also analyze with quantified results that help them evaluate the change they made has or has not achieved their expectations. If the performance impact is too much, a possible action could be rolling back the change made.
While the invention has been described in terms of what is presently considered to be the most practical and preferred embodiments, it is to be understood that the invention needs not be limited to the disclosed embodiments. On the contrary, it is intended to cover various modifications and similar arrangements included within the spirit and scope of the appended claims, which are to be accorded with the broadest interpretation so as to encompass all such modifications and similar structures.