Anda di halaman 1dari 26

Student Declaration

This is to certify that the work described in this project report has been
actually carried out and implemented by our project team consisting of

Sr.
1.

Admission No.

Student Name

U12COO71

Vaibhav Parihar

2.

U13CO068

Himal Patel

3.

U13CO053

Deep Bhavsar

4.

U13CO090

Anil Kumar

Neither the source code there in, nor the content of the project report have
been copied or downloaded from any other source. We understand that our
result grades would be revoked if later it is found to be so.
Signature of the Students:

Sr.

Student Name

1.

Vaibhav Parihar

2.

Himal Patel

3.

Deep Bhavsar

4.

Anil Kumar

Signature of the
Student

Certificate
This is to certify that the project report entitled
Prediction

for

Virtual

Machine

in

Cloud

Load

Computing __is

prepared and presented by


Sr.

Admission No.

Student Name

1.

U12CO071

Vaibhav Parihar

2.

U13CO068

Himal Patel

3.

U13CO053

Deep Bhavsar

4.

U13CO090

Anil Kumar

Final Year of Computer Engineering and their work


is satisfactory.

SIGNATURE :

GUIDE

JURY

HEAD OF DEPT.

Abstract
Virtualization Technology is currently becoming increasingly
popular and valuable in cloud computing environments due to the
benefits of server consolidation, live migration and resource
isolation. Load prediction plays a key role in cost optimal resource
allocation and data center energy saving and is an important
aspect of virtualization technology. It aims at forecasting load for
a period of seconds or minutes and this is necessary to real-time
control, capacity planning in cloud computing. Based on the
future load prediction, an estimate of the future performance of
each Virtual machine decides the fraction of capacity to be
assigned to each Virtual Machine as well as the number of
requests effectively served for each class that ensure the service
quality and minimize cost. In this project, we aim to study and
compare various techniques of load prediction that various
authors have presented. We also intend to implement some of
algorithms that we find unique and efficient.
Key words : cloud computing, Virtual Machine, Load Prediction.

List of Acronyms
VM : Virtual Machine

Chapter 1
INTRODUCTION
Virtualization is a technique to run several operating system simultaneously on one
physical machine. The purpose of Virtualization is to share resources of the existing
system, utilization and distribution to their maximum potential, reducing space, power
and infrastructure costs in terms of physical resources, new network setups, system
setups, and infrastructure maintenance.
Virtualization allows a smaller number of high-powered servers to create a larger number
of less powered server while reducing the overall cost. It has become a core concept in
modern data centers.
The real advantage of virtualized server and hardware are that if one virtual machine is at
or near idle, others present in same physical machine can take advantage of its resources
to perform their processing. The way a virtualized server function is that it introduces an
abstraction layer between the hardware and the operating system. This abstraction layer is
called hypervisor (or Virtual Machine Monitor).
Characteristics of virtual machine:
1.
2.
3.
4.

Isolation
Portability
Cost Efficient
Fault Tolerance
1.1Application
The increase in popularity of cloud computing in recent years is driven by the
dynamically scalable, pay as you go model. This enables organization to focus on
providing services to their customers while consuming the requisite computing
resources as a utility. But it is necessary to reduce the risk of over provisioning,
wasting resources during non-peak hours and reduce the risk of under
provisioning, missing potential customers prediction is necessary.
Load Prediction in cloud computing involves predicting the future load depending
upon the previous load. For load prediction various methods are used. Among them
few are mention here:

1. Adaptive Load Balancing Algorithm


2. Support Vector Regression and Kalmans Smoother
3. Fast Up Slow Down
4. Polynomial Fitting
1.2Motivation
With the rapid development of cloud computing, wide variety of web applications
in network are moving to the cloud platform, which makes high performance load
prediction became important.
1.3Objective
In cloud computing environment, customers are allowed to scale up and down
their resources usage according to their needs. Here resources are multiplexed
from physical machines to virtual machine through virtualization technology. We
are trying to avoid overloading for every physical machine of an automated
resources management system that uses virtualization technology for allocation
resources dynamically using load prediction algorithms.

Chapter 2
LITERATURE SURVEY

2.1 Adaptive Load Balancing Algorithm(ALBA)


In order to improve the elasticity and adaptive adjustment of cloud computing, an
adaptive load balancing algorithm based on load prediction model was proposed to
improve the resource utilization.
The main idea of ALBA is to control the number of virtual machine in the cluster
and balance the workload among the virtual machines.
The proposed ALBA contains two parts :- Cluster shrink algorithm
- Cluster expansion algorithm
2.1.1 Cluster Shrink Algorithm
When the workload in the cluster of the virtual machine is lower than the minimal
threshold, the cluster shrink algorithm is executed to reclaim the extra computation
resources.When the cluster shrink algorithm is being executed, the virtual machine
can not be closed directly.
The virtual machine just drop out of the cluster and enters into cache pool. The
status of the virtualmachine is restore. After the restore, virtual machine
executed all task in that virtual machine,the status of virtual machine changes into
standby. If no task is executed in the standby, virtual machine for a certain
time, the system will close that virtual machine to reduce the consumption.
2.1.2 Cluster Expansion Algorithm
While the workload in the cluster is higher than the maximum threshold, the
cluster expansion algorithm is running to increase more virtual machine to improve
the response time of task execution.

The main idea of cluster expansion algorithm is to randomly select one virtual
machine to join in the cluster based on the cluster predicated load Z`.
2.2 Fast Up Slow Down (FUSD) Algorithm
In FUSD algorithm the future resources needs of Virtual Machines are predicted
based on previous statistics. The prediction is done using the following equation:
E (t) = E (t-1) + (1-) O (t), 0 1
Where E(t) and O(t) are the estimated and observed load at time t, respectively. is
a constant reflecting a tradeoff between stability and responsiveness.
But this formula does not reflect the acceleration of resource demands.
Unfortunately, when is between 0 and 1, the predicted value is always between
the historic and observed value. To reflect the acceleration they set to a negative
value. The above formula is transformed as follow for
-1 0
E(t) = -||*E(t-1) + (1+||)*O(t) .
Though FUSD approach was developed to predict the rising trends of resources, it
is not efficient as it predicts the value which is mostly lesser than the observed one
which may result in overload. Hence in this paper a new algorithm is proposed for
effective load prediction, which is named as Enhanced Exponentially Weighted
Moving Average (EEWMA). Thus the EEWMA is as follows:
E (t) = * {(O (t-1) + O (t))/2} + (1-)*O (t), = 0.7
For the decreasing resource needs and for the rising needs of the resources:
E (t) = -* O (t-1) + (1-)*O (t), = -0.2
Here = 0.7 for decreasing need of resources and =-0.2 for increasing need of
resources.

2.3 Polynomial Fitting


This prediction strategy is kind of tendency based method. There are total two
strategy of prediction is used.
(1). Prediction based on Polynomial Fitting
(2). Prediction based on similar patterns

Poynomial fitting is a method to predict the increment or decrement for next step
based on multi-order polynomial fitting. prediction of future system performance
can be used to improve resource selection and scheduling in a dynamic grid
environment. The experimental result on a commonly used host load management
dataset show that this proposed strategy consistent outer forms the previous
tendency based predictor. In this method, it is proposed to predict strategy which
conducts the prediction based on the increase or decrease tendency in several past
step and on previous similar patterns using a polynomial fitting method.

2.4 Support vector and kalman smoother


A multi-step-ahead CPU load prediction method based on Support Vector
Regression which is suitable for Cloud computing environment. Kalman
smoothing technology is integrated to further reduce the prediction error. Real
trace data were used to verify the prediction accuracy and stability of this method.
The focus of this work is on improving the CPU utilization by load prediction.
KSSVR integrates SVR algorithm and Kalman smoothing technology.
Furthermore, KSSVR is very stable, i.e. its prediction error increases quite slowly
as the predicted steps increase.
2.4.1 Support Vector Machine
SVM was used for many machine learning tasks such as pattern recognition, object
classification and regression analysis. It is based on the structural risk minimization
principle which tries to control the model complexity as well as the upper bound of
generalization risk. The principle is based on the fact that the generalization +-error
is bounded by the sum of the empirical error and a confidence interval term that
depends on the Vapnik Chervonenkis (VC) dimension. On the contrary, traditional
regression techniques, including traditional Artificial Neural Networks (ANN) , are
based on empirical risk minimization principle, which tries to minimize the training
error only. Its learning process is quite complex and inefficient for modeling, and
the choices of model structures and parameters are lack of strict theory. So, it may
suffer from over-fitting or under-fitting with ill chosen parameters. In contrast,
SVM has strict theory and mathematical foundation which could not lead to local
optimization and dimensional disaster. It can achieve higher generalization
performance especially for small samples set. It has a limited number of parameters
to choose for modeling, and there exist fast and memory-efficient algorithms.
2.4.2 Kalman Smoother

The Kalman filter has been widely used in the area of autonomous or assisted
navigation. It is Kalman smoother is suitable for the Cloud applications load
estimation because it was originally developed to estimate time-varying states in
dynamic systems. This approach essentially uses a filtering technique to eliminate
the noise of resources usage signal coming from error of measurement technique
while still discovering its real main fluctuations. In order to achieve a better QoS and
higher resource utilization in Cloud.

Chapter 3
Implementation of Algorithms

3.1.1 Load Model


In this paper, adaptive load balancing algorithm, ALBA, obtains the workloads of a
cluster based on the workloads of every node statistically. Through the analysis on
the workloads of the cluster, it can determine the system status, such as low,
normal or high, in order to apply different algorithm to deal with different
scenarios for scalability.
Node Load: To represent the load status of a node, the load of node i at the time t is
denoted as Lit .

Existing research mainly focus on the measurement of workload of a single node


for the load balancing. A cluster workload is used to measure the workloads of the
whole cluster as a parameter for improving the clusters scalability. To simplify the
measurement in the application, the average workload of every node is used as the
clusters workload in the paper.
Cluster Load: To calculate the loads of the cluster based on the average load of
each node, the cluster load is denoted as Lt at the time t .

The prediction load Pt at the time t can be obtained with the load prediction
algorithm. The cluster load Lt at the time t can be computed with the virtual status
table. The cluster load at the time t+1 is computed with P t and Lt using the load
prediction algorithm.
Cluster Predicted Load : To provide the more accurate workload, the cluster
Predicted workload is used and denoted as Zt

The predicted load at the time t+1 is computed with Pt and Lt using the load
prediction algorithm.

3.1.2 Adaptive Load Balance Scheme


An adaptive load balancing algorithm for the Elastic Cloud, ALBA, is proposed. Its
main idea is to control the number of virtual machines in the cluster and balance
the workload among the virtual machines. The proposed ALBA algorithm contains
two parts: cluster expansion algorithm and cluster shrink algorithm.
The load balancer computes the cluster predicted load Zt at the time t and compares
Zt with the upper threshold high and lower threshold low.
3.1.2.1 Cluster Expansion algorithm
If Zt is greater than the upper threshold high, it needs to increase more computation
resources and reduce the workload in the cluster to better deal with the incoming
tasks. Under that situation, the cluster expansion algorithm should be active to add
extra virtual machines to the cluster.

The main idea of cluster expansion algorithm is to randomly select one virtual
machine to join in the cluster based on the cluster predicted load Zt , and recompute the cluster predicted load Zt when adding one virtual machine.

START

Yes

Call Cluster
Expansion
Algo

No
Call Cluster
Shrink Algo

Establish Cluster
Expantion Algo

Yes
No

Establish Cluster
Shrink Algo

Execute Plan

END

If the new the cluster predicted load Zt is within the upper and lower threshold,
there is no more virtual machine to join in the cluster. Thus, the expansion plan
will be submitted and executed. If the new the new the cluster predicted load Zt is
still greater the upper threshold high , it repeatedly execute the previous step to add
one virtual machine and recomputed the newer Zt until the newest Zt is within the
upper and lower threshold.

3.1.2.2 Cluster Shrink Algorithm


if Zt is smaller than the lower threshold low, the workload of the cluster is low and
the utilization ratio of resources is low. The cluster shrink algorithm can be
executed to select suitable virtual machine to drop out of the cluster.
When the cluster shrink algorithm is being executed, the virtual machine cannot be
closed directly. The virtual machine just drops out of the cluster and enters into the
cache pool. The status of the virtual machine is restore. After the restore
virtual machine executed all tasks in that virtual machine, the status of the virtual
machine changes into standby. If no task is executed in the standby virtual
machine for a certain time, the system will close that virtual machine to reduce the
consumption.
Firstly, the load balancer computes the cluster predicted load Zt at the time t and
compares Zt with the upper threshold high and lower threshold low . If Zt is
smaller than the lower threshold low , it needs to decrease more computation
resources and reduce the workload in the cluster to better deal with the incoming
tasks.
3.2 Fast Up Slow Down (FUSD)
Author introduced another algorithm for predicting the future resource demands of
VMs. This prediction is based on previous statistics like FUSD algorithm. Here the
predicting formula is slightly changed.
E(t) = m*A(t-1)
Where E(t) and A(t) are the estimated and actual load at time t, respectively. m is a
multiplier whose value is calculated from previous steps as follows:
m=

A (t1)
A ( t2 )

Though it is not possible to predict the actual future load of VM, this algorithm
predicts very closely. It also reflects both the acceleration and deceleration of
resource usage.

3.3 Polynomial Fitting

In scientific experiments,it is often necessary to disclose the relation


between the independent variable X and the dependent variable Y from a set of
experimentally observed data (xi, yi), I = 0, 1, . Such a relationship usually can
be approximately expressed by the function y = f(x).One method to produce
function F(x) is a Least Square Polynomial Fitting, which can be expressed as
follows:
Given a discrete sampling of N data points D1,D2, DN which have
coordinates
Di = (xi,yi)

(I = 1,2, ,N)

(1)

It is assumed that the value of y can be correlated to the value of x via an


approximately function F with the expression :
f(x) = AnXn + An-1Xn-1 + + A1X + A0

(2)

which corresponds to an nth order polynomial expression. The expression coefficient


Ai are determined by least-squares fitting the data points to this expression. The
resulting continuous function may then be used to estimate the value of y over the
entire x region where the approximation has been applied.
3.3.1 Prediction Based on polynomial fitting
This prediction strategy is a kind of tendency based method.to predict the increment
or decrement for next step is based on multi-order polynomial fitting. The normal
increase value for time T + 1 is:
NormalIncT+1 = IncValueT + (RealIncValueT IncValueT)*AdaptDegree

(3)

Here , IncValueT = Increment value used to predict PT , so we have


IncValueT = PT VT-1

(4)

RealValueT is real increment time T , which is,


RealIncValueT = VT VT-1

(5)

AdaptDegree ranges from 0 to 1 and is used to adjust the so called adaption degree,
i.e. the influence of the previous prediction error on determining NormalIncT + 1.When
It is equal to 1, the IncValueT+1 is equal to RealIncValueT, that is this method uses the
previous increment as the prediction increment value. It is obvious that such linear
fitting is not consistent with reality due to that use of multi-order polynomial fitting

function is needed to determine the order of polynomial function. i.e. the number of
data points to be used for the polynomial fitting.
3.4 Support Vector Regression and Kalman Smoother
When performing time series prediction by SVM, each input vector x i is defined
as a finite set of consecutive measurements of the series. The output vector y i
contains the x( n +1) observation, where n determines the amount of history data.
Each combination ( xi,yi ) constitutes a training point. There are such training
points used for fitting the SVR. SVM is a linear learning machine. The linear
function is formulated in the high dimensional feature space, with the form
f ( x ) = w ( x )+b ,

(1)

Figure2 :
Mapping data from input space to feature space

Where x is nonlinearly mapped from the input space to a higher dimension


feature space via mapping function ; see Figure 2. To simplify the mapping,
kernel function K (xi ,xj ) = ( (xi), (xj) ) is used.
The most widely used kernel functions are
Linear : K(xi,xj) = xiTxj
Polynomial : K(xi,xj) = (xiTxj + r )d

, 0

Radial basis function (RBF) : K(xi,xj) = exp(-||xi xj||2), 0


Sigmoid: K(xi,xj) = tanh(xiTxj + r).

The Kalman filter estimates the state x of a discrete-time controlled process which
is governed by the linear stochastic difference equation :
xk = Axk-1 + Buk-1 + wk-1 ,

(5)

With a measurement z that is


zk = Hxk + vk ,

(6)

where A is a transform matrix from time step k-1 to k .


uk-1 represents a known vector.
B is a control matrix
H is a matrix that represents the relation of zk and xk .
The random variables wk-1 ~ N(0,Qk-1) and vk ~ N(0,Rk) represents the process and
measurement noise , respectively .

Chapter 4
Simulation and Results
We have decided to implement the before mention algorithm at later stage. So, here
we are stating the results that authors produced without any machine dependent
details. We encourage the reader to verify the results from the source.
4.1 Adaptive Load Balancing Algorithm
The variation of the number of virtual machine in the cluster is smoother using the
workload prediction model with the slide windows. Moreover, the trend of variation
is consistent with that of variation of the number of tasks in the cluster. On the
contrary, the curve of the variation of the number of virtual machine without adopting
the workload prediction model shows the serious fluctuation. Because it will bring
extra resource consumption and time due to the frequent open and close virtual
machine, the proposed ALBA algorithm can achieve better performance in terms of
the average waiting time of tasks, and the average response time of tasks, compared
with the load balancing algorithm without the prediction model.
Figure : The variation of the number of virtual machines

4.2 Fast Up Slow Down (FUSD)


Any future Load prediction algorithm does not always give the actual result.
Sometimes it gives higher value than the actual result. It is treated as high error.
When the algorithm gives lower value than the actual, it will be treated as a low error.
There is no problem with high error. In case of low error, there is possibility that PM
may be overloaded in next time interval but we do not take any action to avoid it due
to low prediction of the algorithm. So better algorithm must decrease the probability
of occurrence the low error. In this sense the proposed algorithm is better than the
existing one.
Proposed algorithm for prediction of CPU utilization on the DNS server. Predicting
CPU load in every minute be measuring the actual loads of previous two minutes.

4.3 Polynomial Fitting


we evaluated one-step-ahead time series prediction strategy on CPU load
time series collected from four heterogeneous machines. These four machines
demonstrate different CPU statistical properties, as illustrated in Figure 2. There are
two groups of machines. The first is in an Alpha cluster. Of this group, the machine
axp0 is an interactive machine, while axp7 is a batch machine. The machines in the
second group are a compute server (sahara) and a desktop workstation (themis).
(1).

axp0.psc.edu is a heavily loaded, highly variable interactive machine with


mean CPU load 1 and stand deviation 0.54. The total number of data in this
time series is 1,296,000 (for 75 days).

(2).

axp7.psc.edu is a more lightly loaded batch machine which has interesting


epochal behavior. The average of the CPU load is only 0.12 and its stand
deviation is 0.14. The total number of data in this time series is 1,123,200
(for 65 days).

(3).

sahara.cmcl.cs.cmu.edu is a moderately loaded (mean load 0.22), big


memory compute server. The stand deviation of the CPU load is 0.33. The
total number of data in this time series is 345,600 (for 20 days).

(4).

themis.nectar.cs.cmu.edu is a moderately loaded (mean load 0.49) desktop


machine. The load on this machine has high standard deviation of 0.5. The
total number of data in this time series is 345,600 (for 20 days).

4.4 Support Vector Regression


Before the training process begins, data normalization is performed by linear
transformation as

Where xin and xi represent the normalized and original measured data respectively
and xmin and xmax represent the minimum and maximum value among the original
measured data, respectively.
The evaluation of prediction performance is based on the mean absolute error
(MAE) which is widely used error metric for evaluating results of time-series
forecasting as shown in

Where ^x i and xi represent the predicted and original data, respectively and n is
the number of predicted data points.
The detailed experimental results are shown in figure 7. Because the total number
of samples is limited, performance trend feature of Googles two traces fluctuate
slightly. But we can still reach this conclusion: KSwSVR has the best prediction
accuracy, followed successively by standard SVR and AR and BPNN.

Conclusion
Cloud Computing is designed in such a way, so as to provide various services to
external users. But without knowing about the future needs of the clients it is
tedious to provide the resources to them. Hence using the prediction algorithm is
better option to make this process simple.
In this phase we studied different methods and algorithm for load prediction. In
upcoming time we are going to implement some of them and analyze the
prediction accuracy.

Acknowledgement
We take this opportunity to express our deep sense of gratitude and indebtedness to
our Project Guide, Mr. Bhavesh N. Gohil, Assistant Professor in Computer
Engineering Department, SVNIT,Surat for his valuable guidance, useful comments
and co-operation with kind and encouraging attitude at every point of our project
work.
We would also like to thank our Head of Department, Prof. D.R. Patel Computer
Engineering Department.
We are also thankful to SVNIT, Surat and its staff for providing this opportunity
which helped us in gaining sufficient knowledge and to make this Project Report.

References
1.

Anda mungkin juga menyukai