summaryrefslogtreecommitdiff
path: root/opendc/opendc-experiments-sc20/src/main
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2020-04-08 15:27:24 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2020-04-08 15:54:49 +0200
commit7a11aff2ff46b0fb3bf01f537946d5fcd66a1e90 (patch)
tree71be757043da58f0adaec71c4432e6f5f0135656 /opendc/opendc-experiments-sc20/src/main
parent02864ba50fafffd19bb1b635eea06004d9fd78aa (diff)
bug: Fix incorrect reporting of overcommission
Diffstat (limited to 'opendc/opendc-experiments-sc20/src/main')
-rw-r--r--opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/Sc20Monitor.kt8
-rw-r--r--opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/TestExperiment.kt4
2 files changed, 9 insertions, 3 deletions
diff --git a/opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/Sc20Monitor.kt b/opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/Sc20Monitor.kt
index 212b1bfb..eb6ff8de 100644
--- a/opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/Sc20Monitor.kt
+++ b/opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/Sc20Monitor.kt
@@ -17,7 +17,7 @@ class Sc20Monitor(
private val lastServerStates = mutableMapOf<Server, Pair<ServerState, Long>>()
init {
- outputFile.write("time,duration,requestedBurst,grantedBurst,numberOfDeployedImages,server,hostState,hostUsage,powerDraw,failedVms\n")
+ outputFile.write("time,duration,requestedBurst,grantedBurst,overcommissionedBurst,interferredBurst,numberOfDeployedImages,server,hostState,hostUsage,powerDraw,failedVms\n")
}
suspend fun onVmStateChanged(server: Server) {}
@@ -32,6 +32,8 @@ class Sc20Monitor(
0,
0,
0,
+ 0,
+ 0,
server,
duration
)
@@ -46,6 +48,8 @@ class Sc20Monitor(
time: Long,
requestedBurst: Long,
grantedBurst: Long,
+ overcommissionedBurst: Long,
+ interferredBurst: Long,
numberOfDeployedImages: Int,
hostServer: Server,
duration: Long = 5 * 60 * 1000L
@@ -57,7 +61,7 @@ class Sc20Monitor(
val usage = driver.usage.first()
val powerDraw = driver.powerDraw.first()
- outputFile.write("$time,$duration,$requestedBurst,$grantedBurst,$numberOfDeployedImages,${hostServer.uid},${hostServer.state},$usage,$powerDraw")
+ outputFile.write("$time,$duration,$requestedBurst,$grantedBurst,$overcommissionedBurst,$interferredBurst,$numberOfDeployedImages,${hostServer.uid},${hostServer.state},$usage,$powerDraw")
outputFile.newLine()
}
diff --git a/opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/TestExperiment.kt b/opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/TestExperiment.kt
index 3392bd02..bd06520a 100644
--- a/opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/TestExperiment.kt
+++ b/opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/TestExperiment.kt
@@ -200,6 +200,8 @@ fun main(args: Array<String>) {
simulationContext.clock.millis(),
event.requestedBurst,
event.grantedBurst,
+ event.overcommissionedBurst,
+ event.interferredBurst,
event.numberOfDeployedImages,
event.hostServer
)
@@ -237,7 +239,7 @@ fun main(args: Array<String>) {
chan.send(Unit)
val server = scheduler.deploy(
workload.image.name, workload.image,
- Flavor(workload.image.cores, workload.image.requiredMemory)
+ Flavor(workload.image.maxCores, workload.image.requiredMemory)
)
running += server
// Monitor server events