VmAllocationPolicyMigrationDynamicUpperThresholdFirstFit

public abstract class VmAllocationPolicyMigrationDynamicUpperThresholdFirstFit extends VmAllocationPolicyMigrationAbstract implements VmAllocationPolicyMigrationDynamicUpperThreshold

An abstract class that is the base for implementation of VM allocation policies which use a dynamic over utilization threshold. It’s a Best Fit policy which selects the Host with most efficient power usage to place a given VM. Such a behaviour can be overridden by sub-classes.

Author:Manoel Campos da Silva Filho

Constructors

VmAllocationPolicyMigrationDynamicUpperThresholdFirstFit

public VmAllocationPolicyMigrationDynamicUpperThresholdFirstFit(PowerVmSelectionPolicy vmSelectionPolicy)

Creates a VmAllocationPolicyMigrationDynamicUpperThreshold with a safety parameter equals to 0 and no fallback policy.

Parameters:
  • vmSelectionPolicy – the policy that defines how VMs are selected for migration

VmAllocationPolicyMigrationDynamicUpperThresholdFirstFit

public VmAllocationPolicyMigrationDynamicUpperThresholdFirstFit(PowerVmSelectionPolicy vmSelectionPolicy, double safetyParameter, VmAllocationPolicyMigration fallbackVmAllocationPolicy)

Creates a VmAllocationPolicyMigrationDynamicUpperThreshold.

Parameters:
  • vmSelectionPolicy – the policy that defines how VMs are selected for migration
  • safetyParameter – the safety parameter
  • fallbackVmAllocationPolicy – the fallback VM allocation policy to be used when the over utilization host detection doesn’t have data to be computed

Methods

getFallbackVmAllocationPolicy

public VmAllocationPolicyMigration getFallbackVmAllocationPolicy()

getOverUtilizationThreshold

public double getOverUtilizationThreshold(Host host)

Gets a dynamically computed Host over utilization threshold based on the Host CPU utilization history.

Parameters:
Returns:

{@inheritDoc} or Double.MAX_VALUE if the threshold could not be computed (for instance, because the Host doesn’t have enought history to use)

See also: VmAllocationPolicyMigrationDynamicUpperThreshold.computeHostUtilizationMeasure(Host)

getSafetyParameter

public double getSafetyParameter()

isHostOverloaded

public boolean isHostOverloaded(Host host)

Checks if a host is over utilized based on the CPU over utilization threshold computed using the statistical method defined in computeHostUtilizationMeasure(Host).

Parameters:
Returns:

{@inheritDoc}

setFallbackVmAllocationPolicy

public final void setFallbackVmAllocationPolicy(VmAllocationPolicyMigration fallbackPolicy)

setSafetyParameter

protected final void setSafetyParameter(double safetyParameter)

Sets the safety parameter.

Parameters:
  • safetyParameter – the new safety parameter