Commit 9006b427 authored by Anton Beloglazov's avatar Anton Beloglazov

Added power examples using the PlanetLab workload

parent 262b52ea
...@@ -10,7 +10,7 @@ public class Constants { ...@@ -10,7 +10,7 @@ public class Constants {
public final static boolean OUTPUT_CSV = false; public final static boolean OUTPUT_CSV = false;
public final static double SCHEDULING_INTERVAL = 300; public final static double SCHEDULING_INTERVAL = 300;
public final static double SIMULATION_LIMIT = 24 * 60 * 10; public final static double SIMULATION_LIMIT = 24 * 60;
public final static int CLOUDLET_LENGTH = 2500 * (int) SIMULATION_LIMIT; public final static int CLOUDLET_LENGTH = 2500 * (int) SIMULATION_LIMIT;
public final static int CLOUDLET_PES = 1; public final static int CLOUDLET_PES = 1;
......
...@@ -2,22 +2,47 @@ package org.cloudbus.cloudsim.examples.power.planetlab; ...@@ -2,22 +2,47 @@ package org.cloudbus.cloudsim.examples.power.planetlab;
import java.io.IOException; import java.io.IOException;
import org.cloudbus.cloudsim.examples.power.RunnerAbstract; /**
* A simulation of a heterogeneous power aware data center that only applied DVFS, but no dynamic
public class Dvfs extends RunnerAbstract { * optimization of the VM allocation. The adjustment of the hosts' power consumption according to
* their CPU utilization is happening in the PowerDatacenter class.
*
* This example uses a real PlanetLab workload: 20110303.
*
* The remaining configuration parameters are in the Constants and PlanetLabConstants classes.
*
* If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:
*
* Anton Beloglazov, and Rajkumar Buyya, "Optimal Online Deterministic Algorithms and Adaptive
* Heuristics for Energy and Performance Efficient Dynamic Consolidation of Virtual Machines in
* Cloud Data Centers", Concurrency and Computation: Practice and Experience, ISSN: 1532-0626, Wiley
* Press, New York, USA, 2011, DOI: 10.1002/cpe.1867
*
* @author Anton Beloglazov
* @since Jan 5, 2012
*/
public class Dvfs {
/**
* The main method.
*
* @param args the arguments
* @throws IOException Signals that an I/O exception has occurred.
*/
public static void main(String[] args) throws IOException { public static void main(String[] args) throws IOException {
boolean enableOutput = true; boolean enableOutput = true;
String inputFolder = "workload/planetlab"; boolean outputToFile = false;
String inputFolder = Dvfs.class.getClassLoader().getResource("workload/planetlab").getPath();
String outputFolder = "output"; String outputFolder = "output";
String workload = "20110303"; String workload = "20110303"; // PlanetLab workload
String vmAllocationPolicy = "dvfs"; String vmAllocationPolicy = "dvfs"; // DVFS policy without VM migrations
String vmSelectionPolicy = ""; String vmSelectionPolicy = "";
String parameter = ""; String parameter = "";
run( new PlanetLabRunner(
enableOutput, enableOutput,
false, outputToFile,
inputFolder, inputFolder,
outputFolder, outputFolder,
workload, workload,
......
...@@ -2,20 +2,51 @@ package org.cloudbus.cloudsim.examples.power.planetlab; ...@@ -2,20 +2,51 @@ package org.cloudbus.cloudsim.examples.power.planetlab;
import java.io.IOException; import java.io.IOException;
import org.cloudbus.cloudsim.examples.power.RunnerAbstract; /**
* A simulation of a heterogeneous power aware data center that applies the Inter Quartile Range
public class IqrMc extends RunnerAbstract { * (IQR) VM allocation policy and Maximum Correlation (MC) VM selection policy.
*
* This example uses a real PlanetLab workload: 20110303.
*
* The remaining configuration parameters are in the Constants and PlanetLabConstants classes.
*
* If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:
*
* Anton Beloglazov, and Rajkumar Buyya, "Optimal Online Deterministic Algorithms and Adaptive
* Heuristics for Energy and Performance Efficient Dynamic Consolidation of Virtual Machines in
* Cloud Data Centers", Concurrency and Computation: Practice and Experience, ISSN: 1532-0626, Wiley
* Press, New York, USA, 2011, DOI: 10.1002/cpe.1867
*
* @author Anton Beloglazov
* @since Jan 5, 2012
*/
public class IqrMc {
/**
* The main method.
*
* @param args the arguments
* @throws IOException Signals that an I/O exception has occurred.
*/
public static void main(String[] args) throws IOException { public static void main(String[] args) throws IOException {
boolean enableOutput = true; boolean enableOutput = true;
String inputFolder = "input"; boolean outputToFile = false;
String inputFolder = IqrMc.class.getClassLoader().getResource("workload/planetlab").getPath();
String outputFolder = "output"; String outputFolder = "output";
String workload = "20110303"; String workload = "20110303"; // PlanetLab workload
String vmAllocationPolicy = "iqr"; String vmAllocationPolicy = "iqr"; // Inter Quartile Range (IQR) VM allocation policy
String vmSelectionPolicy = "mc"; String vmSelectionPolicy = "mc"; // Maximum Correlation (MC) VM selection policy
String parameter = "1.0"; String parameter = "1.5"; // the safety parameter of the IQR policy
run(enableOutput, false, inputFolder, outputFolder, workload, vmAllocationPolicy, vmSelectionPolicy, new PlanetLabRunner(
enableOutput,
outputToFile,
inputFolder,
outputFolder,
workload,
vmAllocationPolicy,
vmSelectionPolicy,
parameter); parameter);
} }
......
package org.cloudbus.cloudsim.examples.power.planetlab;
import java.io.IOException;
/**
* A simulation of a heterogeneous power aware data center that applies the Inter Quartile Range
* (IQR) VM allocation policy and Minimum Migration Time (MMT) VM selection policy.
*
* This example uses a real PlanetLab workload: 20110303.
*
* The remaining configuration parameters are in the Constants and PlanetLabConstants classes.
*
* If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:
*
* Anton Beloglazov, and Rajkumar Buyya, "Optimal Online Deterministic Algorithms and Adaptive
* Heuristics for Energy and Performance Efficient Dynamic Consolidation of Virtual Machines in
* Cloud Data Centers", Concurrency and Computation: Practice and Experience, ISSN: 1532-0626, Wiley
* Press, New York, USA, 2011, DOI: 10.1002/cpe.1867
*
* @author Anton Beloglazov
* @since Jan 5, 2012
*/
public class IqrMmt {
/**
* The main method.
*
* @param args the arguments
* @throws IOException Signals that an I/O exception has occurred.
*/
public static void main(String[] args) throws IOException {
boolean enableOutput = true;
boolean outputToFile = false;
String inputFolder = IqrMmt.class.getClassLoader().getResource("workload/planetlab").getPath();
String outputFolder = "output";
String workload = "20110303"; // PlanetLab workload
String vmAllocationPolicy = "iqr"; // Inter Quartile Range (IQR) VM allocation policy
String vmSelectionPolicy = "mmt"; // Minimum Migration Time (MMT) VM selection policy
String parameter = "1.5"; // the safety parameter of the IQR policy
new PlanetLabRunner(
enableOutput,
outputToFile,
inputFolder,
outputFolder,
workload,
vmAllocationPolicy,
vmSelectionPolicy,
parameter);
}
}
package org.cloudbus.cloudsim.examples.power.planetlab;
import java.io.IOException;
/**
* A simulation of a heterogeneous power aware data center that applies the Inter Quartile Range
* (IQR) VM allocation policy and Minimum Utilization (MU) VM selection policy.
*
* This example uses a real PlanetLab workload: 20110303.
*
* The remaining configuration parameters are in the Constants and PlanetLabConstants classes.
*
* If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:
*
* Anton Beloglazov, and Rajkumar Buyya, "Optimal Online Deterministic Algorithms and Adaptive
* Heuristics for Energy and Performance Efficient Dynamic Consolidation of Virtual Machines in
* Cloud Data Centers", Concurrency and Computation: Practice and Experience, ISSN: 1532-0626, Wiley
* Press, New York, USA, 2011, DOI: 10.1002/cpe.1867
*
* @author Anton Beloglazov
* @since Jan 5, 2012
*/
public class IqrMu {
/**
* The main method.
*
* @param args the arguments
* @throws IOException Signals that an I/O exception has occurred.
*/
public static void main(String[] args) throws IOException {
boolean enableOutput = true;
boolean outputToFile = false;
String inputFolder = IqrMu.class.getClassLoader().getResource("workload/planetlab").getPath();
String outputFolder = "output";
String workload = "20110303"; // PlanetLab workload
String vmAllocationPolicy = "iqr"; // Inter Quartile Range (IQR) VM allocation policy
String vmSelectionPolicy = "mu"; // Minimum Utilization (MU) VM selection policy
String parameter = "1.5"; // the safety parameter of the IQR policy
new PlanetLabRunner(
enableOutput,
outputToFile,
inputFolder,
outputFolder,
workload,
vmAllocationPolicy,
vmSelectionPolicy,
parameter);
}
}
package org.cloudbus.cloudsim.examples.power.planetlab;
import java.io.IOException;
/**
* A simulation of a heterogeneous power aware data center that applies the Inter Quartile Range
* (IQR) VM allocation policy and Random Selection (RS) VM selection policy.
*
* This example uses a real PlanetLab workload: 20110303.
*
* The remaining configuration parameters are in the Constants and PlanetLabConstants classes.
*
* If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:
*
* Anton Beloglazov, and Rajkumar Buyya, "Optimal Online Deterministic Algorithms and Adaptive
* Heuristics for Energy and Performance Efficient Dynamic Consolidation of Virtual Machines in
* Cloud Data Centers", Concurrency and Computation: Practice and Experience, ISSN: 1532-0626, Wiley
* Press, New York, USA, 2011, DOI: 10.1002/cpe.1867
*
* @author Anton Beloglazov
* @since Jan 5, 2012
*/
public class IqrRs {
/**
* The main method.
*
* @param args the arguments
* @throws IOException Signals that an I/O exception has occurred.
*/
public static void main(String[] args) throws IOException {
boolean enableOutput = true;
boolean outputToFile = false;
String inputFolder = IqrRs.class.getClassLoader().getResource("workload/planetlab").getPath();
String outputFolder = "output";
String workload = "20110303"; // PlanetLab workload
String vmAllocationPolicy = "iqr"; // Inter Quartile Range (IQR) VM allocation policy
String vmSelectionPolicy = "rs"; // Random Selection (RS) VM selection policy
String parameter = "1.5"; // the safety parameter of the IQR policy
new PlanetLabRunner(
enableOutput,
outputToFile,
inputFolder,
outputFolder,
workload,
vmAllocationPolicy,
vmSelectionPolicy,
parameter);
}
}
package org.cloudbus.cloudsim.examples.power.planetlab;
import java.io.IOException;
/**
* A simulation of a heterogeneous power aware data center that applies the Local Regression (LR) VM
* allocation policy and Maximum Correlation (MC) VM selection policy.
*
* This example uses a real PlanetLab workload: 20110303.
*
* The remaining configuration parameters are in the Constants and PlanetLabConstants classes.
*
* If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:
*
* Anton Beloglazov, and Rajkumar Buyya, "Optimal Online Deterministic Algorithms and Adaptive
* Heuristics for Energy and Performance Efficient Dynamic Consolidation of Virtual Machines in
* Cloud Data Centers", Concurrency and Computation: Practice and Experience, ISSN: 1532-0626, Wiley
* Press, New York, USA, 2011, DOI: 10.1002/cpe.1867
*
* @author Anton Beloglazov
* @since Jan 5, 2012
*/
public class LrMc {
/**
* The main method.
*
* @param args the arguments
* @throws IOException Signals that an I/O exception has occurred.
*/
public static void main(String[] args) throws IOException {
boolean enableOutput = true;
boolean outputToFile = false;
String inputFolder = LrMc.class.getClassLoader().getResource("workload/planetlab").getPath();
String outputFolder = "output";
String workload = "20110303"; // PlanetLab workload
String vmAllocationPolicy = "lr"; // Local Regression (LR) VM allocation policy
String vmSelectionPolicy = "mc"; // Maximum Correlation (MC) VM selection policy
String parameter = "1.2"; // the safety parameter of the LR policy
new PlanetLabRunner(
enableOutput,
outputToFile,
inputFolder,
outputFolder,
workload,
vmAllocationPolicy,
vmSelectionPolicy,
parameter);
}
}
package org.cloudbus.cloudsim.examples.power.planetlab;
import java.io.IOException;
/**
* A simulation of a heterogeneous power aware data center that applies the Local Regression (LR) VM
* allocation policy and Minimum Migration Time (MMT) VM selection policy.
*
* This example uses a real PlanetLab workload: 20110303.
*
* The remaining configuration parameters are in the Constants and PlanetLabConstants classes.
*
* If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:
*
* Anton Beloglazov, and Rajkumar Buyya, "Optimal Online Deterministic Algorithms and Adaptive
* Heuristics for Energy and Performance Efficient Dynamic Consolidation of Virtual Machines in
* Cloud Data Centers", Concurrency and Computation: Practice and Experience, ISSN: 1532-0626, Wiley
* Press, New York, USA, 2011, DOI: 10.1002/cpe.1867
*
* @author Anton Beloglazov
* @since Jan 5, 2012
*/
public class LrMmt {
/**
* The main method.
*
* @param args the arguments
* @throws IOException Signals that an I/O exception has occurred.
*/
public static void main(String[] args) throws IOException {
boolean enableOutput = true;
boolean outputToFile = false;
String inputFolder = LrMmt.class.getClassLoader().getResource("workload/planetlab").getPath();
String outputFolder = "output";
String workload = "20110303"; // PlanetLab workload
String vmAllocationPolicy = "lr"; // Local Regression (LR) VM allocation policy
String vmSelectionPolicy = "mmt"; // Minimum Migration Time (MMT) VM selection policy
String parameter = "1.2"; // the safety parameter of the LR policy
new PlanetLabRunner(
enableOutput,
outputToFile,
inputFolder,
outputFolder,
workload,
vmAllocationPolicy,
vmSelectionPolicy,
parameter);
}
}
package org.cloudbus.cloudsim.examples.power.planetlab;
import java.io.IOException;
/**
* A simulation of a heterogeneous power aware data center that applies the Local Regression (LR) VM
* allocation policy and Minimum Utilization (MU) VM selection policy.
*
* This example uses a real PlanetLab workload: 20110303.
*
* The remaining configuration parameters are in the Constants and PlanetLabConstants classes.
*
* If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:
*
* Anton Beloglazov, and Rajkumar Buyya, "Optimal Online Deterministic Algorithms and Adaptive
* Heuristics for Energy and Performance Efficient Dynamic Consolidation of Virtual Machines in
* Cloud Data Centers", Concurrency and Computation: Practice and Experience, ISSN: 1532-0626, Wiley
* Press, New York, USA, 2011, DOI: 10.1002/cpe.1867
*
* @author Anton Beloglazov
* @since Jan 5, 2012
*/
public class LrMu {
/**
* The main method.
*
* @param args the arguments
* @throws IOException Signals that an I/O exception has occurred.
*/
public static void main(String[] args) throws IOException {
boolean enableOutput = true;
boolean outputToFile = false;
String inputFolder = LrMu.class.getClassLoader().getResource("workload/planetlab").getPath();
String outputFolder = "output";
String workload = "20110303"; // PlanetLab workload
String vmAllocationPolicy = "lr"; // Local Regression (LR) VM allocation policy
String vmSelectionPolicy = "mu"; // Minimum Utilization (MU) VM selection policy
String parameter = "1.2"; // the safety parameter of the LR policy
new PlanetLabRunner(
enableOutput,
outputToFile,
inputFolder,
outputFolder,
workload,
vmAllocationPolicy,
vmSelectionPolicy,
parameter);
}
}
package org.cloudbus.cloudsim.examples.power.planetlab;
import java.io.IOException;
/**
* A simulation of a heterogeneous power aware data center that applies the Local Regression (LR) VM
* allocation policy and Random Selection (RS) VM selection policy.
*
* This example uses a real PlanetLab workload: 20110303.
*
* The remaining configuration parameters are in the Constants and PlanetLabConstants classes.
*
* If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:
*
* Anton Beloglazov, and Rajkumar Buyya, "Optimal Online Deterministic Algorithms and Adaptive
* Heuristics for Energy and Performance Efficient Dynamic Consolidation of Virtual Machines in
* Cloud Data Centers", Concurrency and Computation: Practice and Experience, ISSN: 1532-0626, Wiley
* Press, New York, USA, 2011, DOI: 10.1002/cpe.1867
*
* @author Anton Beloglazov
* @since Jan 5, 2012
*/
public class LrRs {
/**
* The main method.
*
* @param args the arguments
* @throws IOException Signals that an I/O exception has occurred.
*/
public static void main(String[] args) throws IOException {
boolean enableOutput = true;
boolean outputToFile = false;
String inputFolder = LrRs.class.getClassLoader().getResource("workload/planetlab").getPath();
String outputFolder = "output";
String workload = "20110303"; // PlanetLab workload
String vmAllocationPolicy = "lr"; // Local Regression (LR) VM allocation policy
String vmSelectionPolicy = "rs"; // Random Selection (RS) VM selection policy
String parameter = "1.2"; // the safety parameter of the LR policy
new PlanetLabRunner(
enableOutput,
outputToFile,
inputFolder,
outputFolder,
workload,
vmAllocationPolicy,
vmSelectionPolicy,
parameter);
}
}
...@@ -2,21 +2,52 @@ package org.cloudbus.cloudsim.examples.power.planetlab; ...@@ -2,21 +2,52 @@ package org.cloudbus.cloudsim.examples.power.planetlab;
import java.io.IOException; import java.io.IOException;
import org.cloudbus.cloudsim.examples.power.RunnerAbstract; /**
* A simulation of a heterogeneous power aware data center that applies the Local Regression Robust
public class LrrMc extends RunnerAbstract { * (LRR) VM allocation policy and Maximum Correlation (MC) VM selection policy.
*
* This example uses a real PlanetLab workload: 20110303.
*
* The remaining configuration parameters are in the Constants and PlanetLabConstants classes.
*
* If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:
*
* Anton Beloglazov, and Rajkumar Buyya, "Optimal Online Deterministic Algorithms and Adaptive
* Heuristics for Energy and Performance Efficient Dynamic Consolidation of Virtual Machines in
* Cloud Data Centers", Concurrency and Computation: Practice and Experience, ISSN: 1532-0626, Wiley
* Press, New York, USA, 2011, DOI: 10.1002/cpe.1867
*
* @author Anton Beloglazov
* @since Jan 5, 2012
*/
public class LrrMc {
/**
* The main method.
*
* @param args the arguments
* @throws IOException Signals that an I/O exception has occurred.
*/
public static void main(String[] args) throws IOException { public static void main(String[] args) throws IOException {
boolean enableOutput = true; boolean enableOutput = true;
String inputFolder = "input"; boolean outputToFile = false;
String inputFolder = LrrMc.class.getClassLoader().getResource("workload/planetlab").getPath();
String outputFolder = "output"; String outputFolder = "output";
String workload = "20110303"; String workload = "20110303"; // PlanetLab workload
String vmAllocationPolicy = "lrr"; String vmAllocationPolicy = "lrr"; // Local Regression Robust (LRR) VM allocation policy
String vmSelectionPolicy = "mc"; String vmSelectionPolicy = "mc"; // Maximum Correlation (MC) VM selection policy
String parameter = "1.5"; String parameter = "1.2"; // the safety parameter of the LRR policy
run(enableOutput, false, inputFolder, outputFolder, workload, vmAllocationPolicy, vmSelectionPolicy, new PlanetLabRunner(
enableOutput,
outputToFile,
inputFolder,
outputFolder,
workload,
vmAllocationPolicy,
vmSelectionPolicy,
parameter); parameter);
} }
} }
\ No newline at end of file
package org.cloudbus.cloudsim.examples.power.planetlab;
import java.io.IOException;
/**
* A simulation of a heterogeneous power aware data center that applies the Local Regression Robust
* (LRR) VM allocation policy and Minimum Migration Time (MMT) VM selection policy.
*
* This example uses a real PlanetLab workload: 20110303.
*
* The remaining configuration parameters are in the Constants and PlanetLabConstants classes.
*
* If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:
*
* Anton Beloglazov, and Rajkumar Buyya, "Optimal Online Deterministic Algorithms and Adaptive
* Heuristics for Energy and Performance Efficient Dynamic Consolidation of Virtual Machines in
* Cloud Data Centers", Concurrency and Computation: Practice and Experience, ISSN: 1532-0626, Wiley
* Press, New York, USA, 2011, DOI: 10.1002/cpe.1867
*
* @author Anton Beloglazov
* @since Jan 5, 2012
*/
public class LrrMmt {
/**
* The main method.
*
* @param args the arguments
* @throws IOException Signals that an I/O exception has occurred.
*/
public static void main(String[] args) throws IOException {
boolean enableOutput = true;
boolean outputToFile = false;
String inputFolder = LrrMmt.class.getClassLoader().getResource("workload/planetlab").getPath();
String outputFolder = "output";
String workload = "20110303"; // PlanetLab workload
String vmAllocationPolicy = "lrr"; // Local Regression Robust (LRR) VM allocation policy
String vmSelectionPolicy = "mmt"; // Minimum Migration Time (MMT) VM selection policy
String parameter = "1.2"; // the safety parameter of the LRR policy
new PlanetLabRunner(
enableOutput,
outputToFile,
inputFolder,
outputFolder,
workload,
vmAllocationPolicy,
vmSelectionPolicy,
parameter);
}
}
package org.cloudbus.cloudsim.examples.power.planetlab;
import java.io.IOException;
/**
* A simulation of a heterogeneous power aware data center that applies the Local Regression Robust
* (LRR) VM allocation policy and Minimum Utilization (MU) VM selection policy.
*
* This example uses a real PlanetLab workload: 20110303.
*
* The remaining configuration parameters are in the Constants and PlanetLabConstants classes.
*
* If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:
*
* Anton Beloglazov, and Rajkumar Buyya, "Optimal Online Deterministic Algorithms and Adaptive
* Heuristics for Energy and Performance Efficient Dynamic Consolidation of Virtual Machines in
* Cloud Data Centers", Concurrency and Computation: Practice and Experience, ISSN: 1532-0626, Wiley
* Press, New York, USA, 2011, DOI: 10.1002/cpe.1867
*
* @author Anton Beloglazov
* @since Jan 5, 2012
*/
public class LrrMu {
/**
* The main method.
*
* @param args the arguments
* @throws IOException Signals that an I/O exception has occurred.
*/
public static void main(String[] args) throws IOException {
boolean enableOutput = true;
boolean outputToFile = false;
String inputFolder = LrrMu.class.getClassLoader().getResource("workload/planetlab").getPath();
String outputFolder = "output";
String workload = "20110303"; // PlanetLab workload
String vmAllocationPolicy = "lrr"; // Local Regression Robust (LRR) VM allocation policy
String vmSelectionPolicy = "mu"; // Minimum Utilization (MU) VM selection policy
String parameter = "1.2"; // the safety parameter of the LRR policy
new PlanetLabRunner(
enableOutput,
outputToFile,
inputFolder,
outputFolder,
workload,
vmAllocationPolicy,
vmSelectionPolicy,
parameter);
}
}
package org.cloudbus.cloudsim.examples.power.planetlab;
import java.io.IOException;
/**
* A simulation of a heterogeneous power aware data center that applies the Local Regression Robust
* (LRR) VM allocation policy and Random Selection (RS) VM selection policy.
*
* This example uses a real PlanetLab workload: 20110303.
*
* The remaining configuration parameters are in the Constants and PlanetLabConstants classes.
*
* If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:
*
* Anton Beloglazov, and Rajkumar Buyya, "Optimal Online Deterministic Algorithms and Adaptive
* Heuristics for Energy and Performance Efficient Dynamic Consolidation of Virtual Machines in
* Cloud Data Centers", Concurrency and Computation: Practice and Experience, ISSN: 1532-0626, Wiley
* Press, New York, USA, 2011, DOI: 10.1002/cpe.1867
*
* @author Anton Beloglazov
* @since Jan 5, 2012
*/
public class LrrRs {
/**
* The main method.
*
* @param args the arguments
* @throws IOException Signals that an I/O exception has occurred.
*/
public static void main(String[] args) throws IOException {
boolean enableOutput = true;
boolean outputToFile = false;
String inputFolder = LrrRs.class.getClassLoader().getResource("workload/planetlab").getPath();
String outputFolder = "output";
String workload = "20110303"; // PlanetLab workload
String vmAllocationPolicy = "lrr"; // Local Regression Robust (LRR) VM allocation policy
String vmSelectionPolicy = "rs"; // Random Selection (RS) VM selection policy
String parameter = "1.2"; // the safety parameter of the LRR policy
new PlanetLabRunner(
enableOutput,
outputToFile,
inputFolder,
outputFolder,
workload,
vmAllocationPolicy,
vmSelectionPolicy,
parameter);
}
}
package org.cloudbus.cloudsim.examples.power.planetlab;
import java.io.IOException;
import org.cloudbus.cloudsim.examples.power.RunnerAbstract;
public class Mad2Mc extends RunnerAbstract {
public static void main(String[] args) throws IOException {
boolean enableOutput = true;
String inputFolder = "input";
String outputFolder = "output";
String workload = "20110303";
String vmAllocationPolicy = "mad2";
String vmSelectionPolicy = "mc";
String parameter = "0.9";
run(enableOutput, false, inputFolder, outputFolder, workload, vmAllocationPolicy, vmSelectionPolicy,
parameter);
}
}
\ No newline at end of file
package org.cloudbus.cloudsim.examples.power.planetlab;
import java.io.IOException;
/**
* A simulation of a heterogeneous power aware data center that applies the Median Absolute
* Deviation (MAD) VM allocation policy and Maximum Correlation (MC) VM selection policy.
*
* This example uses a real PlanetLab workload: 20110303.
*
* The remaining configuration parameters are in the Constants and PlanetLabConstants classes.
*
* If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:
*
* Anton Beloglazov, and Rajkumar Buyya, "Optimal Online Deterministic Algorithms and Adaptive
* Heuristics for Energy and Performance Efficient Dynamic Consolidation of Virtual Machines in
* Cloud Data Centers", Concurrency and Computation: Practice and Experience, ISSN: 1532-0626, Wiley
* Press, New York, USA, 2011, DOI: 10.1002/cpe.1867
*
* @author Anton Beloglazov
* @since Jan 5, 2012
*/
public class MadMc {
/**
* The main method.
*
* @param args the arguments
* @throws IOException Signals that an I/O exception has occurred.
*/
public static void main(String[] args) throws IOException {
boolean enableOutput = true;
boolean outputToFile = false;
String inputFolder = MadMc.class.getClassLoader().getResource("workload/planetlab").getPath();
String outputFolder = "output";
String workload = "20110303"; // PlanetLab workload
String vmAllocationPolicy = "mad"; // Median Absolute Deviation (MAD) VM allocation policy
String vmSelectionPolicy = "mc"; // Maximum Correlation (MC) VM selection policy
String parameter = "2.5"; // the safety parameter of the MAD policy
new PlanetLabRunner(
enableOutput,
outputToFile,
inputFolder,
outputFolder,
workload,
vmAllocationPolicy,
vmSelectionPolicy,
parameter);
}
}
package org.cloudbus.cloudsim.examples.power.planetlab;
import java.io.IOException;
/**
* A simulation of a heterogeneous power aware data center that applies the Median Absolute
* Deviation (MAD) VM allocation policy and Minimum Migration Time (MMT) VM selection policy.
*
* This example uses a real PlanetLab workload: 20110303.
*
* The remaining configuration parameters are in the Constants and PlanetLabConstants classes.
*
* If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:
*
* Anton Beloglazov, and Rajkumar Buyya, "Optimal Online Deterministic Algorithms and Adaptive
* Heuristics for Energy and Performance Efficient Dynamic Consolidation of Virtual Machines in
* Cloud Data Centers", Concurrency and Computation: Practice and Experience, ISSN: 1532-0626, Wiley
* Press, New York, USA, 2011, DOI: 10.1002/cpe.1867
*
* @author Anton Beloglazov
* @since Jan 5, 2012
*/
public class MadMmt {
/**
* The main method.
*
* @param args the arguments
* @throws IOException Signals that an I/O exception has occurred.
*/
public static void main(String[] args) throws IOException {
boolean enableOutput = true;
boolean outputToFile = false;
String inputFolder = MadMmt.class.getClassLoader().getResource("workload/planetlab").getPath();
String outputFolder = "output";
String workload = "20110303"; // PlanetLab workload
String vmAllocationPolicy = "mad"; // Median Absolute Deviation (MAD) VM allocation policy
String vmSelectionPolicy = "mmt"; // Minimum Migration Time (MMT) VM selection policy
String parameter = "2.5"; // the safety parameter of the MAD policy
new PlanetLabRunner(
enableOutput,
outputToFile,
inputFolder,
outputFolder,
workload,
vmAllocationPolicy,
vmSelectionPolicy,
parameter);
}
}
package org.cloudbus.cloudsim.examples.power.planetlab;
import java.io.IOException;
/**
* A simulation of a heterogeneous power aware data center that applies the Median Absolute
* Deviation (MAD) VM allocation policy and Minimum Utilization (MU) VM selection policy.
*
* This example uses a real PlanetLab workload: 20110303.
*
* The remaining configuration parameters are in the Constants and PlanetLabConstants classes.
*
* If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:
*
* Anton Beloglazov, and Rajkumar Buyya, "Optimal Online Deterministic Algorithms and Adaptive
* Heuristics for Energy and Performance Efficient Dynamic Consolidation of Virtual Machines in
* Cloud Data Centers", Concurrency and Computation: Practice and Experience, ISSN: 1532-0626, Wiley
* Press, New York, USA, 2011, DOI: 10.1002/cpe.1867
*
* @author Anton Beloglazov
* @since Jan 5, 2012
*/
public class MadMu {
/**
* The main method.
*
* @param args the arguments
* @throws IOException Signals that an I/O exception has occurred.
*/
public static void main(String[] args) throws IOException {
boolean enableOutput = true;
boolean outputToFile = false;
String inputFolder = MadMu.class.getClassLoader().getResource("workload/planetlab").getPath();
String outputFolder = "output";
String workload = "20110303"; // PlanetLab workload
String vmAllocationPolicy = "mad"; // Median Absolute Deviation (MAD) VM allocation policy
String vmSelectionPolicy = "mu"; // Minimum Utilization (MU) VM selection policy
String parameter = "2.5"; // the safety parameter of the MAD policy
new PlanetLabRunner(
enableOutput,
outputToFile,
inputFolder,
outputFolder,
workload,
vmAllocationPolicy,
vmSelectionPolicy,
parameter);
}
}
package org.cloudbus.cloudsim.examples.power.planetlab;
import java.io.IOException;
/**
* A simulation of a heterogeneous power aware data center that applies the Median Absolute
* Deviation (MAD) VM allocation policy and Random Selection (RS) VM selection policy.
*
* This example uses a real PlanetLab workload: 20110303.
*
* The remaining configuration parameters are in the Constants and PlanetLabConstants classes.
*
* If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:
*
* Anton Beloglazov, and Rajkumar Buyya, "Optimal Online Deterministic Algorithms and Adaptive
* Heuristics for Energy and Performance Efficient Dynamic Consolidation of Virtual Machines in
* Cloud Data Centers", Concurrency and Computation: Practice and Experience, ISSN: 1532-0626, Wiley
* Press, New York, USA, 2011, DOI: 10.1002/cpe.1867
*
* @author Anton Beloglazov
* @since Jan 5, 2012
*/
public class MadRs {
/**
* The main method.
*
* @param args the arguments
* @throws IOException Signals that an I/O exception has occurred.
*/
public static void main(String[] args) throws IOException {
boolean enableOutput = true;
boolean outputToFile = false;
String inputFolder = MadRs.class.getClassLoader().getResource("workload/planetlab").getPath();
String outputFolder = "output";
String workload = "20110303"; // PlanetLab workload
String vmAllocationPolicy = "mad"; // Median Absolute Deviation (MAD) VM allocation policy
String vmSelectionPolicy = "rs"; // Random Selection (RS) VM selection policy
String parameter = "2.5"; // the safety parameter of the MAD policy
new PlanetLabRunner(
enableOutput,
outputToFile,
inputFolder,
outputFolder,
workload,
vmAllocationPolicy,
vmSelectionPolicy,
parameter);
}
}
...@@ -15,12 +15,38 @@ import org.cloudbus.cloudsim.power.PowerDatacenterNonPowerAware; ...@@ -15,12 +15,38 @@ import org.cloudbus.cloudsim.power.PowerDatacenterNonPowerAware;
import org.cloudbus.cloudsim.power.PowerHost; import org.cloudbus.cloudsim.power.PowerHost;
import org.cloudbus.cloudsim.power.PowerVmAllocationPolicySimple; import org.cloudbus.cloudsim.power.PowerVmAllocationPolicySimple;
/**
* A simulation of a heterogeneous non-power aware data center: all hosts consume maximum power all
* the time.
*
* This example uses a real PlanetLab workload: 20110303.
*
* The remaining configuration parameters are in the Constants and PlanetLabConstants classes.
*
* If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:
*
* Anton Beloglazov, and Rajkumar Buyya, "Optimal Online Deterministic Algorithms and Adaptive
* Heuristics for Energy and Performance Efficient Dynamic Consolidation of Virtual Machines in
* Cloud Data Centers", Concurrency and Computation: Practice and Experience, ISSN: 1532-0626, Wiley
* Press, New York, USA, 2011, DOI: 10.1002/cpe.1867
*
* @author Anton Beloglazov
* @since Jan 5, 2012
*/
public class NonPowerAware { public class NonPowerAware {
/**
* The main method.
*
* @param args the arguments
* @throws IOException Signals that an I/O exception has occurred.
*/
public static void main(String[] args) throws IOException { public static void main(String[] args) throws IOException {
String experimentName = "npa"; String experimentName = "planetlab_npa";
String outputFolder = "output"; String outputFolder = "output";
String inputFolder = "input"; String inputFolder = NonPowerAware.class.getClassLoader().getResource("workload/planetlab/20110303")
.getPath();
Log.setDisabled(!Constants.ENABLE_OUTPUT); Log.setDisabled(!Constants.ENABLE_OUTPUT);
Log.printLine("Starting " + experimentName); Log.printLine("Starting " + experimentName);
...@@ -33,7 +59,7 @@ public class NonPowerAware { ...@@ -33,7 +59,7 @@ public class NonPowerAware {
List<Cloudlet> cloudletList = PlanetLabHelper.createCloudletListPlanetLab(brokerId, inputFolder); List<Cloudlet> cloudletList = PlanetLabHelper.createCloudletListPlanetLab(brokerId, inputFolder);
List<Vm> vmList = Helper.createVmList(brokerId, cloudletList.size()); List<Vm> vmList = Helper.createVmList(brokerId, cloudletList.size());
List<PowerHost> hostList = Helper.createHostList(cloudletList.size() / 2); List<PowerHost> hostList = Helper.createHostList(PlanetLabConstants.NUMBER_OF_HOSTS);
PowerDatacenterNonPowerAware datacenter = (PowerDatacenterNonPowerAware) Helper.createDatacenter( PowerDatacenterNonPowerAware datacenter = (PowerDatacenterNonPowerAware) Helper.createDatacenter(
"Datacenter", "Datacenter",
...@@ -46,6 +72,7 @@ public class NonPowerAware { ...@@ -46,6 +72,7 @@ public class NonPowerAware {
broker.submitVmList(vmList); broker.submitVmList(vmList);
broker.submitCloudletList(cloudletList); broker.submitCloudletList(cloudletList);
CloudSim.terminateSimulation(Constants.SIMULATION_LIMIT);
double lastClock = CloudSim.startSimulation(); double lastClock = CloudSim.startSimulation();
List<Cloudlet> newList = broker.getCloudletReceivedList(); List<Cloudlet> newList = broker.getCloudletReceivedList();
...@@ -63,7 +90,8 @@ public class NonPowerAware { ...@@ -63,7 +90,8 @@ public class NonPowerAware {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
Log.printLine("Unwanted errors happen"); Log.printLine("The simulation has been terminated due to an unexpected error");
System.exit(0);
} }
Log.printLine("Finished " + experimentName); Log.printLine("Finished " + experimentName);
......
...@@ -74,6 +74,7 @@ public class PlanetLabRunner extends RunnerAbstract { ...@@ -74,6 +74,7 @@ public class PlanetLabRunner extends RunnerAbstract {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
Log.printLine("The simulation has been terminated due to an unexpected error"); Log.printLine("The simulation has been terminated due to an unexpected error");
System.exit(0);
} }
} }
......
package org.cloudbus.cloudsim.examples.power.planetlab;
import java.io.IOException;
/**
* A simulation of a heterogeneous power aware data center that applies the Static Threshold (THR)
* VM allocation policy and Maximum Correlation (MC) VM selection policy.
*
* This example uses a real PlanetLab workload: 20110303.
*
* The remaining configuration parameters are in the Constants and PlanetLabConstants classes.
*
* If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:
*
* Anton Beloglazov, and Rajkumar Buyya, "Optimal Online Deterministic Algorithms and Adaptive
* Heuristics for Energy and Performance Efficient Dynamic Consolidation of Virtual Machines in
* Cloud Data Centers", Concurrency and Computation: Practice and Experience, ISSN: 1532-0626, Wiley
* Press, New York, USA, 2011, DOI: 10.1002/cpe.1867
*
* @author Anton Beloglazov
* @since Jan 5, 2012
*/
public class ThrMc {
/**
* The main method.
*
* @param args the arguments
* @throws IOException Signals that an I/O exception has occurred.
*/
public static void main(String[] args) throws IOException {
boolean enableOutput = true;
boolean outputToFile = false;
String inputFolder = NonPowerAware.class.getClassLoader().getResource("workload/planetlab").getPath();
String outputFolder = "output";
String workload = "20110303"; // PlanetLab workload
String vmAllocationPolicy = "thr"; // Static Threshold (THR) VM allocation policy
String vmSelectionPolicy = "mc"; // Maximum Correlation (MC) VM selection policy
String parameter = "0.8"; // the static utilization threshold
new PlanetLabRunner(
enableOutput,
outputToFile,
inputFolder,
outputFolder,
workload,
vmAllocationPolicy,
vmSelectionPolicy,
parameter);
}
}
package org.cloudbus.cloudsim.examples.power.planetlab;
import java.io.IOException;
/**
* A simulation of a heterogeneous power aware data center that applies the Static Threshold (THR)
* VM allocation policy and Minimum Migration Time (MMT) VM selection policy.
*
* This example uses a real PlanetLab workload: 20110303.
*
* The remaining configuration parameters are in the Constants and PlanetLabConstants classes.
*
* If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:
*
* Anton Beloglazov, and Rajkumar Buyya, "Optimal Online Deterministic Algorithms and Adaptive
* Heuristics for Energy and Performance Efficient Dynamic Consolidation of Virtual Machines in
* Cloud Data Centers", Concurrency and Computation: Practice and Experience, ISSN: 1532-0626, Wiley
* Press, New York, USA, 2011, DOI: 10.1002/cpe.1867
*
* @author Anton Beloglazov
* @since Jan 5, 2012
*/
public class ThrMmt {
/**
* The main method.
*
* @param args the arguments
* @throws IOException Signals that an I/O exception has occurred.
*/
public static void main(String[] args) throws IOException {
boolean enableOutput = true;
boolean outputToFile = false;
String inputFolder = NonPowerAware.class.getClassLoader().getResource("workload/planetlab").getPath();
String outputFolder = "output";
String workload = "20110303"; // PlanetLab workload
String vmAllocationPolicy = "thr"; // Static Threshold (THR) VM allocation policy
String vmSelectionPolicy = "mmt"; // Minimum Migration Time (MMT) VM selection policy
String parameter = "0.8"; // the static utilization threshold
new PlanetLabRunner(
enableOutput,
outputToFile,
inputFolder,
outputFolder,
workload,
vmAllocationPolicy,
vmSelectionPolicy,
parameter);
}
}
package org.cloudbus.cloudsim.examples.power.planetlab;
import java.io.IOException;
/**
* A simulation of a heterogeneous power aware data center that applies the Static Threshold (THR)
* VM allocation policy and Minimum Utilization (MU) VM selection policy.
*
* This example uses a real PlanetLab workload: 20110303.
*
* The remaining configuration parameters are in the Constants and PlanetLabConstants classes.
*
* If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:
*
* Anton Beloglazov, and Rajkumar Buyya, "Optimal Online Deterministic Algorithms and Adaptive
* Heuristics for Energy and Performance Efficient Dynamic Consolidation of Virtual Machines in
* Cloud Data Centers", Concurrency and Computation: Practice and Experience, ISSN: 1532-0626, Wiley
* Press, New York, USA, 2011, DOI: 10.1002/cpe.1867
*
* @author Anton Beloglazov
* @since Jan 5, 2012
*/
public class ThrMu {
/**
* The main method.
*
* @param args the arguments
* @throws IOException Signals that an I/O exception has occurred.
*/
public static void main(String[] args) throws IOException {
boolean enableOutput = true;
boolean outputToFile = false;
String inputFolder = NonPowerAware.class.getClassLoader().getResource("workload/planetlab").getPath();
String outputFolder = "output";
String workload = "20110303"; // PlanetLab workload
String vmAllocationPolicy = "thr"; // Static Threshold (THR) VM allocation policy
String vmSelectionPolicy = "mu"; // Minimum Utilization (MU) VM selection policy
String parameter = "0.8"; // the static utilization threshold
new PlanetLabRunner(
enableOutput,
outputToFile,
inputFolder,
outputFolder,
workload,
vmAllocationPolicy,
vmSelectionPolicy,
parameter);
}
}
package org.cloudbus.cloudsim.examples.power.planetlab;
import java.io.IOException;
/**
* A simulation of a heterogeneous power aware data center that applies the Static Threshold (THR)
* VM allocation policy and Random Selection (RS) VM selection policy.
*
* This example uses a real PlanetLab workload: 20110303.
*
* The remaining configuration parameters are in the Constants and PlanetLabConstants classes.
*
* If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:
*
* Anton Beloglazov, and Rajkumar Buyya, "Optimal Online Deterministic Algorithms and Adaptive
* Heuristics for Energy and Performance Efficient Dynamic Consolidation of Virtual Machines in
* Cloud Data Centers", Concurrency and Computation: Practice and Experience, ISSN: 1532-0626, Wiley
* Press, New York, USA, 2011, DOI: 10.1002/cpe.1867
*
* @author Anton Beloglazov
* @since Jan 5, 2012
*/
public class ThrRs {
/**
* The main method.
*
* @param args the arguments
* @throws IOException Signals that an I/O exception has occurred.
*/
public static void main(String[] args) throws IOException {
boolean enableOutput = true;
boolean outputToFile = false;
String inputFolder = NonPowerAware.class.getClassLoader().getResource("workload/planetlab").getPath();
String outputFolder = "output";
String workload = "20110303"; // PlanetLab workload
String vmAllocationPolicy = "thr"; // Static Threshold (THR) VM allocation policy
String vmSelectionPolicy = "rs"; // Random Selection (RS) VM selection policy
String parameter = "0.8"; // the static utilization threshold
new PlanetLabRunner(
enableOutput,
outputToFile,
inputFolder,
outputFolder,
workload,
vmAllocationPolicy,
vmSelectionPolicy,
parameter);
}
}
...@@ -72,6 +72,7 @@ public class RandomRunner extends RunnerAbstract { ...@@ -72,6 +72,7 @@ public class RandomRunner extends RunnerAbstract {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
Log.printLine("The simulation has been terminated due to an unexpected error"); Log.printLine("The simulation has been terminated due to an unexpected error");
System.exit(0);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment