Commit a325c081 authored by Benardi's avatar Benardi
Browse files

Merge remote-tracking branch 'origin/sla-simulation' into energy_monitor

parents f411627d d6625530
......@@ -62,7 +62,7 @@ import org.cloudsimplus.slametrics.SlaMetricDimension;
*
*/
public class SlaExploitationSimulation {
public class SlaExploitationSimulation2Hosts {
private static String PATH = "/home/benardi/";
private static String FILEID;
......@@ -135,10 +135,10 @@ public class SlaExploitationSimulation {
"cloudletsTotalIops"+CLOUDLET_IOPS+"-"+
"vmIops"+VM_IOPS+"-"+
"migration"+MIGRATION_TIME;
new SlaExploitationSimulation();
new SlaExploitationSimulation2Hosts();
}
public SlaExploitationSimulation() {
public SlaExploitationSimulation2Hosts() {
this.simulation = new CloudSim(SCHEDULING_TIME);
int vmThreshold = MAX_VMS_ON_TIGHT_HOST/2 +1;
......@@ -244,6 +244,7 @@ public class SlaExploitationSimulation {
for (int i = 0; i < VMS; i++) {
Vm vm = new VmSimple(i, VM_MIPS, VM_PES).setRam(VM_RAM).setBw(VM_BW).setSize(VM_STORAGE)
.setIops(VM_IOPS).setCloudletScheduler(new CloudletSchedulerSpaceShared());
((VmSimple)vm).setInitialRequestedIops(VM_IOPS);
vm.setContract(contract);
vm.getUtilizationHistory().enable();
list.add(vm);
......
package org.cloudbus.cloudsim.examples.autonomic.simulations;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import org.cloudbus.cloudsim.allocationpolicies.VmAllocationPolicy;
import org.cloudbus.cloudsim.allocationpolicies.VmAllocationPolicyAbstract;
import org.cloudbus.cloudsim.allocationpolicies.VmAllocationPolicyInfoAware;
import org.cloudbus.cloudsim.allocationpolicies.VmAllocationPolicySimple;
import org.cloudbus.cloudsim.allocationpolicies.migration.VmAllocationPolicyMigrationSla;
import org.cloudbus.cloudsim.allocationpolicies.migration.VmAllocationPolicyMigrationSlaDynamicTightHost;
import org.cloudbus.cloudsim.brokers.DatacenterBroker;
import org.cloudbus.cloudsim.brokers.DatacenterBrokerSimple;
import org.cloudbus.cloudsim.cloudlets.Cloudlet;
import org.cloudbus.cloudsim.cloudlets.CloudletSimple;
import org.cloudbus.cloudsim.core.CloudSim;
import org.cloudbus.cloudsim.datacenters.Datacenter;
import org.cloudbus.cloudsim.datacenters.DatacenterSimple;
import org.cloudbus.cloudsim.hosts.Host;
import org.cloudbus.cloudsim.hosts.HostSimple;
import org.cloudbus.cloudsim.provisioners.PeProvisionerSimple;
import org.cloudbus.cloudsim.provisioners.ResourceProvisioner;
import org.cloudbus.cloudsim.provisioners.ResourceProvisionerShared;
import org.cloudbus.cloudsim.provisioners.ResourceProvisionerSimple;
import org.cloudbus.cloudsim.resources.Iops;
import org.cloudbus.cloudsim.resources.Pe;
import org.cloudbus.cloudsim.resources.PeSimple;
import org.cloudbus.cloudsim.schedulers.cloudlet.CloudletSchedulerSpaceShared;
import org.cloudbus.cloudsim.schedulers.cloudlet.CloudletSchedulerTimeShared;
import org.cloudbus.cloudsim.schedulers.vm.VmScheduler;
import org.cloudbus.cloudsim.schedulers.vm.VmSchedulerSpaceShared;
import org.cloudbus.cloudsim.schedulers.vm.VmSchedulerTimeShared;
import org.cloudbus.cloudsim.schedulers.vm.VmSchedulerTimeSharedOverSubscription;
import org.cloudbus.cloudsim.util.CsvGenerator;
import org.cloudbus.cloudsim.utilizationmodels.UtilizationModel;
import org.cloudbus.cloudsim.utilizationmodels.UtilizationModelAbsolute;
import org.cloudbus.cloudsim.utilizationmodels.UtilizationModelFull;
import org.cloudbus.cloudsim.utilizationmodels.UtilizationModelUneven;
import org.cloudbus.cloudsim.vms.Vm;
import org.cloudbus.cloudsim.vms.VmSimple;
import org.cloudsimplus.autoscaling.VerticalVmScaling;
import org.cloudsimplus.autoscaling.VerticalVmScalingSimple;
import org.cloudsimplus.autoscaling.resources.ResourceScalingInstantaneous;
import org.cloudsimplus.builders.tables.CloudletsTableBuilder;
import org.cloudsimplus.slametrics.SlaContract;
import org.cloudsimplus.slametrics.SlaMetric;
import org.cloudsimplus.slametrics.SlaMetricDimension;
/**
* In this experiment you can assess how the proportion
* between SLA Tight and SLA loose hosts (hell and heaven
* hosts) may affect the running time of a given batch workload.
*
* The main parameters are the number of hell and heaven hosts,
* the number of IOPS instructions a cloudlet will run, characteristics
* of the SLA, VMs, and Hosts.
* The utilization model generates a mean fragmentation level of
* 50% on the VMs (but can be changed on the creation of the cloudlets).
*
* @author eduardolfalcao
*
*/
public class SlaExploitationSimulation4Hosts {
private static String PATH;
private static String FILEID;
private static int SLA_TIGHT_HOSTS;
private static int SLA_LOOSE_HOSTS;
public static int HOST_IOPS;
public static long MINIMUM_IOPS;
public static double LOW_AVAILABILITY;
private static int VMS;
private static int CLOUDLETS;
private static int CLOUDLET_IOPS;
private static int VM_IOPS;
public static int MIGRATION_TIME;
private static boolean CONSOLIDATE;
private static int TIGHT_HOSTS_LIMIT;
public static final int SCHEDULING_TIME = 1;
private static final int MAX_VMS_ON_TIGHT_HOST = 4;
private static final int VM_THRESHOLD = MAX_VMS_ON_TIGHT_HOST/2 +1;
// HOST
private static final int HOST_PES = 2;
public static final int HOST_MIPS = 1000;
public static final int HOST_RAM = MAX_VMS_ON_TIGHT_HOST * 1024;
public static final int HOST_BW = 1000000;
public static final int HOST_BASE_STORAGE = 2 * 1024 * 1024;
// VM AND CLOUDLET
private static final int NUM_INSTR = 1;
private static final int VM_PES = 1;
private static final int VM_MIPS = 250;
private static final int VM_BW = 10000;
private static final int VM_RAM = 1024;
private static final int VM_STORAGE = 10 * 1024;
public static final double IMPRECISION = 0.0001;
private Datacenter datacenter;
private DatacenterBroker broker;
private final CloudSim simulation;
private List<Cloudlet> cloudletList;
private List<Vm> vmList;
private static Random random;
public static void main(String[] args) {
//PATH = args[0];
SLA_TIGHT_HOSTS = 0;
SLA_LOOSE_HOSTS = 4;
VM_IOPS = 100;
HOST_IOPS = 2*VM_IOPS;
LOW_AVAILABILITY = 99;
VMS = 8;
CLOUDLETS = VMS;
CLOUDLET_IOPS = 3 * 60 * 60 * VM_IOPS;
MIGRATION_TIME = 10;
CONSOLIDATE = true;
TIGHT_HOSTS_LIMIT = 1;
random = new Random(1);
//1000 migra pro inferno
//1001 migra de volta pro céu
FILEID = "tight"+SLA_TIGHT_HOSTS+"-"+
"loose"+SLA_LOOSE_HOSTS+"-"+
"hostIops"+HOST_IOPS+"-"+
"slaMinIops"+MINIMUM_IOPS+"-"+
"slaLowAvail"+LOW_AVAILABILITY+"-"+
"VmsNumber"+VMS+"-"+
"cloudletsNumber"+CLOUDLETS+"-"+
"cloudletsTotalIops"+CLOUDLET_IOPS+"-"+
"vmIops"+VM_IOPS+"-"+
"migration"+MIGRATION_TIME;
new SlaExploitationSimulation4Hosts();
}
public SlaExploitationSimulation4Hosts() {
this.simulation = new CloudSim(SCHEDULING_TIME);
VmAllocationPolicy allocationPolicy = new VmAllocationPolicySimple();
VmAllocationPolicyMigrationSlaDynamicTightHost allocationPolicyMigration = new VmAllocationPolicyMigrationSlaDynamicTightHost(allocationPolicy,
MIGRATION_TIME, SCHEDULING_TIME, VM_THRESHOLD, TIGHT_HOSTS_LIMIT, CONSOLIDATE);
this.datacenter = createDatacenter(allocationPolicyMigration);
allocationPolicyMigration.setDatacenter(datacenter);
allocationPolicy.setDatacenter(datacenter);
System.out.println(datacenter.getHostList().size());
broker = new DatacenterBrokerSimple(simulation);
SlaContract contract = this.createSlaContract(MINIMUM_IOPS, LOW_AVAILABILITY);
vmList = createVms(contract);
cloudletList = createCloudlets();
broker.submitVmList(vmList);
broker.submitCloudletList(cloudletList);
for(int i = 0; i < vmList.size();i++){
broker.bindCloudletToVm(cloudletList.get(i), vmList.get(i));
}
simulation.start();
final List<Cloudlet> finishedCloudlets = broker.getCloudletFinishedList();
new CloudletsTableBuilder(finishedCloudlets).build();
CsvGenerator.outputCloudletResults(PATH+"cloudlets-"+FILEID, finishedCloudlets);
CsvGenerator.outputSlaResults(PATH+"sla-"+FILEID, finishedCloudlets, (int) simulation.clock());
}
private SlaContract createSlaContract(long minimum_iops, double availability) {
SlaContract contract = new SlaContract();
SlaMetricDimension iopsMetricDimension = new SlaMetricDimension(minimum_iops);
iopsMetricDimension.setName("minValue");
SlaMetric iopsMetric = new SlaMetric("IOPSProvisioned");
iopsMetric.getDimensions().add(iopsMetricDimension);
contract.getMetrics().add(iopsMetric);
SlaMetricDimension availabilityMetricDimension = new SlaMetricDimension(availability);
availabilityMetricDimension.setName("minValue");
SlaMetric availabilityMetric = new SlaMetric("Availability");
availabilityMetric.getDimensions().add(availabilityMetricDimension);
contract.getMetrics().add(availabilityMetric);
return contract;
}
/**
* Creates a Datacenter and its Hosts.
*/
private Datacenter createDatacenter(VmAllocationPolicy vmAllocationpolicy) {
final List<Host> hosts = new ArrayList<Host>();
for(int i = 0; i < SLA_TIGHT_HOSTS; i++) {
Host host = createHosts(new ResourceProvisionerShared(), new VmSchedulerTimeShared());
hosts.add(host);
}
for(int i = 0; i < (SLA_LOOSE_HOSTS); i++) {
Host host = createHosts(new ResourceProvisionerSimple(), new VmSchedulerTimeShared());
hosts.add(host);
}
final Datacenter dc = new DatacenterSimple(simulation, hosts, vmAllocationpolicy, MIGRATION_TIME);
return dc;
}
private List<Pe> createPeList(int peNumber) {
List<Pe> peList = new ArrayList<Pe>(); // List of CPU cores
for (int i = 0; i < peNumber; i++) {
peList.add(new PeSimple(HOST_MIPS, new PeProvisionerSimple()));
}
return peList;
}
private Host createHosts(ResourceProvisioner iopsProvisioner, VmScheduler vmScheduler) {
List<Pe> peList = createPeList(HOST_PES);
ResourceProvisioner ramProvisioner = new ResourceProvisionerSimple();
ResourceProvisioner bwProvisioner = new ResourceProvisionerSimple();
Host host = new HostSimple(HOST_RAM, HOST_IOPS, HOST_BW, HOST_BASE_STORAGE, peList);
host.setIopsProvisioner(iopsProvisioner)
.setRamProvisioner(ramProvisioner)
.setBwProvisioner(bwProvisioner)
.setVmScheduler(vmScheduler);
host.enableStateHistory();
return host;
}
private List<Vm> createVms(SlaContract contract) {
final List<Vm> list = new ArrayList<Vm>(VMS);
for (int i = 0; i < VMS; i++) {
Vm vm = new VmSimple(i, VM_MIPS, VM_PES).setRam(VM_RAM).setBw(VM_BW).setSize(VM_STORAGE)
.setIops(VM_IOPS).setCloudletScheduler(new CloudletSchedulerSpaceShared());
((VmSimple)vm).setInitialRequestedIops(VM_IOPS);
vm.setContract(contract);
list.add(vm);
}
return list;
}
/**
* Creates a list of Cloudlets.
*/
private List<Cloudlet> createCloudlets() {
final List<Cloudlet> list = new ArrayList<>(CLOUDLETS);
UtilizationModel utilization = new UtilizationModelFull();
for (int i = 0; i < CLOUDLETS; i++) {
Cloudlet cloudlet = new CloudletSimple(i, NUM_INSTR, VM_PES).setFileSize(1000)
.setOutputSize(1000).setUtilizationModel(utilization)
.setUtilizationModelIops(new UtilizationModelAbsolute(VM_IOPS/2))
.setIops(CLOUDLET_IOPS);
list.add(cloudlet);
}
return list;
}
}
......@@ -5,9 +5,11 @@ import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Queue;
import org.cloudbus.cloudsim.allocationpolicies.VmAllocationPolicy;
import org.cloudbus.cloudsim.allocationpolicies.VmAllocationPolicyAbstract;
......@@ -17,6 +19,7 @@ import org.cloudbus.cloudsim.hosts.Host;
import org.cloudbus.cloudsim.provisioners.ResourceProvisionerShared;
import org.cloudbus.cloudsim.provisioners.ResourceProvisionerSimple;
import org.cloudbus.cloudsim.resources.Iops;
import org.cloudbus.cloudsim.util.Log;
import org.cloudbus.cloudsim.vms.Vm;
import org.cloudsimplus.autoscaling.VerticalVmScaling;
import org.cloudsimplus.autoscaling.VerticalVmScalingSimple;
......@@ -132,7 +135,7 @@ public class VmAllocationPolicyMigrationSla extends VmAllocationPolicyAbstract {
List<Vm> sufferingVms = new ArrayList<Vm>();
//FIXME sort to prioritize the VMs that are suffering more
sufferingVms.addAll(getVmsAboutToViolateSla(tightSlaHosts));
//for each heaven host
for (Host h : looseSlaHosts) {
if (sufferingVms.isEmpty()) {
......@@ -152,6 +155,28 @@ public class VmAllocationPolicyMigrationSla extends VmAllocationPolicyAbstract {
}
}
Queue<Host> inactiveHosts = getInactiveHosts(looseSlaHosts);
while(!sufferingVms.isEmpty() && !inactiveHosts.isEmpty()){
Host hostToBeTurnedOn = inactiveHosts.poll();
hostToBeTurnedOn.setActive(true);
Iterator<Vm> vmIterator = sufferingVms.iterator();
boolean keepHostOn = false;
while(vmIterator.hasNext()){
Vm vm = vmIterator.next();
if(hostToBeTurnedOn.isSuitableForVm(vm) && hostToBeTurnedOn.addMigratingInVm(vm)){
migrationMap.put(vm, hostToBeTurnedOn);
vmIterator.remove();
iopsScaling = VerticalVmScaling.NULL;
vm.setIopsVerticalScaling(iopsScaling);
iopsScaling.setVm(vm);
keepHostOn = true;
}
}
if(!keepHostOn){
hostToBeTurnedOn.setActive(false);
}
}
previousFragmentation.putAll(currentFragmentation);
return migrationMap;
......@@ -220,14 +245,14 @@ public class VmAllocationPolicyMigrationSla extends VmAllocationPolicyAbstract {
for (Host h : looseSlaHosts) {
for (Vm vm : h.getVmList()) {
System.out.println("#$#Heaven#$# vm id("+vm.getId()+"): "+vm.getMonitor().getCumulativeCredit(clock));
Log.printFormattedLine("Time %f: [Heaven Host %s] Vm %s has %f credits!", clock, h.getId(), vm.getId(), vm.getMonitor().getCumulativeCredit(clock));
// TODO (IF) Create method with code bellow
if(vm.isInMigration() && !isLooseHost(vm.gethostInMigration())){
continue;
}
if (vm.getMonitor().getCumulativeCredit(clock) - MIGRATION_TIME >= 0) {
// if (vm.getMonitor().getCumulativeCredit(clock) - MIGRATION_TIME >= 0) {
if (vm.getMonitor().getCumulativeCredit(clock) - MIGRATION_TIME - SCHEDULING_TIME >= 0) {
candidateVmsToMigrate.add(vm);
}
}
......@@ -255,12 +280,13 @@ public class VmAllocationPolicyMigrationSla extends VmAllocationPolicyAbstract {
protected List<Vm> getVmsAboutToViolateSla(List<Host> tightSlaHosts){
List<Vm> vmList = new ArrayList<Vm>();
final double clock = getDatacenter().getSimulation().clock();
final double clock = getDatacenter().getSimulation().clock();
for (Host h : tightSlaHosts) {
for (Vm vm : h.getVmList()) {
System.out.println("#$#Hell#$# vm id("+vm.getId()+"): "+vm.getMonitor().getCumulativeCredit(clock));
if (vm.getMonitor().getCumulativeCredit(clock) <= MIGRATION_TIME + SCHEDULING_TIME) {
Log.printFormattedLine("Time %f: [Hell Host %s] Vm %s has %f credits!", clock, h.getId(), vm.getId(), vm.getMonitor().getCumulativeCredit(clock));
if (vm.getMonitor().getCumulativeCredit(clock) <= MIGRATION_TIME) {
// if (vm.getMonitor().getCumulativeCredit(clock) <= MIGRATION_TIME + SCHEDULING_TIME) {
vmList.add(vm);
}
}
......@@ -319,6 +345,15 @@ public class VmAllocationPolicyMigrationSla extends VmAllocationPolicyAbstract {
return MIGRATION_TIME;
}
public Queue<Host> getInactiveHosts(List<Host> hosts){
Queue<Host> inactiveHosts = new LinkedList<>();
for(Host h : hosts){
if(!h.isActive())
inactiveHosts.offer(h);
}
return inactiveHosts;
}
/**
* Creates a {@link VerticalVmScaling} for scaling VM's IOPS when it's under or
* overloaded.
......
package org.cloudbus.cloudsim.allocationpolicies.migration;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
......@@ -9,6 +10,7 @@ import org.cloudbus.cloudsim.allocationpolicies.VmAllocationPolicy;
import org.cloudbus.cloudsim.hosts.Host;
import org.cloudbus.cloudsim.provisioners.ResourceProvisionerShared;
import org.cloudbus.cloudsim.schedulers.vm.VmSchedulerTimeShared;
import org.cloudbus.cloudsim.util.Log;
import org.cloudbus.cloudsim.vms.Vm;
/**
......@@ -36,33 +38,40 @@ public class VmAllocationPolicyMigrationSlaDynamicTightHost extends VmAllocation
private int limitTightHosts = 0;
private int currentTightHosts = 0;
private int currentMigrations = 0;
private boolean consolidate = false;
public VmAllocationPolicyMigrationSlaDynamicTightHost(VmAllocationPolicy allocationPolicy, int migrationTime, int schedulingTime, int vmThreshold, int limitTightHosts) {
super(allocationPolicy, migrationTime, schedulingTime);
setVmsThreshold(vmThreshold);
setLimitTightHosts(limitTightHosts);
}
public VmAllocationPolicyMigrationSlaDynamicTightHost(VmAllocationPolicy allocationPolicy, int migrationTime, int schedulingTime, int vmThreshold, int limitTightHosts, boolean consolidate) {
super(allocationPolicy, migrationTime, schedulingTime);
setVmsThreshold(vmThreshold);
setLimitTightHosts(limitTightHosts);
this.consolidate = consolidate;
}
@Override
public Map<Vm, Host> getOptimizedAllocationMap(
final List<? extends Vm> vmList) {
int numberCreditVms = getVmsWithEnoughCredit(getHostsWithLooseSla()).size();
System.out.println("Vms with credit in Heaven: "+numberCreditVms);
// Check if the number of vms with credit also consider the vms with credit that are
// in the Tight hosts (Check vms that are current migrating)
if(numberCreditVms >= getVmsThreshold() && currentTightHosts < getLimitTightHosts()) {
System.out.println("INFERNO!! "+getDatacenter().getSimulation().clock());
// The Tight host can be created
// Select the Loose host with more credit Vms
Host bestCandidateHost = getTightHostCandidate();
// Make it a Tight host
bestCandidateHost.setIopsProvisioner(new ResourceProvisionerShared());
Log.printFormattedLine("Time %f: [Host] %s had just became a HELL host!", getDatacenter().getSimulation().clock(), bestCandidateHost.getId());
reprovisionIopsForVmsInHell(bestCandidateHost);
// bestCandidateHost.setVmScheduler(new VmSchedulerTimeShared());
//bestCandidateHost.setVmScheduler(new VmSchedulerTimeShared());
// Increase the number of Tight hosts
currentTightHosts++;
}
......@@ -71,12 +80,12 @@ public class VmAllocationPolicyMigrationSlaDynamicTightHost extends VmAllocation
Map<Vm, Host> migrationMap = super.getOptimizedAllocationMap(vmList);
// Consolidate Loose hosts
migrationMap = gradualConsolidation(migrationMap);
if(consolidate)
migrationMap = gradualConsolidation(migrationMap);
if(!migrationMap.isEmpty()){
System.out.println(migrationMap);
if(!migrationMap.isEmpty()){
currentMigrations+= migrationMap.size();
System.out.println("#m# "+currentMigrations);
Log.printFormattedLine("Time %f; number of migrations %d: Some migrations will happen! MigrationMap: %s", getDatacenter().getSimulation().clock(), currentMigrations, migrationMap.toString());
}
return migrationMap;
......@@ -121,9 +130,9 @@ public class VmAllocationPolicyMigrationSlaDynamicTightHost extends VmAllocation
List<Host> orderedLooseHosts = getLooseHostsSortedAscendingByFragmentation();
for (int i = 0; i < orderedLooseHosts.size(); i++) {
for (int j = orderedLooseHosts.size() - 1; j >= 0; j--) {
if(i == j || orderedLooseHosts.get(i).getVmList().isEmpty())
for (int i = 0; i < orderedLooseHosts.size(); i++) {
for (int j = orderedLooseHosts.size() - 1; j >= 0; j--) {
if(i==j)
break;
for (Vm vm : orderedLooseHosts.get(i).getVmList()) {
if(orderedLooseHosts.get(j).isSuitableForVm(vm) && orderedLooseHosts.get(j).addMigratingInVm(vm)) {
......
......@@ -10,14 +10,17 @@ import org.cloudbus.cloudsim.cloudlets.CloudletExecution;
import org.cloudbus.cloudsim.core.events.SimEvent;
import org.cloudbus.cloudsim.core.events.PredicateType;
import org.cloudbus.cloudsim.network.IcmpPacket;
import org.cloudbus.cloudsim.provisioners.ResourceProvisionerSimple;
import org.cloudbus.cloudsim.util.Conversion;
import org.cloudbus.cloudsim.util.DataCloudTags;
import org.cloudbus.cloudsim.hosts.Host;
import org.cloudbus.cloudsim.hosts.HostSimple;
import org.cloudbus.cloudsim.util.Log;
import org.cloudbus.cloudsim.vms.Vm;
import org.cloudbus.cloudsim.cloudlets.Cloudlet;
import org.cloudbus.cloudsim.core.*;
import org.cloudbus.cloudsim.resources.File;
import org.cloudbus.cloudsim.resources.Iops;
import org.cloudbus.cloudsim.allocationpolicies.VmAllocationPolicy;
import org.cloudbus.cloudsim.schedulers.cloudlet.CloudletScheduler;
......@@ -504,6 +507,9 @@ public class DatacenterSimple extends CloudSimEntity implements Datacenter {
final Vm vm = entry.getKey();
final Host targetHost = entry.getValue();
// Not reserving IOPS for the VM before finishing migrating
//targetHost.getIopsProvisioner().allocateResourceForVm(vm, vm.getCurrentRequestedIops());
//Updates processing of all Hosts to get the latest state for all Hosts before migrating VMs
updateHostsProcessing();
......@@ -534,6 +540,20 @@ public class DatacenterSimple extends CloudSimEntity implements Datacenter {
Log.printFormattedLine("[Datacenter] %s allocation to the destination host failed!", vm);
}
turnOffEmptyHosts();
}
private void turnOffEmptyHosts(){
for(Host host : hostList){
HostSimple hs = (HostSimple) host;
if(hs.getIopsProvisioner() instanceof ResourceProvisionerSimple){