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
bc1fa0a6
Commit
bc1fa0a6
authored
Jan 05, 2012
by
Anton Beloglazov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed the examples of the LR and LRR policies with a random workload
parent
8a508691
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
292 additions
and
512 deletions
+292
-512
IqrMc.java
...va/org/cloudbus/cloudsim/examples/power/random/IqrMc.java
+1
-1
IqrMmt.java
...a/org/cloudbus/cloudsim/examples/power/random/IqrMmt.java
+1
-1
IqrMu.java
...va/org/cloudbus/cloudsim/examples/power/random/IqrMu.java
+1
-1
IqrRs.java
...va/org/cloudbus/cloudsim/examples/power/random/IqrRs.java
+1
-1
LrMc.java
...ava/org/cloudbus/cloudsim/examples/power/random/LrMc.java
+35
-64
LrMmt.java
...va/org/cloudbus/cloudsim/examples/power/random/LrMmt.java
+35
-62
LrMu.java
...ava/org/cloudbus/cloudsim/examples/power/random/LrMu.java
+35
-62
LrRs.java
...ava/org/cloudbus/cloudsim/examples/power/random/LrRs.java
+35
-62
LrrMc.java
...va/org/cloudbus/cloudsim/examples/power/random/LrrMc.java
+35
-64
LrrMmt.java
...a/org/cloudbus/cloudsim/examples/power/random/LrrMmt.java
+35
-62
LrrMu.java
...va/org/cloudbus/cloudsim/examples/power/random/LrrMu.java
+35
-62
LrrRs.java
...va/org/cloudbus/cloudsim/examples/power/random/LrrRs.java
+35
-62
MadMc.java
...va/org/cloudbus/cloudsim/examples/power/random/MadMc.java
+1
-1
MadMmt.java
...a/org/cloudbus/cloudsim/examples/power/random/MadMmt.java
+1
-1
MadMu.java
...va/org/cloudbus/cloudsim/examples/power/random/MadMu.java
+1
-1
MadRs.java
...va/org/cloudbus/cloudsim/examples/power/random/MadRs.java
+1
-1
ThrMc.java
...va/org/cloudbus/cloudsim/examples/power/random/ThrMc.java
+1
-1
ThrMmt.java
...a/org/cloudbus/cloudsim/examples/power/random/ThrMmt.java
+1
-1
ThrMu.java
...va/org/cloudbus/cloudsim/examples/power/random/ThrMu.java
+1
-1
ThrRs.java
...va/org/cloudbus/cloudsim/examples/power/random/ThrRs.java
+1
-1
No files found.
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/random/IqrMc.java
View file @
bc1fa0a6
...
...
@@ -33,7 +33,7 @@ public class IqrMc {
String
inputFolder
=
""
;
String
outputFolder
=
""
;
String
workload
=
"random"
;
// Random workload
String
vmAllocationPolicy
=
"iqr"
;
// Inter Quartile Range VM allocation policy
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
...
...
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/random/IqrMmt.java
View file @
bc1fa0a6
...
...
@@ -33,7 +33,7 @@ public class IqrMmt {
String
inputFolder
=
""
;
String
outputFolder
=
""
;
String
workload
=
"random"
;
// Random workload
String
vmAllocationPolicy
=
"iqr"
;
// Inter Quartile Range VM allocation policy
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
...
...
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/random/IqrMu.java
View file @
bc1fa0a6
...
...
@@ -33,7 +33,7 @@ public class IqrMu {
String
inputFolder
=
""
;
String
outputFolder
=
""
;
String
workload
=
"random"
;
// Random workload
String
vmAllocationPolicy
=
"iqr"
;
// Inter Quartile Range VM allocation policy
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
...
...
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/random/IqrRs.java
View file @
bc1fa0a6
...
...
@@ -33,7 +33,7 @@ public class IqrRs {
String
inputFolder
=
""
;
String
outputFolder
=
""
;
String
workload
=
"random"
;
// Random workload
String
vmAllocationPolicy
=
"iqr"
;
// Inter Quartile Range VM allocation policy
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
...
...
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/random/LrMc.java
View file @
bc1fa0a6
package
org
.
cloudbus
.
cloudsim
.
examples
.
power
.
random
;
import
java.io.IOException
;
import
java.util.Calendar
;
import
java.util.List
;
import
org.cloudbus.cloudsim.Cloudlet
;
import
org.cloudbus.cloudsim.DatacenterBroker
;
import
org.cloudbus.cloudsim.Log
;
import
org.cloudbus.cloudsim.Vm
;
import
org.cloudbus.cloudsim.core.CloudSim
;
import
org.cloudbus.cloudsim.power.PowerDatacenter
;
import
org.cloudbus.cloudsim.power.PowerHost
;
import
org.cloudbus.cloudsim.power.PowerVmAllocationPolicyMigrationLocalRegression
;
import
org.cloudbus.cloudsim.power.PowerVmAllocationPolicyMigrationThresholds
;
import
org.cloudbus.cloudsim.power.PowerVmSelectionPolicy
;
import
org.cloudbus.cloudsim.power.PowerVmSelectionPolicyMaximumCorrelation
;
import
org.cloudbus.cloudsim.power.PowerVmSelectionPolicyRandomSelection
;
/**
* A simulation of a heterogeneous non-power aware data center: all hosts consume maximum power all
* the time.
* 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.
*
* The remaining configuration parameters are in the Constants and RandomConstants 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
{
/**
*
Creates main() to run this example
.
*
The main method
.
*
* @param args the args
* @param args the arg
ument
s
* @throws IOException Signals that an I/O exception has occurred.
*/
public
static
void
main
(
String
[]
args
)
throws
IOException
{
String
experimentName
=
"lr_mc"
;
String
outputFolder
=
"output"
;
Log
.
setDisabled
(!
RandomConstants
.
ENABLE_OUTPUT
);
Log
.
printLine
(
"Starting "
+
experimentName
);
try
{
CloudSim
.
init
(
1
,
Calendar
.
getInstance
(),
false
);
DatacenterBroker
broker
=
RandomHelper
.
createBroker
();
int
brokerId
=
broker
.
getId
();
List
<
Cloudlet
>
cloudletList
=
RandomHelper
.
createCloudletList
(
brokerId
,
RandomConstants
.
NUMBER_OF_VMS
);
List
<
Vm
>
vmList
=
RandomHelper
.
createVmList
(
brokerId
,
cloudletList
.
size
());
List
<
PowerHost
>
hostList
=
RandomHelper
.
createHostList
(
RandomConstants
.
NUMBER_OF_HOSTS
);
PowerVmSelectionPolicy
vmSelectionPolicy
=
new
PowerVmSelectionPolicyMaximumCorrelation
(
new
PowerVmSelectionPolicyRandomSelection
());
PowerDatacenter
datacenter
=
(
PowerDatacenter
)
RandomHelper
.
createDatacenter
(
"Datacenter"
,
PowerDatacenter
.
class
,
hostList
,
new
PowerVmAllocationPolicyMigrationLocalRegression
(
hostList
,
vmSelectionPolicy
,
RandomConstants
.
SCHEDULING_INTERVAL
,
new
PowerVmAllocationPolicyMigrationThresholds
(
hostList
,
vmSelectionPolicy
,
0.8
)),
-
1
);
datacenter
.
setDisableMigrations
(
false
);
broker
.
submitVmList
(
vmList
);
broker
.
submitCloudletList
(
cloudletList
);
double
lastClock
=
CloudSim
.
startSimulation
();
List
<
Cloudlet
>
newList
=
broker
.
getCloudletReceivedList
();
Log
.
printLine
(
"Received "
+
newList
.
size
()
+
" cloudlets"
);
CloudSim
.
stopSimulation
();
RandomHelper
.
printResults
(
datacenter
,
vmList
,
lastClock
,
experimentName
,
RandomConstants
.
OUTPUT_CSV
,
outputFolder
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
Log
.
printLine
(
"Unwanted errors happen"
);
}
Log
.
printLine
(
"Finished "
+
experimentName
);
boolean
enableOutput
=
true
;
boolean
outputToFile
=
false
;
String
inputFolder
=
""
;
String
outputFolder
=
""
;
String
workload
=
"random"
;
// Random 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
RandomRunner
(
enableOutput
,
outputToFile
,
inputFolder
,
outputFolder
,
workload
,
vmAllocationPolicy
,
vmSelectionPolicy
,
parameter
);
}
}
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/random/LrMmt.java
View file @
bc1fa0a6
package
org
.
cloudbus
.
cloudsim
.
examples
.
power
.
random
;
import
java.io.IOException
;
import
java.util.Calendar
;
import
java.util.List
;
import
org.cloudbus.cloudsim.Cloudlet
;
import
org.cloudbus.cloudsim.DatacenterBroker
;
import
org.cloudbus.cloudsim.Log
;
import
org.cloudbus.cloudsim.Vm
;
import
org.cloudbus.cloudsim.core.CloudSim
;
import
org.cloudbus.cloudsim.power.PowerDatacenter
;
import
org.cloudbus.cloudsim.power.PowerHost
;
import
org.cloudbus.cloudsim.power.PowerVmAllocationPolicyMigrationLocalRegression
;
import
org.cloudbus.cloudsim.power.PowerVmAllocationPolicyMigrationThresholds
;
import
org.cloudbus.cloudsim.power.PowerVmSelectionPolicy
;
import
org.cloudbus.cloudsim.power.PowerVmSelectionPolicyMinimumMigrationTime
;
/**
* A simulation of a heterogeneous non-power aware data center: all hosts consume maximum power all
* the time.
* 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.
*
* The remaining configuration parameters are in the Constants and RandomConstants 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
{
/**
*
Creates main() to run this example
.
*
The main method
.
*
* @param args the args
* @param args the arg
ument
s
* @throws IOException Signals that an I/O exception has occurred.
*/
public
static
void
main
(
String
[]
args
)
throws
IOException
{
String
experimentName
=
"lr_mmt"
;
String
outputFolder
=
"output"
;
Log
.
setDisabled
(!
RandomConstants
.
ENABLE_OUTPUT
);
Log
.
printLine
(
"Starting "
+
experimentName
);
try
{
CloudSim
.
init
(
1
,
Calendar
.
getInstance
(),
false
);
DatacenterBroker
broker
=
RandomHelper
.
createBroker
();
int
brokerId
=
broker
.
getId
();
List
<
Cloudlet
>
cloudletList
=
RandomHelper
.
createCloudletList
(
brokerId
,
RandomConstants
.
NUMBER_OF_VMS
);
List
<
Vm
>
vmList
=
RandomHelper
.
createVmList
(
brokerId
,
cloudletList
.
size
());
List
<
PowerHost
>
hostList
=
RandomHelper
.
createHostList
(
RandomConstants
.
NUMBER_OF_HOSTS
);
PowerVmSelectionPolicy
vmSelectionPolicy
=
new
PowerVmSelectionPolicyMinimumMigrationTime
();
PowerDatacenter
datacenter
=
(
PowerDatacenter
)
RandomHelper
.
createDatacenter
(
"Datacenter"
,
PowerDatacenter
.
class
,
hostList
,
new
PowerVmAllocationPolicyMigrationLocalRegression
(
hostList
,
vmSelectionPolicy
,
RandomConstants
.
SCHEDULING_INTERVAL
,
new
PowerVmAllocationPolicyMigrationThresholds
(
hostList
,
vmSelectionPolicy
,
0.8
)),
-
1
);
datacenter
.
setDisableMigrations
(
false
);
broker
.
submitVmList
(
vmList
);
broker
.
submitCloudletList
(
cloudletList
);
double
lastClock
=
CloudSim
.
startSimulation
();
List
<
Cloudlet
>
newList
=
broker
.
getCloudletReceivedList
();
Log
.
printLine
(
"Received "
+
newList
.
size
()
+
" cloudlets"
);
CloudSim
.
stopSimulation
();
RandomHelper
.
printResults
(
datacenter
,
vmList
,
lastClock
,
experimentName
,
RandomConstants
.
OUTPUT_CSV
,
outputFolder
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
Log
.
printLine
(
"Unwanted errors happen"
);
}
Log
.
printLine
(
"Finished "
+
experimentName
);
boolean
enableOutput
=
true
;
boolean
outputToFile
=
false
;
String
inputFolder
=
""
;
String
outputFolder
=
""
;
String
workload
=
"random"
;
// Random 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
RandomRunner
(
enableOutput
,
outputToFile
,
inputFolder
,
outputFolder
,
workload
,
vmAllocationPolicy
,
vmSelectionPolicy
,
parameter
);
}
}
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/random/LrMu.java
View file @
bc1fa0a6
package
org
.
cloudbus
.
cloudsim
.
examples
.
power
.
random
;
import
java.io.IOException
;
import
java.util.Calendar
;
import
java.util.List
;
import
org.cloudbus.cloudsim.Cloudlet
;
import
org.cloudbus.cloudsim.DatacenterBroker
;
import
org.cloudbus.cloudsim.Log
;
import
org.cloudbus.cloudsim.Vm
;
import
org.cloudbus.cloudsim.core.CloudSim
;
import
org.cloudbus.cloudsim.power.PowerDatacenter
;
import
org.cloudbus.cloudsim.power.PowerHost
;
import
org.cloudbus.cloudsim.power.PowerVmAllocationPolicyMigrationLocalRegression
;
import
org.cloudbus.cloudsim.power.PowerVmAllocationPolicyMigrationThresholds
;
import
org.cloudbus.cloudsim.power.PowerVmSelectionPolicy
;
import
org.cloudbus.cloudsim.power.PowerVmSelectionPolicyMinimumUtilization
;
/**
* A simulation of a heterogeneous non-power aware data center: all hosts consume maximum power all
* the time.
* 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.
*
* The remaining configuration parameters are in the Constants and RandomConstants 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
{
/**
*
Creates main() to run this example
.
*
The main method
.
*
* @param args the args
* @param args the arg
ument
s
* @throws IOException Signals that an I/O exception has occurred.
*/
public
static
void
main
(
String
[]
args
)
throws
IOException
{
String
experimentName
=
"lr_mu"
;
String
outputFolder
=
"output"
;
Log
.
setDisabled
(!
RandomConstants
.
ENABLE_OUTPUT
);
Log
.
printLine
(
"Starting "
+
experimentName
);
try
{
CloudSim
.
init
(
1
,
Calendar
.
getInstance
(),
false
);
DatacenterBroker
broker
=
RandomHelper
.
createBroker
();
int
brokerId
=
broker
.
getId
();
List
<
Cloudlet
>
cloudletList
=
RandomHelper
.
createCloudletList
(
brokerId
,
RandomConstants
.
NUMBER_OF_VMS
);
List
<
Vm
>
vmList
=
RandomHelper
.
createVmList
(
brokerId
,
cloudletList
.
size
());
List
<
PowerHost
>
hostList
=
RandomHelper
.
createHostList
(
RandomConstants
.
NUMBER_OF_HOSTS
);
PowerVmSelectionPolicy
vmSelectionPolicy
=
new
PowerVmSelectionPolicyMinimumUtilization
();
PowerDatacenter
datacenter
=
(
PowerDatacenter
)
RandomHelper
.
createDatacenter
(
"Datacenter"
,
PowerDatacenter
.
class
,
hostList
,
new
PowerVmAllocationPolicyMigrationLocalRegression
(
hostList
,
vmSelectionPolicy
,
RandomConstants
.
SCHEDULING_INTERVAL
,
new
PowerVmAllocationPolicyMigrationThresholds
(
hostList
,
vmSelectionPolicy
,
0.8
)),
-
1
);
datacenter
.
setDisableMigrations
(
false
);
broker
.
submitVmList
(
vmList
);
broker
.
submitCloudletList
(
cloudletList
);
double
lastClock
=
CloudSim
.
startSimulation
();
List
<
Cloudlet
>
newList
=
broker
.
getCloudletReceivedList
();
Log
.
printLine
(
"Received "
+
newList
.
size
()
+
" cloudlets"
);
CloudSim
.
stopSimulation
();
RandomHelper
.
printResults
(
datacenter
,
vmList
,
lastClock
,
experimentName
,
RandomConstants
.
OUTPUT_CSV
,
outputFolder
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
Log
.
printLine
(
"Unwanted errors happen"
);
}
Log
.
printLine
(
"Finished "
+
experimentName
);
boolean
enableOutput
=
true
;
boolean
outputToFile
=
false
;
String
inputFolder
=
""
;
String
outputFolder
=
""
;
String
workload
=
"random"
;
// Random 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
RandomRunner
(
enableOutput
,
outputToFile
,
inputFolder
,
outputFolder
,
workload
,
vmAllocationPolicy
,
vmSelectionPolicy
,
parameter
);
}
}
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/random/LrRs.java
View file @
bc1fa0a6
package
org
.
cloudbus
.
cloudsim
.
examples
.
power
.
random
;
import
java.io.IOException
;
import
java.util.Calendar
;
import
java.util.List
;
import
org.cloudbus.cloudsim.Cloudlet
;
import
org.cloudbus.cloudsim.DatacenterBroker
;
import
org.cloudbus.cloudsim.Log
;
import
org.cloudbus.cloudsim.Vm
;
import
org.cloudbus.cloudsim.core.CloudSim
;
import
org.cloudbus.cloudsim.power.PowerDatacenter
;
import
org.cloudbus.cloudsim.power.PowerHost
;
import
org.cloudbus.cloudsim.power.PowerVmAllocationPolicyMigrationLocalRegression
;
import
org.cloudbus.cloudsim.power.PowerVmAllocationPolicyMigrationThresholds
;
import
org.cloudbus.cloudsim.power.PowerVmSelectionPolicy
;
import
org.cloudbus.cloudsim.power.PowerVmSelectionPolicyRandomSelection
;
/**
* A simulation of a heterogeneous non-power aware data center: all hosts consume maximum power all
* the time.
* 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.
*
* The remaining configuration parameters are in the Constants and RandomConstants 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
{
/**
*
Creates main() to run this example
.
*
The main method
.
*
* @param args the args
* @param args the arg
ument
s
* @throws IOException Signals that an I/O exception has occurred.
*/
public
static
void
main
(
String
[]
args
)
throws
IOException
{
String
experimentName
=
"lr_rs"
;
String
outputFolder
=
"output"
;
Log
.
setDisabled
(!
RandomConstants
.
ENABLE_OUTPUT
);
Log
.
printLine
(
"Starting "
+
experimentName
);
try
{
CloudSim
.
init
(
1
,
Calendar
.
getInstance
(),
false
);
DatacenterBroker
broker
=
RandomHelper
.
createBroker
();
int
brokerId
=
broker
.
getId
();
List
<
Cloudlet
>
cloudletList
=
RandomHelper
.
createCloudletList
(
brokerId
,
RandomConstants
.
NUMBER_OF_VMS
);
List
<
Vm
>
vmList
=
RandomHelper
.
createVmList
(
brokerId
,
cloudletList
.
size
());
List
<
PowerHost
>
hostList
=
RandomHelper
.
createHostList
(
RandomConstants
.
NUMBER_OF_HOSTS
);
PowerVmSelectionPolicy
vmSelectionPolicy
=
new
PowerVmSelectionPolicyRandomSelection
();
PowerDatacenter
datacenter
=
(
PowerDatacenter
)
RandomHelper
.
createDatacenter
(
"Datacenter"
,
PowerDatacenter
.
class
,
hostList
,
new
PowerVmAllocationPolicyMigrationLocalRegression
(
hostList
,
vmSelectionPolicy
,
RandomConstants
.
SCHEDULING_INTERVAL
,
new
PowerVmAllocationPolicyMigrationThresholds
(
hostList
,
vmSelectionPolicy
,
0.8
)),
-
1
);
datacenter
.
setDisableMigrations
(
false
);
broker
.
submitVmList
(
vmList
);
broker
.
submitCloudletList
(
cloudletList
);
double
lastClock
=
CloudSim
.
startSimulation
();
List
<
Cloudlet
>
newList
=
broker
.
getCloudletReceivedList
();
Log
.
printLine
(
"Received "
+
newList
.
size
()
+
" cloudlets"
);
CloudSim
.
stopSimulation
();
RandomHelper
.
printResults
(
datacenter
,
vmList
,
lastClock
,
experimentName
,
RandomConstants
.
OUTPUT_CSV
,
outputFolder
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
Log
.
printLine
(
"Unwanted errors happen"
);
}
Log
.
printLine
(
"Finished "
+
experimentName
);
boolean
enableOutput
=
true
;
boolean
outputToFile
=
false
;
String
inputFolder
=
""
;
String
outputFolder
=
""
;
String
workload
=
"random"
;
// Random 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
RandomRunner
(
enableOutput
,
outputToFile
,
inputFolder
,
outputFolder
,
workload
,
vmAllocationPolicy
,
vmSelectionPolicy
,
parameter
);
}
}
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/random/LrrMc.java
View file @
bc1fa0a6
package
org
.
cloudbus
.
cloudsim
.
examples
.
power
.
random
;
import
java.io.IOException
;
import
java.util.Calendar
;
import
java.util.List
;
import
org.cloudbus.cloudsim.Cloudlet
;
import
org.cloudbus.cloudsim.DatacenterBroker
;
import
org.cloudbus.cloudsim.Log
;
import
org.cloudbus.cloudsim.Vm
;
import
org.cloudbus.cloudsim.core.CloudSim
;
import
org.cloudbus.cloudsim.power.PowerDatacenter
;
import
org.cloudbus.cloudsim.power.PowerHost
;
import
org.cloudbus.cloudsim.power.PowerVmAllocationPolicyMigrationLocalRegressionRobust
;
import
org.cloudbus.cloudsim.power.PowerVmAllocationPolicyMigrationThresholds
;
import
org.cloudbus.cloudsim.power.PowerVmSelectionPolicy
;
import
org.cloudbus.cloudsim.power.PowerVmSelectionPolicyMaximumCorrelation
;
import
org.cloudbus.cloudsim.power.PowerVmSelectionPolicyRandomSelection
;
/**
* A simulation of a heterogeneous non-power aware data center: all hosts consume maximum power all
* the time.
* 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.
*
* The remaining configuration parameters are in the Constants and RandomConstants 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
{
/**
*
Creates main() to run this example
.
*
The main method
.
*
* @param args the args
* @param args the arg
ument
s
* @throws IOException Signals that an I/O exception has occurred.
*/
public
static
void
main
(
String
[]
args
)
throws
IOException
{
String
experimentName
=
"lrr_mc"
;
String
outputFolder
=
"output"
;
Log
.
setDisabled
(!
RandomConstants
.
ENABLE_OUTPUT
);
Log
.
printLine
(
"Starting "
+
experimentName
);
try
{
CloudSim
.
init
(
1
,
Calendar
.
getInstance
(),
false
);
DatacenterBroker
broker
=
RandomHelper
.
createBroker
();
int
brokerId
=
broker
.
getId
();
List
<
Cloudlet
>
cloudletList
=
RandomHelper
.
createCloudletList
(
brokerId
,
RandomConstants
.
NUMBER_OF_VMS
);
List
<
Vm
>
vmList
=
RandomHelper
.
createVmList
(
brokerId
,
cloudletList
.
size
());
List
<
PowerHost
>
hostList
=
RandomHelper
.
createHostList
(
RandomConstants
.
NUMBER_OF_HOSTS
);
PowerVmSelectionPolicy
vmSelectionPolicy
=
new
PowerVmSelectionPolicyMaximumCorrelation
(
new
PowerVmSelectionPolicyRandomSelection
());
PowerDatacenter
datacenter
=
(
PowerDatacenter
)
RandomHelper
.
createDatacenter
(
"Datacenter"
,
PowerDatacenter
.
class
,
hostList
,
new
PowerVmAllocationPolicyMigrationLocalRegressionRobust
(
hostList
,
vmSelectionPolicy
,
RandomConstants
.
SCHEDULING_INTERVAL
,
new
PowerVmAllocationPolicyMigrationThresholds
(
hostList
,
vmSelectionPolicy
,
0.8
)),
-
1
);
datacenter
.
setDisableMigrations
(
false
);
broker
.
submitVmList
(
vmList
);
broker
.
submitCloudletList
(
cloudletList
);
double
lastClock
=
CloudSim
.
startSimulation
();
List
<
Cloudlet
>
newList
=
broker
.
getCloudletReceivedList
();
Log
.
printLine
(
"Received "
+
newList
.
size
()
+
" cloudlets"
);
CloudSim
.
stopSimulation
();
RandomHelper
.
printResults
(
datacenter
,
vmList
,
lastClock
,
experimentName
,
RandomConstants
.
OUTPUT_CSV
,
outputFolder
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
Log
.
printLine
(
"Unwanted errors happen"
);
}
Log
.
printLine
(
"Finished "
+
experimentName
);
boolean
enableOutput
=
true
;
boolean
outputToFile
=
false
;
String
inputFolder
=
""
;
String
outputFolder
=
""
;
String
workload
=
"random"
;
// Random 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
new
RandomRunner
(
enableOutput
,
outputToFile
,
inputFolder
,
outputFolder
,
workload
,
vmAllocationPolicy
,
vmSelectionPolicy
,
parameter
);
}
}
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/random/LrrMmt.java
View file @
bc1fa0a6
package
org
.
cloudbus
.
cloudsim
.
examples
.
power
.
random
;
import
java.io.IOException
;
import
java.util.Calendar
;
import
java.util.List
;
import
org.cloudbus.cloudsim.Cloudlet
;
import
org.cloudbus.cloudsim.DatacenterBroker
;
import
org.cloudbus.cloudsim.Log
;
import
org.cloudbus.cloudsim.Vm
;
import
org.cloudbus.cloudsim.core.CloudSim
;
import
org.cloudbus.cloudsim.power.PowerDatacenter
;
import
org.cloudbus.cloudsim.power.PowerHost
;
import
org.cloudbus.cloudsim.power.PowerVmAllocationPolicyMigrationLocalRegressionRobust
;
import
org.cloudbus.cloudsim.power.PowerVmAllocationPolicyMigrationStaticThreshold
;
import
org.cloudbus.cloudsim.power.PowerVmSelectionPolicy
;
import
org.cloudbus.cloudsim.power.PowerVmSelectionPolicyMinimumMigrationTime
;
/**
* A simulation of a heterogeneous non-power aware data center: all hosts consume maximum power all
* the time.
* 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.
*
* The remaining configuration parameters are in the Constants and RandomConstants 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
{
/**
*
Creates main() to run this example
.
*
The main method
.
*
* @param args the args
* @param args the arg
ument
s
* @throws IOException Signals that an I/O exception has occurred.
*/
public
static
void
main
(
String
[]
args
)
throws
IOException
{
String
experimentName
=
"lrr_mmt"
;
String
outputFolder
=
"output"
;
Log
.
setDisabled
(!
RandomConstants
.
ENABLE_OUTPUT
);
Log
.
printLine
(
"Starting "
+
experimentName
);
try
{
CloudSim
.
init
(
1
,
Calendar
.
getInstance
(),
false
);
DatacenterBroker
broker
=
RandomHelper
.
createBroker
();
int
brokerId
=
broker
.
getId
();
List
<
Cloudlet
>
cloudletList
=
RandomHelper
.
createCloudletList
(
brokerId
,
RandomConstants
.
NUMBER_OF_VMS
);
List
<
Vm
>
vmList
=
RandomHelper
.
createVmList
(
brokerId
,
cloudletList
.
size
());
List
<
PowerHost
>
hostList
=
RandomHelper
.
createHostList
(
RandomConstants
.
NUMBER_OF_HOSTS
);
PowerVmSelectionPolicy
vmSelectionPolicy
=
new
PowerVmSelectionPolicyMinimumMigrationTime
();
PowerDatacenter
datacenter
=
(
PowerDatacenter
)
RandomHelper
.
createDatacenter
(
"Datacenter"
,
PowerDatacenter
.
class
,
hostList
,
new
PowerVmAllocationPolicyMigrationLocalRegressionRobust
(
hostList
,
vmSelectionPolicy
,
RandomConstants
.
SCHEDULING_INTERVAL
,
new
PowerVmAllocationPolicyMigrationStaticThreshold
(
hostList
,
vmSelectionPolicy
,
0.8
)),
-
1
);
datacenter
.
setDisableMigrations
(
false
);
broker
.
submitVmList
(
vmList
);
broker
.
submitCloudletList
(
cloudletList
);
double
lastClock
=
CloudSim
.
startSimulation
();
List
<
Cloudlet
>
newList
=
broker
.
getCloudletReceivedList
();
Log
.
printLine
(
"Received "
+
newList
.
size
()
+
" cloudlets"
);
CloudSim
.
stopSimulation
();
RandomHelper
.
printResults
(
datacenter
,
vmList
,
lastClock
,
experimentName
,
RandomConstants
.
OUTPUT_CSV
,
outputFolder
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
Log
.
printLine
(
"The simulation has been terminated due to an unexpected error"
);
}
Log
.
printLine
(
"Finished "
+
experimentName
);
boolean
enableOutput
=
true
;
boolean
outputToFile
=
false
;
String
inputFolder
=
""
;
String
outputFolder
=
""
;
String
workload
=
"random"
;
// Random 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
RandomRunner
(
enableOutput
,
outputToFile
,
inputFolder
,
outputFolder
,
workload
,
vmAllocationPolicy
,
vmSelectionPolicy
,
parameter
);
}
}
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/random/LrrMu.java
View file @
bc1fa0a6
package
org
.
cloudbus
.
cloudsim
.
examples
.
power
.
random
;
import
java.io.IOException
;
import
java.util.Calendar
;
import
java.util.List
;
import
org.cloudbus.cloudsim.Cloudlet
;
import
org.cloudbus.cloudsim.DatacenterBroker
;
import
org.cloudbus.cloudsim.Log
;
import
org.cloudbus.cloudsim.Vm
;
import
org.cloudbus.cloudsim.core.CloudSim
;
import
org.cloudbus.cloudsim.power.PowerDatacenter
;
import
org.cloudbus.cloudsim.power.PowerHost
;
import
org.cloudbus.cloudsim.power.PowerVmAllocationPolicyMigrationLocalRegressionRobust
;
import
org.cloudbus.cloudsim.power.PowerVmAllocationPolicyMigrationStaticThreshold
;
import
org.cloudbus.cloudsim.power.PowerVmSelectionPolicy
;
import
org.cloudbus.cloudsim.power.PowerVmSelectionPolicyMinimumUtilization
;
/**
* A simulation of a heterogeneous non-power aware data center: all hosts consume maximum power all
* the time.
* 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.
*
* The remaining configuration parameters are in the Constants and RandomConstants 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
{
/**
*
Creates main() to run this example
.
*
The main method
.
*
* @param args the args
* @param args the arg
ument
s
* @throws IOException Signals that an I/O exception has occurred.
*/
public
static
void
main
(
String
[]
args
)
throws
IOException
{
String
experimentName
=
"lrr_mu"
;
String
outputFolder
=
"output"
;
Log
.
setDisabled
(!
RandomConstants
.
ENABLE_OUTPUT
);
Log
.
printLine
(
"Starting "
+
experimentName
);
try
{
CloudSim
.
init
(
1
,
Calendar
.
getInstance
(),
false
);
DatacenterBroker
broker
=
RandomHelper
.
createBroker
();
int
brokerId
=
broker
.
getId
();
List
<
Cloudlet
>
cloudletList
=
RandomHelper
.
createCloudletList
(
brokerId
,
RandomConstants
.
NUMBER_OF_VMS
);
List
<
Vm
>
vmList
=
RandomHelper
.
createVmList
(
brokerId
,
cloudletList
.
size
());
List
<
PowerHost
>
hostList
=
RandomHelper
.
createHostList
(
RandomConstants
.
NUMBER_OF_HOSTS
);
PowerVmSelectionPolicy
vmSelectionPolicy
=
new
PowerVmSelectionPolicyMinimumUtilization
();
PowerDatacenter
datacenter
=
(
PowerDatacenter
)
RandomHelper
.
createDatacenter
(
"Datacenter"
,
PowerDatacenter
.
class
,
hostList
,
new
PowerVmAllocationPolicyMigrationLocalRegressionRobust
(
hostList
,
vmSelectionPolicy
,
RandomConstants
.
SCHEDULING_INTERVAL
,
new
PowerVmAllocationPolicyMigrationStaticThreshold
(
hostList
,
vmSelectionPolicy
,
0.8
)),
-
1
);
datacenter
.
setDisableMigrations
(
false
);
broker
.
submitVmList
(
vmList
);
broker
.
submitCloudletList
(
cloudletList
);
double
lastClock
=
CloudSim
.
startSimulation
();
List
<
Cloudlet
>
newList
=
broker
.
getCloudletReceivedList
();
Log
.
printLine
(
"Received "
+
newList
.
size
()
+
" cloudlets"
);
CloudSim
.
stopSimulation
();
RandomHelper
.
printResults
(
datacenter
,
vmList
,
lastClock
,
experimentName
,
RandomConstants
.
OUTPUT_CSV
,
outputFolder
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
Log
.
printLine
(
"The simulation has been terminated due to an unexpected error"
);
}
Log
.
printLine
(
"Finished "
+
experimentName
);
boolean
enableOutput
=
true
;
boolean
outputToFile
=
false
;
String
inputFolder
=
""
;
String
outputFolder
=
""
;
String
workload
=
"random"
;
// Random 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
RandomRunner
(
enableOutput
,
outputToFile
,
inputFolder
,
outputFolder
,
workload
,
vmAllocationPolicy
,
vmSelectionPolicy
,
parameter
);
}
}
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/random/LrrRs.java
View file @
bc1fa0a6
package
org
.
cloudbus
.
cloudsim
.
examples
.
power
.
random
;
import
java.io.IOException
;
import
java.util.Calendar
;
import
java.util.List
;
import
org.cloudbus.cloudsim.Cloudlet
;
import
org.cloudbus.cloudsim.DatacenterBroker
;
import
org.cloudbus.cloudsim.Log
;
import
org.cloudbus.cloudsim.Vm
;
import
org.cloudbus.cloudsim.core.CloudSim
;
import
org.cloudbus.cloudsim.power.PowerDatacenter
;
import
org.cloudbus.cloudsim.power.PowerHost
;
import
org.cloudbus.cloudsim.power.PowerVmAllocationPolicyMigrationLocalRegressionRobust
;
import
org.cloudbus.cloudsim.power.PowerVmAllocationPolicyMigrationThresholds
;
import
org.cloudbus.cloudsim.power.PowerVmSelectionPolicy
;
import
org.cloudbus.cloudsim.power.PowerVmSelectionPolicyRandomSelection
;
/**
* A simulation of a heterogeneous non-power aware data center: all hosts consume maximum power all
* the time.
* 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.
*
* The remaining configuration parameters are in the Constants and RandomConstants 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
{
/**
*
Creates main() to run this example
.
*
The main method
.
*
* @param args the args
* @param args the arg
ument
s
* @throws IOException Signals that an I/O exception has occurred.
*/
public
static
void
main
(
String
[]
args
)
throws
IOException
{
String
experimentName
=
"lrr_rs"
;
String
outputFolder
=
"output"
;
Log
.
setDisabled
(!
RandomConstants
.
ENABLE_OUTPUT
);
Log
.
printLine
(
"Starting "
+
experimentName
);
try
{
CloudSim
.
init
(
1
,
Calendar
.
getInstance
(),
false
);
DatacenterBroker
broker
=
RandomHelper
.
createBroker
();
int
brokerId
=
broker
.
getId
();
List
<
Cloudlet
>
cloudletList
=
RandomHelper
.
createCloudletList
(
brokerId
,
RandomConstants
.
NUMBER_OF_VMS
);
List
<
Vm
>
vmList
=
RandomHelper
.
createVmList
(
brokerId
,
cloudletList
.
size
());
List
<
PowerHost
>
hostList
=
RandomHelper
.
createHostList
(
RandomConstants
.
NUMBER_OF_HOSTS
);
PowerVmSelectionPolicy
vmSelectionPolicy
=
new
PowerVmSelectionPolicyRandomSelection
();
PowerDatacenter
datacenter
=
(
PowerDatacenter
)
RandomHelper
.
createDatacenter
(
"Datacenter"
,
PowerDatacenter
.
class
,
hostList
,
new
PowerVmAllocationPolicyMigrationLocalRegressionRobust
(
hostList
,
vmSelectionPolicy
,
RandomConstants
.
SCHEDULING_INTERVAL
,
new
PowerVmAllocationPolicyMigrationThresholds
(
hostList
,
vmSelectionPolicy
,
0.8
)),
-
1
);
datacenter
.
setDisableMigrations
(
false
);
broker
.
submitVmList
(
vmList
);
broker
.
submitCloudletList
(
cloudletList
);
double
lastClock
=
CloudSim
.
startSimulation
();
List
<
Cloudlet
>
newList
=
broker
.
getCloudletReceivedList
();
Log
.
printLine
(
"Received "
+
newList
.
size
()
+
" cloudlets"
);
CloudSim
.
stopSimulation
();
RandomHelper
.
printResults
(
datacenter
,
vmList
,
lastClock
,
experimentName
,
RandomConstants
.
OUTPUT_CSV
,
outputFolder
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
Log
.
printLine
(
"Unwanted errors happen"
);
}
Log
.
printLine
(
"Finished "
+
experimentName
);
boolean
enableOutput
=
true
;
boolean
outputToFile
=
false
;
String
inputFolder
=
""
;
String
outputFolder
=
""
;
String
workload
=
"random"
;
// Random 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
RandomRunner
(
enableOutput
,
outputToFile
,
inputFolder
,
outputFolder
,
workload
,
vmAllocationPolicy
,
vmSelectionPolicy
,
parameter
);
}
}
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/random/MadMc.java
View file @
bc1fa0a6
...
...
@@ -33,7 +33,7 @@ public class MadMc {
String
inputFolder
=
""
;
String
outputFolder
=
""
;
String
workload
=
"random"
;
// Random workload
String
vmAllocationPolicy
=
"mad"
;
// Median Absolute Deviation VM allocation policy
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
...
...
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/random/MadMmt.java
View file @
bc1fa0a6
...
...
@@ -33,7 +33,7 @@ public class MadMmt {
String
inputFolder
=
""
;
String
outputFolder
=
""
;
String
workload
=
"random"
;
// Random workload
String
vmAllocationPolicy
=
"mad"
;
// Median Absolute Deviation VM allocation policy
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
...
...
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/random/MadMu.java
View file @
bc1fa0a6
...
...
@@ -33,7 +33,7 @@ public class MadMu {
String
inputFolder
=
""
;
String
outputFolder
=
""
;
String
workload
=
"random"
;
// Random workload
String
vmAllocationPolicy
=
"mad"
;
// Median Absolute Deviation VM allocation policy
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
...
...
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/random/MadRs.java
View file @
bc1fa0a6
...
...
@@ -33,7 +33,7 @@ public class MadRs {
String
inputFolder
=
""
;
String
outputFolder
=
""
;
String
workload
=
"random"
;
// Random workload
String
vmAllocationPolicy
=
"mad"
;
// Median Absolute Deviation VM allocation policy
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
...
...
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/random/ThrMc.java
View file @
bc1fa0a6
...
...
@@ -33,7 +33,7 @@ public class ThrMc {
String
inputFolder
=
""
;
String
outputFolder
=
""
;
String
workload
=
"random"
;
// Random workload
String
vmAllocationPolicy
=
"thr"
;
// Static Threshold VM allocation policy
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
...
...
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/random/ThrMmt.java
View file @
bc1fa0a6
...
...
@@ -33,7 +33,7 @@ public class ThrMmt {
String
inputFolder
=
""
;
String
outputFolder
=
""
;
String
workload
=
"random"
;
// Random workload
String
vmAllocationPolicy
=
"thr"
;
// Static Threshold VM allocation policy
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
...
...
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/random/ThrMu.java
View file @
bc1fa0a6
...
...
@@ -33,7 +33,7 @@ public class ThrMu {
String
inputFolder
=
""
;
String
outputFolder
=
""
;
String
workload
=
"random"
;
// Random workload
String
vmAllocationPolicy
=
"thr"
;
// Static Threshold VM allocation policy
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
...
...
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/power/random/ThrRs.java
View file @
bc1fa0a6
...
...
@@ -33,7 +33,7 @@ public class ThrRs {
String
inputFolder
=
""
;
String
outputFolder
=
""
;
String
workload
=
"random"
;
// Random workload
String
vmAllocationPolicy
=
"thr"
;
// Static Threshold VM allocation policy
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
...
...
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