A Study and Analysis of Forecasts in Resource Allocation Using ARIMA in Cloud Environment

Cloud computing refers to the delivering or usage of hosted services over internet rather than a traditional data center. Hosted services can be renting infrastructure/resources on demand or using the cloud as a platform to develop applications or using the cloud to host software that are accessed by clients. The bottom line is to obtain affordable resources from a provider and pay as you go in a flexible manner. In doing so, not all resources need to be obtained upfront. The initial capacity can be rented out and the remaining can be scaled as per the need. To handle such scalability, auto-scaling systems helps tackling the need to maintain the finite set of resources that can serve the current need and on the other hand also reduce the resources when the current need decreases. Very often in a cloud based environment it makes sense to adapt proactive strategies to scale the resources than to react after the surge had occurred. The proactive strategies use a quantified metric as a input to provision resources on demand that could meet the future expectations. This metric is obtained by carefully analysing the historical data of the application and in turn can influence the scaling decisions. Conclusions are drawn about the accuracy of the metric based on different timelines of historical information along with the confidence levels with which the prediction is done.


Introduction
Cloud computing has facilitated a smoother transition from a traditional data center to a virtualized pool of resource that are dispersed geographically yet aggregated as one unified resource. The pool of resources can be hired from a cloud provider using a pricing scheme. The resources in use can be up scaled or downscaled based on the requirement. This is where the scaling strategies play a effective role. The behaviour of a scaling strategy can be reactive or proactive in nature. Proactive strategies tend to use a quantified metric to scale resources before the surge occurred where as reactive strategies tend to use the excessive required demand after the surge has occurred. The current work is more focussed on analysing the predictions from the historical data over varied timelines with different confidence level. This analysis helps making better decisions on which prediction can serve as the quantified metric for the scaling system in a cloud computing environment.

Literature Survey
The literature specific to the study discusses the various auto scaling systems influenced by decisions coming from various models or techniques. Authors of [Chenhao Qu et al.2016] propose a fault tolerant model for hosting web application using spot instances. The scaling system is reactive in nature which uses fault tolerant semantics. The system optimizes the response time of requests and the cost associated with the instances. [Roy N et al.2011] deduce a time interval to change the resources using the prediction. The scaling system is proactive in nature which considers the cost factors which influence the behaviour of the system to scale up or down. [Anshul Gandhi et al.2014] uses a modelling engine which helps to categorize workload in order to assess the options to scale. The predictor component outputs a medium term prediction within a monitoring window. Authors conclude that the combination of both scale up and scale out serves the optimal scaling policy.

Existing System
The system uses the Wikipedia traces obtained from the Wikimedia foundation. The request traces as well as the project wise count is open to access. Using this data as the historical information for the Wikipedia application, ARIMA model is fit to it and prediction is obtained. The prediction is obtained as two types, they are, one time forecast and cyclic forecast. One time forecasts are obtained at one shot after training the model whereas the cyclic forecasts take into account the actual value at the end of each hour and consider the same for the next round of prediction. The existing system focus on analyzing the impact of one time forecast in comparison with the cyclic forecasts take along the 80% confidence level. The inference is that the cyclic forecasts serve as a better alternative when dealing with systems that require forecasts at regular intervals. The entire process of procuring the historical information, fitting the model and forecasting the next hour prediction are done entirely by statistical engine.  The proposed system uses the functionality of the afore mentioned statistical engine to obtain the forecasts along with different confidence levels viz 75,80,85 and 90%. The historical data for training the ARIMA model is not available readily for use. Hence as a pre-requisite the raw data from the Wikimedia foundation is obtained and it is analyzed to obtain the number of requests for the English Wikipedia resources. The training data for the model spans across 3 weeks of January 2011 from 01 to 21 used for the short term forecasts, 6 weeks of data between January 01 2011 to February 11 2011 used for medium term forecasts and at last 10 weeks of data between January 01 2011 to Mar 11 2011 used for long term forecasts. The test data is the actual values for the number of requests observed in the next consecutive 9 hours for the data used for short, medium and long term respectively. The values chosen for analysis are the point forecast as well as the lower level of the 75% confidence level. For short term this is mentioned in Table 1. For medium term this is mentioned in Table 2 and for the long term this is mentioned in the Table 3. The request count with the training data period is transformed to a time series. Once the historical data is available for use with the statistical engine then the system uses it for forecast. For the purpose of this study forecasts are outlined as short term, medium term and long term forecasts. Each forecasts is obtained across 4 difference confidence level in addition to the point forecast. The confidence level used are 75,80,85 and 90% respectively. Mean Absolute Percentage Error (MAPE) is used to measure the prediction accuracy of forecast. Its wide usage in statistics helps deducing the accuracy of forecast. The accuracy is expressed as a difference between the actual value and the forecast value divided by the actual value again. This value is again summed up for each forecast point and divided by the number of fitted points on which the forecast was based on. The accuracy of the forecasts is shown in Table 4.

Results and Discussion
Analysing the accuracy of the forecasts and the lower end of confidence levels with the actual values. For values along the lower end of the 75% confidence level the MAPE scores are lower with actual values than the MAPE scores for the predicted values. For clarity the mape scores for 80%, 85% and 90% are also analyzed and compared to the same. This observation is true across different timelines, be it, short term or medium term or long term. Looking at the lower end of 75% confidence level values it is adapting towards the actual values of the workload requests. For short term and medium term, the predicted values are better adapting to the actual values followed by the lower 75% level, this is evident from Figure 1 and Figure 2. Whereas for the long term, the lower end of the confidence level 75% is far better than the predicted values which shows a more adapting trend towards the actual values as shown in Figure 3. Thus, when using forecasts with a substantial amount of historical data available to train the model, it is better to look closely the MAPE scores of lower end of 75% confidence level in comparing with predicted values from the model.

Conclusion and Future Work
Auto scaling systems helps tackling the dynamic requirements during resource utilization. These systems when equipped with proactive behaviour tend to analyse historical information for a particular application in order to draw insights out of a prediction model. The usage of prediction can directly affect the scaling decision which signifies the need to fine tune it before usage. The analysis done here by forecasting across varied timelines along with different confidence levels helps establishing a clear cut idea about how forecasts behave when there are different trends in historical data and also how the confidence level plays a significant role in establishing the lower bounds of the forecast. The accuracy comparison here best aligns the appropriate confidence level that comes closer to the actual values which sometimes could serve as a better alternative than the predicted values. This finding can further be extended to tackle the scaling policies by associating it with the spot instances. Spot instances have been a low cost alternative and the dynamic changes in the spot market based on the demand supply have forced auto scaling systems to be smarter. This means the scaling system must consider varied factors like calculating optimal bid price, choosing amongst heterogeneous resources and placing request in the appropriate time. The future work is to tackle such factors associating the proactive scaling strategy with spot instances.