Modeling virtualized services for optimization of energy consumption in cloud computing

Cloud computing gives the system administrators the ability to replace the operations which use physical hardware with virtualized services. Service cost calculation or accounting method in cloud computing must be dynamic enough to calculate the billing information for each user based on the computational resources used during each session. In this paper, a model for estimation of consumed energy in virtualized services and calculation of billing information for users in the cloud computing environment is presented. The proposed method estimates the consumed energy by each virtual machine based on physical characteristics of the hardware. The experimental results show that the proposed model is able to estimate the consumed energy with errors lower than 5%.


Introduction
In cloud computing, services and applications are separately run on virtual machines.Most cloud services providers, bill their users based on their consumed processing resources.Computable processing resources, are the total time of processor's work and the number of virtual machines dedicated to that work.
Production and hosting by ISPACS GmbH.http://www.ispacs.com/journals/cacsa/2017/cacsa-00078/International Scientific Publications and Consulting Services Many cloud service providers agree that costs of preparation, hardware maintenance and cooling expenses should not be added to their customers' bills.In models developed by experts, consumed power of every virtual machine is dependent on the time dedicated to the processor or the number of processed packages of the network.Estimation of rthe energy models are performed by calculating and analyzing the consumed resources of every virtual machine.In this study, we aim to show that processor time is not a good measure for estimation of energy consumption the virtual machine.Also some events in the processor are highly effective in energy consumption of the processor.In this paper a method for energy consumption estimation that computes the energy based on observation of processor's performance is presented.Data center costs in 2012 was doubled compared to 2007 and their hardware costs was higher than before too.In addition to service providers energy consumption costs, other costs such as cooling expenses were also increased.High costs and low performance of service providers made it essential to virtualize the provided services.Virtualization makes it possible to set up various virtual machines on every physical hardware so that concurrent running of two or more operating systems on the hardware is possible and efficiency of software, hardware and resource usage of the service providers are optimized.Using virtualization technology provides possibilities such as access increase, optimized usage of hardware resources, easy management of the services and service providers, in addition to decreasing hardware costs.These qualities have made this technology very popular.Virtualization technology is more common in data centers as a novel technology that is used for setting up cloud computing technology.As a result, cloud computing model increased proportionaly to novel infrastructures of new generations of computing with the aim of decreasing energy consumption.In cloud systems, virtualization is an essential tool for resources flexibility for every user and will also lead to high security and stability.Using virtualization, services and applications run separately on virtual machines which helps to have precise control on the assigned resources to users.Also, virtualization makes it easy for users to guarantee the agreement between users and service providers.In addition, separation of content running and data between virtual machines is supported by processors and hypervisors so the users are virtually the owner of their specific service providers hardware.Cost estimation methods in cloud computing must be dynamic.Many cloud service providers agree that costs of preparation, hardware maintenance and cooling expenses should not be added to their customers bills.In models developed by experts, consuming power of every virtual machine is dependent on the time dedicated to the processor or the number of processed packages of the network.Estimated energy models should be able to calculate the consumed resources of every virtual machine.The general criteria calculation for users cost, is the processors time and the number of virtual machines allocated to the job.As mentioned before, energy and cooling costs are higher than hardware preparation costs.Estimation method for service provider's energy costs of a single-user system is different from service providers with many virtual machines.Energy consumption for every virtual machine running on the service provider is technically a challenging job.Many researchers have been able to calculate the consumed energy of every virtual machine by computing and analyzing the used resources.Therefore, most models suppose that consumed energy of every virtual machine is proportional to the assigned time of the processor or the number of processed packets of the network by the user.Lefurgy et al. [1] limited the service provider consuming energy with a predefined threshold rate.The aim of their study was to decrease building energy expenses and power distribution maintenance structure.Felter et al. [2] studied the decreasing of the construction energy costs and central power distribution maintenance.They investigated the management designs of energy coverage by assigning a primary rate to the consumed energy in service providers.Fan et al. [3] studied the energy resource management in order to decrease the service providers energy consumption.They developed techniques for managing the computing resources and distributed jobs in order to decrease the service providers energy consumption.Choi et al. [4] suggested an statistical method for prediction of the consumption energy of service providers.In order to predict the consumed energy, they supposed that workload is predetermined and there is no activity for different workloads.Govindan et al. [5] http://www.ispacs.com/journals/cacsa/2017/cacsa-00078/International Scientific Publications and Consulting Services developed a new design based on of Choi et al. [4] model in which consumed energy of the service providers causes a performance limitation for the processor when the running software which use high amount of energy.Srikantaiah et al. [6] proposed a mapping method for consumed energy estimation of physical service providers.Zeng et al. [7] developed an ecosystem which is the first energy-based operating system that considers the energy at the beginning as class resources.In this method, energy is assigned to the tasks based on their priorities and tasks are scheduled based on their energy budget and battery life.In this study, they supposed that processor uses a fixed amount of energy which is acceptable for mobile embedded technology.Kansal et al. [8] developed a software method for measuring the consumed energy of virtual machines for service provider.In this software, consumed energy is estimated based on the dynamic observation of used resources.Snowdon et al. [9] suggested a model for precise estimation of consumed energy.Tiwari et al. [10] and Sinha et al. [11] proved that internal activity based consumed energy estimation models are more precise.Brooks et al. [12] and Stanley-Marbell et al. [13] introduced models by which they estimate consumed energy of application programs using simulation methods.Nathuji et al. [14] presented a model for optimizing the performance of cloud computing servers.Nathuji et al. [15] also porposed a schedule tracking method for virtual machines.

Consumed energy of processors in virtual environment
There are several factors effective in consumed energy of the processors.Power is consumed by the hardware and software components of the system while running the commands.Consumed energy is calculated by multiplication of power in time which is proportional to the number of the performed commands.Depending on the type of the commands an equal number of commands may lead to a different consumed energies.For example, memory access operations such as loading, use different combination of commands.In order to investigate the events effect on processors consumed energy we can use a performance counter in processors.Performance counter is a special register that can be programmed for counting special events active in the processor such as used cache amount, failure prediction index and number of floating point instruction.Most modern processors are equipped with programmable performance counters.For example, Intel Nehalem has four programmable performance counters which is used in architecture of I3, I5, I7 processors in personal computers.Number of micro commands used for any instruction show the exact activities inside the processors.Even in identical workloads, number of commands uses in the certain time differs.Generally, mean consumed power during certain time can be directly interpreted.This power indicates a linear relation between number of instructions and consumed energy.Some experts believe that in spite of the complex difference between types of floating point commands with integer commands, there is not much difference between running these commands as floating point commands translate into more than one command during the runtime.Therefore, we can assume that: in which P_Processor : is the consumed energy of the processor, P_Shared is the consumed energy of the shared components and P_Core is the consumed energy of each core at running commands.Therefore, processor should demand lower energy when commands are run on multi cores than when same number of commands are run on single-cor.This is due to the fact that using more cores in the processor causes more instructions to complete at the same time.As a result, the consumed energy of a single core processor must be higher than systems with multi cores because using more cores for processing causes the more commands to run at the same time so multi core system can improve energy consumption.Usually, multi core processors are used for virtual machines because of their higher performance.In this study various virtual machines such as VM 1 …VM n are used for estimation of consumed energy of machine k.The consumed energy of internal system during a fixed period of time is defined as below: http://www.ispacs.com/journals/cacsa/2017/cacsa-00078/International Scientific Publications and Consulting Services If the energy consumption of the events is defined as E, then at time t we have: In which, Ni is the completed commands during the time window, M i is the number of memory accesses by the tasks, S t is the number of active cores during t.Replacing formula (2.2) in formula (2.3) we have: In order to obtain these coefficients we have to use regression analyzer software.Parameters N i , M i , S t are determined via performance counter of every virtual machine.

Simulation of consumed energy of processors
In running simulation, we should simulate minimum features of the real environment so we used Cloudsim which is used for simulating cloud computing environments.CloudSim is a platform in which cloud strategies can be tested in a controlled and reproducible manner.Therefore, simulation frameworks such as CloudSim are important as they allow for the evaluation of the performance of resource provisioning and application scheduling techniques under different infrastructure configurations.According to the structure of Cloudsim and its layers, we should define our simulation prerequisites.Therefore, our simulation environment is as follows:  datacenter feature: in datacenter class, we should define service providers and their capabilities.Service provider in our study is an IBM model X3250 with microprocessors with four cores Xeon X3470.In Cloudsim, class PowerModel is responsible for consumed energy estimation and a class called PowerModelSpecPowerIbmX3250XeonX3470 is defined that calculates the consumed energy of the above service provider. Virtual machine feature: according to the VM class in Cloudsim, we define virtual machines based on the required scenarios. Workload features: in Cloudsim, workload is defined as cloudlet that we define as SPEFC CPU 2006 for determining the given cloudlet.
For running required experiments, we need several scenarios.For defining scenarios, following files are developed based on the Cloudsim structure in the java and the power consumed for running the commands is calculated.
In memory-dependent workloads, random access to memory was high and cache memory error in the previous step are abundant.Previous-step cache memory errors are obtained by processor performance during running the workload in the processor.For studying the relationship between consumed energy with number of commands, we run processor-dependent workload and memory dependent workload experiment.
Results of this experiments indicate that in the number of same instructions, workload depending on the memory used higher energy compared to processor-dependent workload.In memory-dependent workload, for accessing memory repeatedly, processors stop for a short time but memory systems and bus consume power even during this stop time.
Experiment was done on the Core i7 920 processor.This processor has 4 cores with 8 virtual cores.Experiment showed that there is no linear relationship between number of processor core and consumed power.The results indicates difference of consumed power between active cores in the processor.Increasing rate of consumed power divided into two classes: consumer power rate of one core and multi-core.Consumed power in one core has higher rate than multi-core consumed power.Difference of consumed power between one and two cores, two and three cores, three and four cores is lower than one single active http://www.ispacs.com/journals/cacsa/2017/cacsa-00078/International Scientific Publications and Consulting Services core.Slight increase in the consumed power of cores is due to the common components between core and number of instructions implemented by the core and common components include memory controllers, bus and etc.Therefore, consumed power of multi-core processors increase slightly compared to one-core processors.As a result, using more cores in one processor gives better consumed power performance.

Experimental results
In order to investigate the relationship between consumed energy and the number of running commands, we run several scenarios.Figure 1 shows the relationship between consumed energy and number of running commands.At next stage, the memory-based scenario is performed.Figure 2 shows the relationship between consumed energy and the number of running commands with workload of the processor and the memory.Comparing figures 1 and 2, it is observed that when the number of commands is equal, then the consumed energy of workload of memory is higher than processors.Based on Figure 3, although there is a big difference between their complexities, there is not a huge difference between processor usage.In our study, the correlation coefficient of floating point and consumed energy during time is about 0.087 that shows a small relationship between floating point command with consumed energy.Therefore, consumed power of multi-core processors relative to one-core processors increases slightly in the time.Increasing consumed power is due to increasing the number of run instructions.As a result, using more cores in the processor, provides better performance of consumed energy.Regarding the energy obtained for each cloudlet, by regression analysis software, we calculate required parameters.For evaluating the presented method for energy calculation, we run an experiment which showed consumed energy with mean error 0.96 J/s has been estimated.For evaluating energy-aware timing of proposed virtual machines, we run an experiment which showed the measured consumed energy and energy supply error rate lower than %2 in consumed energy.
Figure 3: The energy consumption for active cores of CPU.

Conclusion
In this research, we demonstrated that processor time is not a suitable index for estimation of exact consumed energy of the virtual machine and some events are more effective in consumed energy of the processor.It referred also to the method that energy consumption of each virtual machine can be estimated based on the consumed power of the virtual processor without allocating software.Allocated energy budget of each virtual machine depends on the workload allocated to it.Traditional billing systems apply processor time allocation of number of requested virtual machines as the billing criteria.Although energy costs are higher than software costs in the data centers, the billing system for reflecting real energy costs should change.We presented a model for estimating energy consumption that measures consumed energy by each virtual machine.Experimental results indicate that the proposed method estimates consumed energy with less than %5 error.

Figure 1 :
Figure 1: The energy consumption for processor dependent tasks.

Figure 2 :
Figure 2: The energy consumption for processor and memory dependent tasks [1] X. W. C. Lefurgy, M. Ware, Enhanced power monitoring for Dell PowerEdge servers, Dell Power Solutions, (2007).