diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-04-08 16:00:02 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-08 16:00:02 +0200 |
| commit | 3fd45fc5befb1fc9a67d4494e8a3786a5dceae3a (patch) | |
| tree | 739a8569545608068141288eb25ae80ce2597b7d /simulator/opendc-compute/opendc-compute-service | |
| parent | 5d3b759b18fb0a4278b43dea6a9db478b07804a5 (diff) | |
| parent | 638dd7a33d5f7f0b8fcca9c99cdc92819cf0847c (diff) | |
exp: Add experiment for OpenDC Energy project
This pull requests adds an experiment to the repository for the OpenDC Energy project.
This experiment currently runs the Solvinity traces and tests how different energy
models perform.
* Add new experiment `opendc-experiments-energy21`
* Link experiment to `ConsoleRunner` so that the experiment can be run from the
command line.
* `BatchRecorder` is now used to emit all metrics at once after the hypervisor
finishes a slice.
Diffstat (limited to 'simulator/opendc-compute/opendc-compute-service')
| -rw-r--r-- | simulator/opendc-compute/opendc-compute-service/src/main/kotlin/org/opendc/compute/service/scheduler/RandomAllocationPolicy.kt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/simulator/opendc-compute/opendc-compute-service/src/main/kotlin/org/opendc/compute/service/scheduler/RandomAllocationPolicy.kt b/simulator/opendc-compute/opendc-compute-service/src/main/kotlin/org/opendc/compute/service/scheduler/RandomAllocationPolicy.kt index ac7b351d..006e0d1c 100644 --- a/simulator/opendc-compute/opendc-compute-service/src/main/kotlin/org/opendc/compute/service/scheduler/RandomAllocationPolicy.kt +++ b/simulator/opendc-compute/opendc-compute-service/src/main/kotlin/org/opendc/compute/service/scheduler/RandomAllocationPolicy.kt @@ -38,7 +38,7 @@ public class RandomAllocationPolicy(private val random: Random = Random(0)) : Al ): HostView? { return hypervisors.asIterable() .filter { hv -> - val fitsMemory = hv.availableMemory >= (server.image.meta["required-memory"] as Long) + val fitsMemory = hv.availableMemory >= server.flavor.memorySize val fitsCpu = hv.host.model.cpuCount >= server.flavor.cpuCount fitsMemory && fitsCpu } |
