Skip to content

Commit de61f36

Browse files
committed
Close #21 - Update InterDatacenterMigration1 example
Signed-off-by: Manoel Campos <[email protected]>
1 parent 74a621f commit de61f36

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/main/java/org/cloudsimplus/examples/migration/InterDatacenterMigration1.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public final class InterDatacenterMigration1 {
131131
*
132132
* <p>The total number of items define the number of Hosts to create.</p>
133133
*/
134-
private static final int[][] DC_HOST_PES = {{4, 5}, {8, 8, 8}};
134+
private static final int[][] DC_HOST_PES = {{4, 5}, {8, 8, 8, 16}};
135135

136136
/**
137137
* The percentage of host CPU usage that trigger VM migration
@@ -171,7 +171,7 @@ public final class InterDatacenterMigration1 {
171171
* RAM capacity for created Hosts.
172172
* The length of this array must be the length of the largest row on {@link #DC_HOST_PES} matrix.
173173
*/
174-
private static final long[] HOST_RAM = {50_000, 50_000, 50_000}; //host memory (MB)
174+
private static final long[] HOST_RAM = {50_000, 50_000, 50_000, 50_000}; //host memory (MB)
175175

176176
private static final long HOST_STORAGE = 1_000_000; //host storage (MB)
177177

@@ -185,11 +185,11 @@ public final class InterDatacenterMigration1 {
185185
private static final int[][] VM_PES = {{3, 2, 2}, {4, 4, 4}};
186186

187187
private static final int VM_MIPS = 1000; //for each PE
188-
private static final long VM_SIZE = 1000; //image size (MB)
188+
private static final long VM_SIZE = 100_000; //image size (MB)
189189
private static final int VM_RAM = 10_000; //VM memory (MB)
190190
private static final long VM_BW = 2000; //Mbps
191191

192-
private static final long CLOUDLET_LENGTH = 20_000;
192+
private static final long CLOUDLET_LENGTH = 50_000;
193193
private static final long CLOUDLET_FILESIZE = 300;
194194
private static final long CLOUDLET_OUTPUT_SIZE = 300;
195195

@@ -270,11 +270,11 @@ private void validateConfiguration() {
270270
* become overloaded in order to trigger the migration.
271271
*/
272272
private VmAllocationPolicyMigration createVmAllocationPolicy() {
273-
final var policy = new VmAllocationPolicyMigrationFirstFitStaticThreshold(
274-
new VmSelectionPolicyMinimumUtilization(), 0.9);
273+
final var vmSelection = new VmSelectionPolicyMinimumUtilization();
274+
final var vmAllocation = new VmAllocationPolicyMigrationFirstFitStaticThreshold(vmSelection, 0.9);
275275

276-
policy.setUnderUtilizationThreshold(HOST_UNDER_UTILIZATION_THRESHOLD_FOR_VM_MIGRATION);
277-
return policy;
276+
vmAllocation.setUnderUtilizationThreshold(HOST_UNDER_UTILIZATION_THRESHOLD_FOR_VM_MIGRATION);
277+
return vmAllocation;
278278
}
279279

280280
/**

0 commit comments

Comments
 (0)