VmAllocationPolicyMigration

public interface VmAllocationPolicyMigration extends VmAllocationPolicy

An interface to be implemented by a VM allocation policy that detects Host under and over CPU utilization.

Author:Anton Beloglazov, Manoel Campos da Silva Filho

Fields

NULL

VmAllocationPolicyMigration NULL

An attribute that implements the Null Object Design Pattern for VmAllocationPolicyMigration objects.

Methods

getMetricHistory

Map<Host, List<Double>> getMetricHistory()

Gets a read-only map of metric history.

Returns:the metric history

getOverUtilizationThreshold

double getOverUtilizationThreshold(Host host)

Gets the host CPU utilization threshold to detect over utilization. It is a percentage value from 0 to 1. Whether it is a static or dynamically defined threshold depends on each implementing class.

Parameters:
  • host – the host to get the over utilization threshold
Returns:

the over utilization threshold

getTimeHistory

Map<Host, List<Double>> getTimeHistory()

Gets a read-only map of times when entries in each history list was added for each Host. All history lists are updated at the same time.

Returns:the time history

getUnderUtilizationThreshold

double getUnderUtilizationThreshold()

Gets the percentage of total CPU utilization to indicate that a host is under used and its VMs have to be migrated.

Returns:the under utilization threshold (in scale is from 0 to 1, where 1 is 100%)

getUtilizationHistory

Map<Host, List<Double>> getUtilizationHistory()

Gets a read-only map of the utilization history for each Host.

Returns:the utilization history

isHostOverloaded

boolean isHostOverloaded(Host host)

Checks if host is currently over utilized, according the the conditions defined by the Allocation Policy.

Parameters:
  • host – the host to check
Returns:

true, if the host is over utilized; false otherwise

isHostUnderloaded

boolean isHostUnderloaded(Host host)

Checks if host is currently under utilized, according the the conditions defined by the Allocation Policy.

Parameters:
  • host – the host
Returns:

true, if the host is under utilized; false otherwise

setUnderUtilizationThreshold

void setUnderUtilizationThreshold(double underUtilizationThreshold)

Sets the percentage of total CPU utilization to indicate that a host is under used and its VMs have to be migrated.

Parameters:
  • underUtilizationThreshold – the under utilization threshold (in scale is from 0 to 1, where 1 is 100%)