An Energy Efficient VM Placement Technique for Cloud Datacenters

Page 1

GRD Journals | Global Research and Development Journal for Engineering | International Conference on Innovations in Engineering and Technology (ICIET) - 2016 | July 2016

e-ISSN: 2455-5703

An Energy Efficient VM Placement Technique for Cloud Datacenters 1Deepa.

R 2R. Kanniga Devi 1 Student 2Assistant Professor 1,2 Department of computer science and Engineering 1,2 Kalasalingam University, Krishnankovil Abstract The use of cloud computing technology has been an important aspect in many applications in recent time. The cloud provides scalable and on-demand services to the customers and keeps the customer information and data secure. The overall performance of the cloud depends on the reliability, availability and standard of the resources. Even though the cloud provides many usefulness it faces many issues and challenges that needs to be handled. One such challenge is the efficient resource allocation to minimize the overall energy consumption. In this paper an efficient VM placement and allocation strategy is proposed for cloud datacenters to reduce the cost incurred for using the resources within the cloud datacenters. The proposed technique is implemented in the CloudSim toolkit where a simulation is done using sample cloud datacenters. The experimented results are noted down. Keyword- Distributed Generation, Distribution System, Voltage Stability, Particle Swarm Optimization __________________________________________________________________________________________________

I. INTRODUCTION Cloud Computing is a distributed environment over a large network that provides computation of larger problems using many computers [1]. Cloud computing offers a wide variety of on-demand services over a local or global network to enterprises and customers connected to the cloud. All the resources in cloud such as the application software, storage, computing machines, servers, etc. can be accessed. The cloud providers of these resources only need to manage them and the customers are free to just use them for their purpose.

Fig. 1: Overall framework of cloud environment

The concept of Cloud Computing is mainly based on two features. They are Virtualization and Service Oriented Architecture (SOA). The SOA is the concept of providing services to the customers [2]. They can access the services available and make use of them. Virtualization is used to create a virtually computing environment by gathering all the resources required in a single virtual environment. These two concepts provided the base for the development of Cloud Computing environment. The basic framework of a cloud network is shown below in Fig. 1.

All rights reserved by www.grdjournals.com

198


An Energy Efficient VM Placement Technique for Cloud Datacenters (GRDJE / CONFERENCE / ICIET - 2016 / 032)

The cloud computing model can be classified into public cloud, private cloud, community cloud and hybrid cloud based on the cloud owner and characteristics of the environment. Each of these cloud focus in providing customer services that can be classified into three such as (1) Software as a Service, (2) Platform as a Service and (3) Infrastructure as a Service [3]. Applicable in wide range of areas, the cloud computing provides an important technological scope but still faces certain issues and challenges. The major and the most challenging issue in cloud is the security of the cloud network. An attacker will keep on trying to break the security model with new strategies and the security should be kept in check and kept updated. Many security policies have been followed to conserve the privacy of customer data and information. The next issue is the management and provisioning of the various resources in the cloud network. This proves the overall reliability and availability of the cloud. Resources should be made available 24/7 to the cloud users and they should be efficient and reliable in task execution. This is managed by using specific algorithms such as task scheduling strategies. Another issue is the use of fault tolerance algorithms to prevent and handle the occurrence of various types of fault within the system. Faults can be handled in many ways such as fault tolerance. Fault isolation, fault detection and prevention. Fault can occur in any place such as the server fault, hardware fault, system faults, etc. Some of the other important issues [4] that needs to be handled are the service cost, maintaining the legal issues, management of policies, and other certifications, poor standards, performance degradation, network complexity, etc. each of these issues should be handled effectively using various strategies to provide good performance. The allocation of resources to the user tasks effectively plays an important role in performance. The user tasks are executed within the Virtual machines (VM) of the cloud datacenters. A certain amount of resources like RAM, CPU instructions, bandwidth and storage are required by the VM to run that in a given host. The VMs should be placed in such a way that they consume less energy and the resource utilization is also high. Migrations of VMs provide unnecessary wastage cost, time and energy. But if a VM is not allocated properly to a host then it could consume much more energy over its lifetime and so placement of VM is a critical challenge in cloud datacenter. Here dynamic reallocation and placement of VMs can be done periodically to relocate VMs to other hosts or datacenters to minimize the energy consumption. That is, the datacenters and hosts that consume large amounts of energy are taken and the VMs here are reallocated to other hosts that consume lesser energy or incur less cost. In the same way if we keep all the resources within a single datacenter then it will be overloaded and could lead to deadlock or performance degradation. So while reallocating the VMs certain criteria should be satisfied such as necessary RAM, storage, bandwidth, etc. The dynamic reallocation of VMs consists of verification of possibility to reallocate all VMs from a given datacenter to another datacenter. Then the cost of migration and the cost incurred within the datacenter are calculated and based on this the reallocation is done. In this paper, an energy efficient dynamic VM placement strategy is proposed that aims to reduce the overall energy consumption and cost incurred within the datacenters by dynamically reallocating the VMs to other hosts in other datacenters that consume less energy. The proposed method takes into consideration the various CPU parameters and utilization cost for calculating the energy consumption and the reallocation decision is made based on this. The CloudSim environment is used for simulation of the proposed technique and the results are recorded. The remainder of this paper is organized as follows: Section 2 talks about the various existing and related works in VM placement and allocation, Section 3 shows the basics on CloudSim, Section 4 shows the full algorithm of proposed method, Section 5 shows the implementation of the proposed method in CloudSim and the results and finally Section 6 talks about the overall conclusion of the paper.

II. RELATED WORKS The cost and efficient of the datacentres decide the overall performance of the cloud network. Many researches have been done in this area to reduce the overall cost incurred in the datacentres for better performance in the cloud. To provide high quality services to the customers at low cost, the energy and cost of the machines and resources should be reduced and for this purpose the VM placement should be made efficient. Some of the existing and related works based on this have been discussed below. Borgetto et al. [5] investigates the various VM allocation and reallocation strategies within the cloud datacentres to save energy consumption by still preserving the services provided to the customers. The number of hosts or machine used should be limited to reduce energy consumption and also the number of VM migrations should be kept less. They proposed a method to consolidate the VMs to handle the reallocation and host management process. This approach was implemented in the Open Nebula platform [6]. Kord et al. [7] proposed an energy-efficient technique for VM placement in the cloud datacentres using the Minimum Correlation Coefficient (MCC). The proposed approach considers both the energy consumption and the Service Level Agreements (SLA) and aims to provide a trade-off between these two by making use of the fuzzy based Analytic Hierarchy Process (FHP). The proposed strategy is simulated using the CloudSim toolkit. Jian et al. [8] proposed a power-saving strategy based on the demand forecast for efficient allocation of VMs. The demands of the next periods are calculated here by using the Holt-Winters’ exponential smoothing strategy. Next a modified knapsack is implemented to identify the appropriate allocation of VMs to the host. Finally the values of various Holt-Winters’ parameters are updated using certain self-optimizing modules to determine the forecast frequency. The frequency of switching the hosts on and off is reduced here and so the power consumption is reduced.

All rights reserved by www.grdjournals.com

199


An Energy Efficient VM Placement Technique for Cloud Datacenters (GRDJE / CONFERENCE / ICIET - 2016 / 032)

Shuo Fang et al. [9] proposed a power-efficient technique for VM migration and placement within a fat tree based datacentre network. Here the power consumption and job delay are reduced by aggregating the VMs to hyper visors and by migrating the communicating resources to close locations. The Open Flow environment is used for implementation where a centralized controller keeps track of all requirements and availabilities of resources. The Open Flow environment dynamically adjusts the VM placements to close locations to save power and to reduce delay. Mastroianni et al. [10] proposed an adaptive and self-organizing strategy called as the Eco Cloud for the consolidation of VMs based on the RAM and CPU. The allocation and migration of VMs are decided based on the local information and the probabilistic processes. A fluid-like mathematical model of the proposed method is implemented in a real time datacentre. The method used here achieves good efficiency in terms of workload and balance is provided for the CPU bound and RAM bound based VMs. Farahnakian et al. [11] proposed a Reinforcement Learning-based Dynamic Consolidation (RL-DC) strategy to decrease the number of active hosts in cloud datacentres based on the current resource requirements. An agent is used to learn the policy for determining power mode of hosts using a learning method. Based on the past knowledge the agent will decide when a given host should be kept active or sleep. The RL-DC dynamically adapts itself with change in workload. The proposed VM placement strategy in this paper aims to reduce the energy consumption of the datacentres and hosts by dynamically reallocation the VMs from one datacentre to the other with less migration cost. The VMs from high cost hosts are reallocated to low cost ones by still preserving the service provided to the customers in an efficient manner. The datacentre with high cost can then be shut down if all the VMs are reallocated properly and effectively. The proposed method is simulated using the CloudSim toolkit.

III. CLOUDSIM CloudSimis a Java based toolkit that acts as a modelling framework for creating and simulating cloud computing infrastructures and the various services [12]. The CloudSim framework contains all inbuilt Java classes and functions to simulates the various entities of the cloud such as the resources, data centres, hosts, the processing environment (Virtual machines), etc. bases on the needs. Any type of cloud network or framework can be simulated using the CloudSim toolkit. The CloudSim toolkit can be uploaded and executed in any Integrated Development Environment (IDE) such as the Eclipse IDE or Net Beans IDE. The proposed fault tolerant algorithm is implemented and tested in the CloudSim by creating a cloud framework. The various functionalities of the CloudSim toolkit are to support the modelling and simulation of the following:  Large scale cloud data centres.  Server hosts or systems with policies for allocating host resources to virtual machines.  Energy-aware computational resources.  Network topologies of data centres and message-passing applications.  Federated clouds. Apart from these the CloudSim supports dynamic insertion of simulation elements and resources or to stop and start the simulation whenever needed. Also it supports user-defined policies to allocate hosts to virtual machines and to allocate host resources to virtual machines. By using the dynamic ability of the CloudSim, it is possible to inject faults into the cloud during simulation. Also the fault can be handled by implementing the proposed fault tolerant technique into the CloudSim simulation. Element

Description

Datacenter

The data center is the cloud that contains various cloud resource and deals with processing of VMs. The Datacenter consist of one or more Hosts.

Datacenter Broker

The broker is the entity that acts on behalf of a user of the cloud. It handles allocation of the user requests to VMs hosted in the Host of the Datacenter.

Host

A Host is a processing entity associated with a VM. It can create, destroy and host VMs. It has policies for allocating bandwidth, memory, processing elements to VMs.

Processing Element

Processing Elements are the core of Host that are used to process and run the VMs allocated to that Host. A Host can have one or more Processing Elements.

Virtual Machine

A Virtual Machine is an OS or image that runs on the assigned Processing Element of the allotted Host. The VM executes the various user requests (Cloudlets).

All rights reserved by www.grdjournals.com

200


An Energy Efficient VM Placement Technique for Cloud Datacenters (GRDJE / CONFERENCE / ICIET - 2016 / 032)

Cloudlet

Cloudlet is the task or request or process that comes to the data center. Each of the cloudlets represents the different requests of the user.

File

The virtual representation of a file in the data center. The process of file creation, file transfer and file execution are taken as user tasks or Cloudlets in the simulation. Table 1: Cloudsim Elements

The various elements of the CloudSim that are available in the toolkit and that are used for simulating the proposed fault tolerant methods are discussed in Table 1.Apart from these, there are also the Schedulers that are used to schedule the various resources of the data center to the process execution. The resource utilization, storage, packet transfer, file creation, file processing, allocation policies, etc. are also available within the CloudSim.

IV. PROPOSED VM PLACEMENT TECHNIQUE A. Various Components The proposed VM placement technique dynamically reallocates the VMs from one datacentre to other datacentre based on criteria such as the cost incurred for various resources within the datacentre. The proposed technique consists of three components such as: (1) Monitoring agent, (2) Resource agent and (3) Allocation agent. The major task of the monitoring agent is to identify the current status of the cloud environment. That is, the number of datacentres, the various hosts, the VMs and the allocation of VMs in all the hosts are identified by the monitoring agent. The resource agent calculates the resource usage of the VMs within the host such as the RAM, CPU, storage, bandwidth, etc. The total resources and the available resources or free resources are identified by the resource agent. The resource agent also identifies the possibilities of VM reallocation to other datacentres based on the resource usage. Finally the allocation agent calculates the costs incurred for VM migration and the cost incurred for use of resources in datacentres and based on this the VMs are reallocated. The basic working model of the proposed components is shown below in Fig. 1.

Fig. 2: Components of proposed VM placement technique

B. VM Placement Algorithm The proposed method dynamically considers the various resource criteria for the VM placements and if the currently allocated situation itself is an efficient scenario then no migration or reallocation is done. By using the resource agent component, the migration possibilities between each of the datacentres are verified. Consider a sample CloudSim environment with three datacentres D1, D2 and D3. Let the number of hosts in D1 and D2 be 1 and that in D3 be 3 hosts. Each host can hold 2 VMs. Let datacentres D1 and D2 have 2 VMs allocated and D3 have 4 VMs as shown in Fig. 2.

All rights reserved by www.grdjournals.com

201


An Energy Efficient VM Placement Technique for Cloud Datacenters (GRDJE / CONFERENCE / ICIET - 2016 / 032)

Fig. 3: Sample cloud datacentre

Here as it is shown in Fig. 2 the reallocation of VM from D1 or D2 to the D3 will result in a complete shutdown of any one of the datacenters D1 or D2. This way the number of datacenters can be reduced and the power consumption of the cloud is reduced. Also the host in D3 with free VM space can be used effectively. And the hosts inside D2 or D1 can be shut down along with the datacenter itself after reallocation. The algorithm of the proposed strategy is explained below. Algorithm 1 shows the monitoring agent. 1) Algorithm 1: Monitoring agent i=1,2…N is number of datacenters j=1,2,…M is number of hosts in di k=1,2,…P is number of VMs is host Hij Di – Datacenter i Hij – Host j in datacenter i Vijk – VM k in host j that is in datacenter i begin Monitoring() D = list of datacenters in the CloudSim for each datacenter Di in D print datacenter id get number of CPU cores in Di Hi = list of all hosts in Di foreach host Hij in Hi print Host id Vij = list of all VMs in Hij for each VM Vijk in Vij print VM id get VM mapping to host end for end for end for endMonitoring() The monitoring agent goes through the resource allocation of the cloud and gets the list of all resources and entities associated with the current simulation of CloudSim. The entities such as datacenters, hosts and VMs are obtained and their allocations are also recorded. The allocation of VMs to hosts and the hosts within the datacenters are obtained as provided above in the algorithm 1. Next the resource agent algorithm is explained below in algorithm 2. 2) Algorithm 2: Resource agent Resources – RAM, MIPS, Storage, Bandwidth Ra – Total free resources in Datacenter a Raj – Totalfree resources in Host j RTajand STbj– Total allocatedresources in Host j PAbjk – Resources required to run VM k in host j Sb – Total required resources of VMs in datacenter b Sbj – Totalused resources in Host j by all VMs begin Resource() for each datacenter Da in D for each datacenter Db in D when a!=b

All rights reserved by www.grdjournals.com

202


An Energy Efficient VM Placement Technique for Cloud Datacenters (GRDJE / CONFERENCE / ICIET - 2016 / 032)

if free PES in Da≥number of VMs in Db Da has enough PES to hold all VM of Db count=0 for each host Haj in Da calculatefree resources Raj calculateallotted resources RTaj print Raj and RTaj Ra=Ra+Raj for each host Hbj in Db calculateused resources Sbj calculateallotted resources STbj Vbj = list of all VMs in Hbj for each VM Vbjk in Hbj get VM parameters PAbjk of Vbjk Sb=Sb+PAbjk ifPAbjk≤Raj Haj can hold Vbjk count++ Raj=Raj-PAbjk end if end for printSb end for Haj can hold “count” VMs from Hbj if count>number of VMs in D b& Ra≥Sb migration possible from Db to Da end if count=0 end for else do nothing end for end for end Resources() The resource agent algorithm as discussed above in algorithm 2 calculates the resources available and required in all the hosts of the datacenters and based on that the possibility of complete migration from one datacenter to another are detected. These possibilities are given as input to the allocation agent to process them and obtain the migration cost and the cost incurred within the datacenters. Based on this a suitable migration is implemented. The migration from one datacenter to another is done only if the migration cost is minimum and the cost incurred within the datacenter will reduce after the migration. The complete algorithm for cost calculation and implementation of migration is discussed below in algorithm 3 that is the allocation agent algorithm. 3) Algorithm 3: Allocation agent Ui – Cost for using unit RAM, MIPS, Storage, Bandwidth in Datacenter i UTi – Total cost incurred in Datacenter i MTab – Migration cost from datacenter a to b Ti – Time function in datacenter i MAi – Cost of implementing allocation policy in datacenter i Mi – Cost of mapping new VMs in datacenter i beginAllocation() for each datacenter Da in D for each datacenter Db in D when a!=b minCost = 100000 if migration possible from Db to Da Ua = resource utilization cost in Da Ub = resource utilization cost in Db UTa = Ua*Sbj UTb = Ub*Sbj printUTa and UTb

All rights reserved by www.grdjournals.com

203


An Energy Efficient VM Placement Technique for Cloud Datacenters (GRDJE / CONFERENCE / ICIET - 2016 / 032)

MTab = ((STbj/RTaj)*(Ta+Tb))+MAa+Ma printMTab ifMTab<minCost minCost = MTab migration key = from Db to Da end if end if end for end for execute reallocation using migration key source = Db in migration key destination = Da in migration key allocate all VMs in Db to Da shut down Db endAllocation () The migration cost is calculated as in algorithm 3 using the time taken for migrating, the cost required for allocation of policies for the reallocated VMs, the cost of mapping the reallocated VMs to the new datacenter and the ratio of the total allocated resources in the source and destination datacenters. The source-destination key with the least migration cost is taken and reallocation is done by the allocation agent. The implementation results in CloudSim are discussed in the next chapter using sample cloud datacenters.

V. EXPERIMENTAL RESULTS The proposed VM placement technique is experimented in the CloudSim toolkit using a sample created cloud environment that contains many datacentres. For the current implementation the number of datacentres is taken as 4. The number of hosts, processing elements and the allocation of VMs in the hosts can be obtained using the monitoring agent. A total of 17 VMs are taken. The result of the monitoring agent is shown below as given in Fig. 3

Fig. 4: Initial allocation from monitoring agent

Here as it is seen, datacentre 4 contains 8 PES and only 4 VMs are allocated and so it contains free space to allocate 4 extra VMs. But the requirements should be calculated using the resource agent first as in Fig. 4.

All rights reserved by www.grdjournals.com

204


An Energy Efficient VM Placement Technique for Cloud Datacenters (GRDJE / CONFERENCE / ICIET - 2016 / 032)

Fig. 5: Possibility of VM reallocation in datacentres

Here datacenter 4 has the possibility to hold all the VMs from datacenter 1 and 2. Datacenter 3 cannot be possible since it contains 5 VMs and datacenter 4 can only hold 4 more VMs. The total available resources and the free resources in

Fig. 6: Verification of reallocation possibility based on resources

All rights reserved by www.grdjournals.com

205


An Energy Efficient VM Placement Technique for Cloud Datacenters (GRDJE / CONFERENCE / ICIET - 2016 / 032)

Finally the cost for migration and cost incurred in dataset are calculated as shown in Fig. 6. Finally after migration the allocation will look as in Fig. 7.

Fig. 7: Final allocation after reallocation

VI. CONCLUSION Even if the availability of resources and occurrence of faults are handled efficiently in a cloud system, it still has performance degradation due to over energy consumption and cost of using resources. This paper proposed an efficient VM placement technique that considered the various resource utilization of VMs such as RAM, MIPS, Storage and Bandwidth to reallocate VMs to better datacentres in such a way that the cost incurred in the datacentre can be reduced. Also by completely migrating VMs from one datacentre to another, one of the datacentre can be shut down completely to datacentre 4 are calculated using the resource agent. The next step is to calculate the possibility of reallocation of each of the VMs from datacentre 1 and 2 to datacentre 4 based on the resources as in Fig. 5.

Fig. 8: Calculating migration cost and datacentre cost

All rights reserved by www.grdjournals.com

206


An Energy Efficient VM Placement Technique for Cloud Datacenters (GRDJE / CONFERENCE / ICIET - 2016 / 032)

Reduce the power and energy consumption within the cloud environment. In the future, this technique can be enhanced further by considering other real time cloud aspects such as the hardware cost and other system costs.

REFERENCES [1] BhushanLalSahu, Rajesh Tiwari; “A Comprehensive Study on Cloud Computing”, International Journal of Advanced Research in Computer Science and Software Engineering, Volume 2, Issue 9, September 2012. [2] David C. Chou; “Cloud Computing: A Value Creation Model”, ELSEVIER, Journal of Computer Standards and Interfaces, Feb 2015. [3] AbdelzahirAbdelmaboud, Dayang N.A. Jawawi, Imran Ghani, AbubakarElsafi, Barbara Kitchenham; “Quality of Service Approaches in Cloud Computing: A Systematic Mapping Study”, ELSEVIER, Journal of Systems and Software, Volume 101, March 2015. [4] DimitriosZissis, DimitriosLekkas; “Addressing Cloud Computing Security Issues”, Journal of Future Generation Computer Systems, ELSEVIER, Volume 28, Issue 3, March 2012. [5] D.Borgetto, P.Stolf; "An energy efficient approach to virtual machines management in cloud computing", IEEE 3rd International Conference on Cloud Networking, pp. 229-235, October 2014. [6] Microsoft, “Windows azure: Microsoft’s cloud services platform,” http://www.microsoft.com/windowsazure/. [7] N.Kord, H.Haghighi; "An energy-efficient approach for virtual machine placement in cloud based data centres", IEEE International Conference on Information and Knowledge Technology, pp. 44-49, May 2013. [8] Jian Cao, Yihua Wu, Minglu Li; "Energy Efficient Allocation of Virtual Machines in Cloud Computing Environments Based on Demand Forecast", Journal of Advanced in Grid and Pervasive Computing, Springer, pp. 137-151, May 2012. [9] Shuo Fang, R.Kanagavelu, Bu-Sung Lee, ChuanHengFoh, KhinMiMiAung; "Power-Efficient Virtual Machine Placement and Migration in Data Centers", IEEE International Conference on IEEE Cyber, Physical and Social Computing, pp. 14081413, August 2013. [10] C.Mastroianni, M.Meo, G.Papuzzo; "Probabilistic Consolidation of Virtual Machines in Self-Organizing Cloud Data Centers", IEEE Transactions on Cloud Computing, Volume 1, pp. 215-228, Feb 2014. [11] F.Farahnakian, P.Lilijeberg, J.Plosila; "Energy-Efficient Virtual Machines Consolidation in Cloud Data Centers Using Reinforcement Learning", IEEE 22nd Euromicro International Conference on Parallel, Distributed and Network-based Processing, pp. 500-507, August 2014. [12] Rodrigo N. Calheiros, Rajiv Ranjan, Anton Beloglazov, Cesar A.F. De Rose, RajkumarBuyya; “CloudSim: A Toolkit for Modeling and Simulation of Cloud Computing Environments and Evaluation of Resource and Provisioning Algorithms”, Journal of Software Practice and Experience, Wiley Online Library, Volume 41, 2010, pp. 23-50.

All rights reserved by www.grdjournals.com

207


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.