Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
G
gpucloudsim
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LPDS
gpucloudsim
Commits
9006b427
Commit
9006b427
authored
Jan 06, 2012
by
Anton Beloglazov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added power examples using the PlanetLab workload
parent
262b52ea
Show whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
1103 additions
and
54 deletions
+1103
-54
Constants.java
.../java/org/cloudbus/cloudsim/examples/power/Constants.java
+1
-1
Dvfs.java
.../org/cloudbus/cloudsim/examples/power/planetlab/Dvfs.java
+33
-8
IqrMc.java
...org/cloudbus/cloudsim/examples/power/planetlab/IqrMc.java
+40
-9
IqrMmt.java
...rg/cloudbus/cloudsim/examples/power/planetlab/IqrMmt.java
+53
-0
IqrMu.java
...org/cloudbus/cloudsim/examples/power/planetlab/IqrMu.java
+53
-0
IqrRs.java
...org/cloudbus/cloudsim/examples/power/planetlab/IqrRs.java
+53
-0
LrMc.java
.../org/cloudbus/cloudsim/examples/power/planetlab/LrMc.java
+53
-0
LrMmt.java
...org/cloudbus/cloudsim/examples/power/planetlab/LrMmt.java
+53
-0
LrMu.java
.../org/cloudbus/cloudsim/examples/power/planetlab/LrMu.java
+53
-0
LrRs.java
.../org/cloudbus/cloudsim/examples/power/planetlab/LrRs.java
+53
-0
LrrMc.java
...org/cloudbus/cloudsim/examples/power/planetlab/LrrMc.java
+41
-10
LrrMmt.java
...rg/cloudbus/cloudsim/examples/power/planetlab/LrrMmt.java
+53
-0
LrrMu.java
...org/cloudbus/cloudsim/examples/power/planetlab/LrrMu.java
+53
-0
LrrRs.java
...org/cloudbus/cloudsim/examples/power/planetlab/LrrRs.java
+53
-0
Mad2Mc.java
...rg/cloudbus/cloudsim/examples/power/planetlab/Mad2Mc.java
+0
-22
MadMc.java
...org/cloudbus/cloudsim/examples/power/planetlab/MadMc.java
+53
-0
MadMmt.java
...rg/cloudbus/cloudsim/examples/power/planetlab/MadMmt.java
+53
-0
MadMu.java
...org/cloudbus/cloudsim/examples/power/planetlab/MadMu.java
+53
-0
MadRs.java
...org/cloudbus/cloudsim/examples/power/planetlab/MadRs.java
+53
-0
NonPowerAware.java
...dbus/cloudsim/examples/power/planetlab/NonPowerAware.java
+32
-4
PlanetLabRunner.java
...us/cloudsim/examples/power/planetlab/PlanetLabRunner.java
+1
-0
ThrMc.java
...org/cloudbus/cloudsim/examples/power/planetlab/ThrMc.java
+53
-0
ThrMmt.java
...rg/cloudbus/cloudsim/examples/power/planetlab/ThrMmt.java
+53
-0
ThrMu.java
...org/cloudbus/cloudsim/examples/power/planetlab/ThrMu.java
+53
-0
ThrRs.java
...org/cloudbus/cloudsim/examples/power/planetlab/ThrRs.java
+53
-0
RandomRunner.java
...cloudbus/cloudsim/examples/power/random/RandomRunner.java
+1
-0
No files found.
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/Constants.java
View file @
9006b427
...
...
@@ -10,7 +10,7 @@ public class Constants {
public
final
static
boolean
OUTPUT_CSV
=
false
;
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_PES
=
1
;
...
...
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/planetlab/Dvfs.java
View file @
9006b427
...
...
@@ -2,22 +2,47 @@ package org.cloudbus.cloudsim.examples.power.planetlab;
import
java.io.IOException
;
import
org.cloudbus.cloudsim.examples.power.RunnerAbstract
;
public
class
Dvfs
extends
RunnerAbstract
{
/**
* A simulation of a heterogeneous power aware data center that only applied DVFS, but no dynamic
* 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
{
boolean
enableOutput
=
true
;
String
inputFolder
=
"workload/planetlab"
;
boolean
outputToFile
=
false
;
String
inputFolder
=
Dvfs
.
class
.
getClassLoader
().
getResource
(
"workload/planetlab"
).
getPath
();
String
outputFolder
=
"output"
;
String
workload
=
"20110303"
;
String
vmAllocationPolicy
=
"dvfs"
;
String
workload
=
"20110303"
;
// PlanetLab workload
String
vmAllocationPolicy
=
"dvfs"
;
// DVFS policy without VM migrations
String
vmSelectionPolicy
=
""
;
String
parameter
=
""
;
run
(
new
PlanetLabRunner
(
enableOutput
,
fals
e
,
outputToFil
e
,
inputFolder
,
outputFolder
,
workload
,
...
...
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/planetlab/IqrMc.java
View file @
9006b427
...
...
@@ -2,20 +2,51 @@ package org.cloudbus.cloudsim.examples.power.planetlab;
import
java.io.IOException
;
import
org.cloudbus.cloudsim.examples.power.RunnerAbstract
;
public
class
IqrMc
extends
RunnerAbstract
{
/**
* A simulation of a heterogeneous power aware data center that applies the Inter Quartile Range
* (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
{
boolean
enableOutput
=
true
;
String
inputFolder
=
"input"
;
boolean
outputToFile
=
false
;
String
inputFolder
=
IqrMc
.
class
.
getClassLoader
().
getResource
(
"workload/planetlab"
).
getPath
();
String
outputFolder
=
"output"
;
String
workload
=
"20110303"
;
String
vmAllocationPolicy
=
"iqr"
;
String
vmSelectionPolicy
=
"mc"
;
String
parameter
=
"1.
0"
;
String
workload
=
"20110303"
;
// PlanetLab workload
String
vmAllocationPolicy
=
"iqr"
;
// Inter Quartile Range (IQR) VM allocation policy
String
vmSelectionPolicy
=
"mc"
;
// Maximum Correlation (MC) VM selection policy
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
);
}
...
...
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/planetlab/IqrMmt.java
0 → 100644
View file @
9006b427
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
);
}
}
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/planetlab/IqrMu.java
0 → 100644
View file @
9006b427
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
);
}
}
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/planetlab/IqrRs.java
0 → 100644
View file @
9006b427
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
);
}
}
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/planetlab/LrMc.java
0 → 100644
View file @
9006b427
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
);
}
}
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/planetlab/LrMmt.java
0 → 100644
View file @
9006b427
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
);
}
}
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/planetlab/LrMu.java
0 → 100644
View file @
9006b427
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
);
}
}
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/planetlab/LrRs.java
0 → 100644
View file @
9006b427
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
);
}
}
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/planetlab/LrrMc.java
View file @
9006b427
...
...
@@ -2,20 +2,51 @@ package org.cloudbus.cloudsim.examples.power.planetlab;
import
java.io.IOException
;
import
org.cloudbus.cloudsim.examples.power.RunnerAbstract
;
public
class
LrrMc
extends
RunnerAbstract
{
/**
* A simulation of a heterogeneous power aware data center that applies the Local Regression Robust
* (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
{
boolean
enableOutput
=
true
;
String
inputFolder
=
"input"
;
boolean
outputToFile
=
false
;
String
inputFolder
=
LrrMc
.
class
.
getClassLoader
().
getResource
(
"workload/planetlab"
).
getPath
();
String
outputFolder
=
"output"
;
String
workload
=
"20110303"
;
String
vmAllocationPolicy
=
"lrr"
;
String
vmSelectionPolicy
=
"mc"
;
String
parameter
=
"1.
5"
;
String
workload
=
"20110303"
;
// PlanetLab workload
String
vmAllocationPolicy
=
"lrr"
;
// Local Regression Robust (LRR) VM allocation policy
String
vmSelectionPolicy
=
"mc"
;
// Maximum Correlation (MC) VM selection policy
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
);
}
...
...
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/planetlab/LrrMmt.java
0 → 100644
View file @
9006b427
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
);
}
}
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/planetlab/LrrMu.java
0 → 100644
View file @
9006b427
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
);
}
}
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/planetlab/LrrRs.java
0 → 100644
View file @
9006b427
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
);
}
}
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/planetlab/Mad2Mc.java
deleted
100644 → 0
View file @
262b52ea
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
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/planetlab/MadMc.java
0 → 100644
View file @
9006b427
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
);
}
}
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/planetlab/MadMmt.java
0 → 100644
View file @
9006b427
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
);
}
}
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/planetlab/MadMu.java
0 → 100644
View file @
9006b427
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
);
}
}
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/planetlab/MadRs.java
0 → 100644
View file @
9006b427
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
);
}
}
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/planetlab/NonPowerAware.java
View file @
9006b427
...
...
@@ -15,12 +15,38 @@ import org.cloudbus.cloudsim.power.PowerDatacenterNonPowerAware;
import
org.cloudbus.cloudsim.power.PowerHost
;
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
{
/**
* 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
{
String
experimentName
=
"npa"
;
String
experimentName
=
"
planetlab_
npa"
;
String
outputFolder
=
"output"
;
String
inputFolder
=
"input"
;
String
inputFolder
=
NonPowerAware
.
class
.
getClassLoader
().
getResource
(
"workload/planetlab/20110303"
)
.
getPath
();
Log
.
setDisabled
(!
Constants
.
ENABLE_OUTPUT
);
Log
.
printLine
(
"Starting "
+
experimentName
);
...
...
@@ -33,7 +59,7 @@ public class NonPowerAware {
List
<
Cloudlet
>
cloudletList
=
PlanetLabHelper
.
createCloudletListPlanetLab
(
brokerId
,
inputFolder
);
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
(
"Datacenter"
,
...
...
@@ -46,6 +72,7 @@ public class NonPowerAware {
broker
.
submitVmList
(
vmList
);
broker
.
submitCloudletList
(
cloudletList
);
CloudSim
.
terminateSimulation
(
Constants
.
SIMULATION_LIMIT
);
double
lastClock
=
CloudSim
.
startSimulation
();
List
<
Cloudlet
>
newList
=
broker
.
getCloudletReceivedList
();
...
...
@@ -63,7 +90,8 @@ public class NonPowerAware {
}
catch
(
Exception
e
)
{
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
);
...
...
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/planetlab/PlanetLabRunner.java
View file @
9006b427
...
...
@@ -74,6 +74,7 @@ public class PlanetLabRunner extends RunnerAbstract {
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
Log
.
printLine
(
"The simulation has been terminated due to an unexpected error"
);
System
.
exit
(
0
);
}
}
...
...
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/planetlab/ThrMc.java
0 → 100644
View file @
9006b427
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
);
}
}
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/planetlab/ThrMmt.java
0 → 100644
View file @
9006b427
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
);
}
}
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/planetlab/ThrMu.java
0 → 100644
View file @
9006b427
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
);
}
}
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/planetlab/ThrRs.java
0 → 100644
View file @
9006b427
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
);
}
}
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/random/RandomRunner.java
View file @
9006b427
...
...
@@ -72,6 +72,7 @@ public class RandomRunner extends RunnerAbstract {
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
Log
.
printLine
(
"The simulation has been terminated due to an unexpected error"
);
System
.
exit
(
0
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment