public abstract class PowerVmAllocationPolicyMigrationAbstract extends PowerVmAllocationPolicyAbstract
| Constructor and Description |
|---|
PowerVmAllocationPolicyMigrationAbstract(List<? extends Host> hostList,
PowerVmSelectionPolicy vmSelectionPolicy)
Instantiates a new power vm allocation policy migration abstract.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addHistoryEntry(HostDynamicWorkload host,
double metric)
Adds the history value.
|
protected boolean |
areAllVmsMigratingOutOrAnyVmMigratingIn(PowerHost host)
Checks whether all vms are in migration.
|
protected List<PowerHost> |
extractHostListFromMigrationMap(List<Map<String,Object>> migrationMap)
Extract host list from migration map.
|
PowerHost |
findHostForVm(Vm vm)
Find host for vm.
|
PowerHost |
findHostForVm(Vm vm,
Set<? extends Host> excludedHosts)
Find host for vm.
|
List<Double> |
getExecutionTimeHistoryHostSelection()
Gets the execution time history host selection.
|
List<Double> |
getExecutionTimeHistoryTotal()
Gets the execution time history total.
|
List<Double> |
getExecutionTimeHistoryVmReallocation()
Gets the execution time history vm reallocation.
|
List<Double> |
getExecutionTimeHistoryVmSelection()
Gets the execution time history vm selection.
|
protected double |
getMaxUtilizationAfterAllocation(PowerHost host,
Vm vm)
Gets the power after allocation.
|
Map<Integer,List<Double>> |
getMetricHistory()
Gets the metric history.
|
protected List<Map<String,Object>> |
getMigrationMapFromUnderUtilizedHosts(List<PowerHostUtilizationHistory> overUtilizedHosts)
Gets the migration map from under utilized hosts.
|
protected List<Map<String,Object>> |
getNewVmPlacement(List<? extends Vm> vmsToMigrate,
Set<? extends Host> excludedHosts)
Gets the new vm placement.
|
protected List<Map<String,Object>> |
getNewVmPlacementFromUnderUtilizedHost(List<? extends Vm> vmsToMigrate,
Set<? extends Host> excludedHosts)
Gets the new vm placement from under utilized host.
|
protected List<PowerHostUtilizationHistory> |
getOverUtilizedHosts()
Gets the over utilized hosts.
|
protected double |
getPowerAfterAllocation(PowerHost host,
Vm vm)
Gets the power after allocation.
|
protected List<Map<String,Object>> |
getSavedAllocation()
Gets the saved allocation.
|
protected List<PowerHost> |
getSwitchedOffHosts()
Gets the switched off host.
|
Map<Integer,List<Double>> |
getTimeHistory()
Gets the time history.
|
protected PowerHost |
getUnderUtilizedHost(Set<? extends Host> excludedHosts)
Gets the under utilized host.
|
Map<Integer,List<Double>> |
getUtilizationHistory()
Gets the utilization history.
|
protected PowerVmSelectionPolicy |
getVmSelectionPolicy()
Gets the vm selection policy.
|
protected List<? extends Vm> |
getVmsToMigrateFromHosts(List<PowerHostUtilizationHistory> overUtilizedHosts)
Gets the vms to migrate from hosts.
|
protected List<? extends Vm> |
getVmsToMigrateFromUnderUtilizedHost(PowerHost host)
Gets the vms to migrate from under utilized host.
|
protected abstract boolean |
isHostOverUtilized(PowerHost host)
Checks if is host over utilized.
|
protected boolean |
isHostOverUtilizedAfterAllocation(PowerHost host,
Vm vm)
Checks if is host over utilized after allocation.
|
List<Map<String,Object>> |
optimizeAllocation(List<? extends Vm> vmList)
Optimize allocation of the VMs according to current utilization.
|
protected void |
printOverUtilizedHosts(List<PowerHostUtilizationHistory> overUtilizedHosts)
Prints the over utilized hosts.
|
protected void |
restoreAllocation()
Restore allocation.
|
protected void |
saveAllocation()
Save allocation.
|
protected void |
setVmSelectionPolicy(PowerVmSelectionPolicy vmSelectionPolicy)
Sets the vm selection policy.
|
allocateHostForVm, allocateHostForVm, deallocateHostForVm, getHost, getHost, getVmTablegetHostList, setHostListpublic PowerVmAllocationPolicyMigrationAbstract(List<? extends Host> hostList, PowerVmSelectionPolicy vmSelectionPolicy)
hostList - the host listvmSelectionPolicy - the vm selection policypublic List<Map<String,Object>> optimizeAllocation(List<? extends Vm> vmList)
optimizeAllocation in class VmAllocationPolicyvmList - the vm listprotected List<Map<String,Object>> getMigrationMapFromUnderUtilizedHosts(List<PowerHostUtilizationHistory> overUtilizedHosts)
overUtilizedHosts - the over utilized hostsprotected void printOverUtilizedHosts(List<PowerHostUtilizationHistory> overUtilizedHosts)
overUtilizedHosts - the over utilized hostspublic PowerHost findHostForVm(Vm vm, Set<? extends Host> excludedHosts)
vm - the vmexcludedHosts - the excluded hostsprotected boolean isHostOverUtilizedAfterAllocation(PowerHost host, Vm vm)
host - the hostvm - the vmpublic PowerHost findHostForVm(Vm vm)
findHostForVm in class PowerVmAllocationPolicyAbstractvm - the vmprotected List<PowerHost> extractHostListFromMigrationMap(List<Map<String,Object>> migrationMap)
migrationMap - the migration mapprotected List<Map<String,Object>> getNewVmPlacement(List<? extends Vm> vmsToMigrate, Set<? extends Host> excludedHosts)
vmsToMigrate - the vms to migrateexcludedHosts - the excluded hostsprotected List<Map<String,Object>> getNewVmPlacementFromUnderUtilizedHost(List<? extends Vm> vmsToMigrate, Set<? extends Host> excludedHosts)
vmsToMigrate - the vms to migrateexcludedHosts - the excluded hostsprotected List<? extends Vm> getVmsToMigrateFromHosts(List<PowerHostUtilizationHistory> overUtilizedHosts)
overUtilizedHosts - the over utilized hostsprotected List<? extends Vm> getVmsToMigrateFromUnderUtilizedHost(PowerHost host)
host - the hostprotected List<PowerHostUtilizationHistory> getOverUtilizedHosts()
protected List<PowerHost> getSwitchedOffHosts()
protected PowerHost getUnderUtilizedHost(Set<? extends Host> excludedHosts)
excludedHosts - the excluded hostsprotected boolean areAllVmsMigratingOutOrAnyVmMigratingIn(PowerHost host)
host - the hostprotected abstract boolean isHostOverUtilized(PowerHost host)
host - the hostprotected void addHistoryEntry(HostDynamicWorkload host, double metric)
host - the hostmetric - the metricprotected void saveAllocation()
protected void restoreAllocation()
protected double getPowerAfterAllocation(PowerHost host, Vm vm)
host - the hostvm - the vmprotected double getMaxUtilizationAfterAllocation(PowerHost host, Vm vm)
host - the hostvm - the vmprotected List<Map<String,Object>> getSavedAllocation()
protected void setVmSelectionPolicy(PowerVmSelectionPolicy vmSelectionPolicy)
vmSelectionPolicy - the new vm selection policyprotected PowerVmSelectionPolicy getVmSelectionPolicy()
public Map<Integer,List<Double>> getUtilizationHistory()
public Map<Integer,List<Double>> getMetricHistory()
public Map<Integer,List<Double>> getTimeHistory()
public List<Double> getExecutionTimeHistoryVmSelection()
public List<Double> getExecutionTimeHistoryHostSelection()
public List<Double> getExecutionTimeHistoryVmReallocation()
Copyright © 2012 The Cloud Computing and Distributed Systems (CLOUDS) Laboratory, The University of Melbourne. All Rights Reserved.