v2.0.0 - Integrating power-aware features into regular simulation objects, enabling simulations that are both power- and network-aware
INTRODUCTION
Enables power-aware simulations using regular classes such asDatacenterSimple
, HostSimple
and VmSimple
. This way, it automatically allows creating simulations that are both network- and power-aware by using the network versions of such classes.
Any Host
now has a PowerSupply
attribute that allows to get power consumption data from. To enable collecting such data, it's is required to set a PowerModel
object by calling host.getPowerSupply().setPowerModel(powerModel)
. The only difference from previous versions is that the PowerModel
is defined inside the PowerSupply
instead of the Host
.
This way, if you don't need power-aware simulations, you need to do nothing because that is the default behaviour.
There are some examples such as the PowerExample and the MigrationExample2_PowerUsage.
More details are presented below.
VmUtilizationHistory
Adds the VmUtilizationHistory
class to store resource utilization history by a given Vm
. This way, all Vm
implementations have a UtilizationHistory
attribute.
PowerVm
PowerVm
class was removed and its methods were moved to a new VmUtilizationHistory class.
The Vm now has an attribute VmUtilizationHistory
that enables collecting CPU utilization data.
The VmUtilizationHistory.enabled
is set by default to false. This way, the user have to manually enable the history to start collecting utilization data. It was disabled by default to reduce memory usage.
PowerSupply
Adds the PowerSupply
interface to concentrate all power consumption data and operations, enabling any Host
to get such an information. The PowerSupply
includes the PowerModel
that was previously inside the PowerHost
class.
PowerHost
PowerHost
class removed and its methods merged into Host. A PowerSupply
interface was introduced to group power consumption data (including a PowerModel
). This way, any Host
can extract power consumption data. It's just required a PowerModel to be set in the PowerSupply
.
PowerHostUtilizationHistory and HostDynamicWorkloadSimple
PowerHostUtilizationHistory
and HostDynamicWorkloadSimple
class were removed and their code merged into the HostSimple
class.
The Host's getUtilizationHistory
method gets the CPU utilization history from its VMs. The Host doesn't store any data. The VM utilization history must be enabled to allow getting such data, by calling vm.getUtilizationHistory().enable()
.
VmAllocationPolicy
Refactors VmAllocationPolicy
implementations, mainly the VmAllocationPolicyAbstract
and VmAllocationPolicySimple
.
Changed the method Host findHostForVm(final Vm vm)
to Optional<Host> findHostForVm(final Vm vm)
, making it return an Optional
to explicitly indicate that a suitable Host
may not be found for a given VM.
The method was defined as abstract in the VmAllocationPolicyAbstract
and it's the single one initially required to be implemented by subclasses of VmAllocationPolicyAbstract
.
Removes PowerVmAllocationPolicySimple
because it was doing nothing that other policies weren't doing. Introduces the VmAllocationPolicyFirstFit
.
Renames the package org.cloudbus.cloudsim.allocationpolicies.power
to org.cloudbus.cloudsim.allocationpolicies.migration
. Such allocation policies enable VM migration and can be used now for any kind of simulation, not only for power-aware ones. All internal classes and interfaces were renamed, removing the prefix Power
.
NOTICE
Check release 2.2.0 for important updates about power-aware simulations.