Class VmAllocationPolicyMigrationStaticThreshold
java.lang.Object
org.cloudbus.cloudsim.allocationpolicies.VmAllocationPolicyAbstract
org.cloudbus.cloudsim.allocationpolicies.migration.VmAllocationPolicyMigrationAbstract
org.cloudbus.cloudsim.allocationpolicies.migration.VmAllocationPolicyMigrationStaticThreshold
- All Implemented Interfaces:
VmAllocationPolicyMigration
,VmAllocationPolicy
- Direct Known Subclasses:
VmAllocationPolicyMigrationBestFitStaticThreshold
,VmAllocationPolicyMigrationWorstFitStaticThreshold
A VM allocation policy that uses a static CPU utilization threshold to detect
host over utilization.
It's a First Fit policy which selects the first Host found with most efficient power usage to place a given VM.
If you are using any algorithms, policies or workload included in the power package please cite the following paper:
- Since:
- CloudSim Toolkit 3.0
- Author:
- Anton Beloglazov
-
Field Summary
Fields inherited from class org.cloudbus.cloudsim.allocationpolicies.migration.VmAllocationPolicyMigrationAbstract
DEF_UNDERLOAD_THRESHOLD
Fields inherited from interface org.cloudbus.cloudsim.allocationpolicies.VmAllocationPolicy
DEF_HOST_COUNT_PARALLEL_SEARCH, LOGGER, NULL
Fields inherited from interface org.cloudbus.cloudsim.allocationpolicies.migration.VmAllocationPolicyMigration
NULL
-
Constructor Summary
ConstructorDescriptionVmAllocationPolicyMigrationStaticThreshold
(VmSelectionPolicy vmSelectionPolicy) Creates a VmAllocationPolicyMigrationStaticThreshold.VmAllocationPolicyMigrationStaticThreshold
(VmSelectionPolicy vmSelectionPolicy, double overUtilizationThreshold) Creates a VmAllocationPolicyMigrationStaticThreshold.VmAllocationPolicyMigrationStaticThreshold
(VmSelectionPolicy vmSelectionPolicy, double overUtilizationThreshold, BiFunction<VmAllocationPolicy, Vm, Optional<Host>> findHostForVmFunction) Creates a VmAllocationPolicyMigrationStaticThreshold, changing theFunction
to select a Host for a Vm. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Gets the static host CPU utilization threshold to detect over utilization.final void
setOverUtilizationThreshold
(double overUtilizationThreshold) Sets the static host CPU utilization threshold to detect over utilization.Methods inherited from class org.cloudbus.cloudsim.allocationpolicies.migration.VmAllocationPolicyMigrationAbstract
areHostsOverloaded, areHostsUnderloaded, defaultFindHostForVm, findHostForVmInternal, getMaxUtilizationAfterAllocation, getOptimizedAllocationMap, getPowerAfterAllocation, getPowerDifferenceAfterAllocation, getSwitchedOffHosts, getUnderUtilizationThreshold, getUtilizationOfCpuMips, getVmSelectionPolicy, getVmsToMigrateFromUnderUtilizedHost, isHostOverloaded, isHostUnderloaded, isVmMigrationSupported, setUnderUtilizationThreshold, setVmSelectionPolicy
Methods inherited from class org.cloudbus.cloudsim.allocationpolicies.VmAllocationPolicyAbstract
allocateHostForVm, allocateHostForVm, allocateHostForVm, deallocateHostForVm, findHostForVm, getDatacenter, getHostCountForParallelSearch, getHostList, scaleVmVertically, setDatacenter, setFindHostForVmFunction, setHostCountForParallelSearch
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.cloudbus.cloudsim.allocationpolicies.VmAllocationPolicy
allocateHostForVm, allocateHostForVm, allocateHostForVm, deallocateHostForVm, findHostForVm, getDatacenter, getHostCountForParallelSearch, getHostList, isParallelHostSearchEnabled, scaleVmVertically, setDatacenter, setFindHostForVmFunction, setHostCountForParallelSearch
Methods inherited from interface org.cloudbus.cloudsim.allocationpolicies.migration.VmAllocationPolicyMigration
areHostsUnderOrOverloaded
-
Field Details
-
DEF_OVER_UTILIZATION_THRESHOLD
public static final double DEF_OVER_UTILIZATION_THRESHOLD- See Also:
-
-
Constructor Details
-
VmAllocationPolicyMigrationStaticThreshold
Creates a VmAllocationPolicyMigrationStaticThreshold. It uses adefault over utilization threshold
and adefault under utilization threshold
.- Parameters:
vmSelectionPolicy
- the policy that defines how VMs are selected for migration- See Also:
-
VmAllocationPolicyMigrationStaticThreshold
public VmAllocationPolicyMigrationStaticThreshold(VmSelectionPolicy vmSelectionPolicy, double overUtilizationThreshold) Creates a VmAllocationPolicyMigrationStaticThreshold.- Parameters:
vmSelectionPolicy
- the policy that defines how VMs are selected for migrationoverUtilizationThreshold
- the over utilization threshold
-
VmAllocationPolicyMigrationStaticThreshold
public VmAllocationPolicyMigrationStaticThreshold(VmSelectionPolicy vmSelectionPolicy, double overUtilizationThreshold, BiFunction<VmAllocationPolicy, Vm, Optional<Host>> findHostForVmFunction) Creates a VmAllocationPolicyMigrationStaticThreshold, changing theFunction
to select a Host for a Vm.- Parameters:
vmSelectionPolicy
- the policy that defines how VMs are selected for migrationoverUtilizationThreshold
- the over utilization thresholdfindHostForVmFunction
- aFunction
to select a Host for a given Vm. Passing null makes the Function to be set as the defaultVmAllocationPolicyAbstract.findHostForVm(Vm)
.- See Also:
-
-
Method Details
-
setOverUtilizationThreshold
public final void setOverUtilizationThreshold(double overUtilizationThreshold) Sets the static host CPU utilization threshold to detect over utilization.- Parameters:
overUtilizationThreshold
- the overUtilizationThreshold to set
-
getOverUtilizationThreshold
Gets the static host CPU utilization threshold to detect over utilization. It is a percentage value from 0 to 1 that can be changed when creating an instance of the class.This implementation always returns the same over utilization threshold for any given host
- Parameters:
host
- the host to get the over utilization threshold- Returns:
- the over utilization threshold (that is the same for any given host)
-