VmAllocationPolicyMigrationStaticThreshold

public class VmAllocationPolicyMigrationStaticThreshold extends VmAllocationPolicyMigrationAbstract

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 found Host 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:

Author:Anton Beloglazov

Constructors

VmAllocationPolicyMigrationStaticThreshold

public VmAllocationPolicyMigrationStaticThreshold(PowerVmSelectionPolicy vmSelectionPolicy, double overUtilizationThreshold)

Creates a VmAllocationPolicyMigrationStaticThreshold.

Parameters:
  • vmSelectionPolicy – the policy that defines how VMs are selected for migration
  • overUtilizationThreshold – the over utilization threshold

VmAllocationPolicyMigrationStaticThreshold

public VmAllocationPolicyMigrationStaticThreshold(PowerVmSelectionPolicy vmSelectionPolicy, double overUtilizationThreshold, BiFunction<VmAllocationPolicy, Vm, Optional<Host>> findHostForVmFunction)

Creates a new VmAllocationPolicy, changing the Function to select a Host for a Vm.

Parameters:
  • vmSelectionPolicy – the policy that defines how VMs are selected for migration
  • overUtilizationThreshold – the over utilization threshold
  • findHostForVmFunction – a Function to select a Host for a given Vm. Passing null makes the Function to be set as the default findHostForVm(Vm).

See also: VmAllocationPolicy.setFindHostForVmFunction(java.util.function.BiFunction)

Methods

getOverUtilizationThreshold

public double getOverUtilizationThreshold(Host host)

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:
Returns:

{@inheritDoc} (that is the same for any given host)

setOverUtilizationThreshold

public final void setOverUtilizationThreshold(double overUtilizationThreshold)

Sets the static host CPU utilization threshold to detect over utilization.

Parameters:
  • overUtilizationThreshold – the overUtilizationThreshold to set