Commit a6f56bef by Tomasz Ciesielczyk

power models, evaluation update

parent 0d415192
48.15377766666666 49.09264933333333 50.52666666666667 51.32 1.0
0 50.32 0.98 98.5
35 50.34 0.99 95.19
55 50.39 0.99 99.38
76 50.44 0.99 97.84
100 50.46 0.98 99.39
actions
{"0": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"cpu_freq\", \"-p\", \"20\"]"}}], "35": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"cpu_freq\", \"-p\", \"30\"]"}}], "55": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"cpu_freq\", \"-p\", \"40\"]"}}], "76": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"cpu_freq\", \"-p\", \"70\"]"}}], "100": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"cpu_freq\", \"-p\", \"60\"]"}}]}
\ No newline at end of file
48.15377766666666 49.09264933333333 50.52666666666667 51.32 1.0
0 50.26 0.96 98.74
16 50.3 0.95 99.09
37 50.5 0.96 98.97
39 50.53 0.98 98.46
100 51.04 0.97 98.5
actions
{"0": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"cpu_freq\", \"-p\", \"40\"]"}}], "16": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"cpu_freq\", \"-p\", \"100\"]"}}], "37": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"cpu_freq\", \"-p\", \"50\"]"}}], "39": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"cpu_freq\", \"-p\", \"20\"]"}}], "100": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"cpu_freq\", \"-p\", \"30\"]"}}]}
\ No newline at end of file
27.191089999999996 30.520215 58.535 59.585 1.0
0 57.22 0.98 97.29
28 57.34 0.99 97.5
42 57.49 0.98 97.44
44 57.51 0.99 97.71
100 57.78 0.99 97.94
actions
{"0": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"cpu_freq\", \"-p\", \"10\"]"}}], "28": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"cpu_freq\", \"-p\", \"60\"]"}}], "42": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"cpu_freq\", \"-p\", \"70\"]"}}], "44": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"cpu_freq\", \"-p\", \"90\"]"}}], "100": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"cpu_freq\", \"-p\", \"20\"]"}}]}
\ No newline at end of file
27.191089999999996 30.520215 58.535 59.585 1.0
0 44.32 0.97 75.15
32 44.4 0.99 75.26
43 44.49 1.0 74.81
63 44.64 0.99 75.83
100 44.74 0.97 76.41
actions
{"0": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"cpu_freq\", \"-p\", \"20\"]"}}], "32": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"cpu_freq\", \"-p\", \"70\"]"}}], "43": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"cpu_freq\", \"-p\", \"50\"]"}}], "63": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"cpu_freq\", \"-p\", \"90\"]"}}], "100": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"cpu_freq\", \"-p\", \"0\"]"}}]}
\ No newline at end of file
[models]
app_map = { idle.sh = "",stress_memory_hdd.sh = "memory-bound",stress_only_cpu.sh = "cpu-bound",stress_cpu.sh = "default",stress_max.sh = "",gpu.sh = "gpu-bound",gpu_max.sh = ""}
#default_model = "cpu-bound"
#{type}_memory-bound=xeon_memory-bound.pm
xeon_memory-bound=xeon_memory-bound.pm
#{type}_default=xeon_default.pm
xeon_default=xeon_default.pm
#{type}_memory-bound=xeon.e.gpu.v40_memory-bound.pm
xeon.e.gpu.v40_memory-bound=xeon.e.gpu.v40_memory-bound.pm
#{type}_default=xeon.e.gpu.v40_default.pm
xeon.e.gpu.v40_default=xeon.e.gpu.v40_default.pm
#{type}_memory-bound=xeon.e.gpu.v100_memory-bound.pm
xeon.e.gpu.v100_memory-bound=xeon.e.gpu.v100_memory-bound.pm
#{type}_default=xeon.e.gpu.v100_default.pm
xeon.e.gpu.v100_default=xeon.e.gpu.v100_default.pm
#{type}_memory-bound=xeon.d_memory-bound.pm
xeon.d_memory-bound=xeon.d_memory-bound.pm
#{type}_default=xeon.d_default.pm
xeon.d_default=xeon.d_default.pm
#{type}_memory-bound=i5_memory-bound.pm
i5_memory-bound=i5_memory-bound.pm
#{type}_default=i5_default.pm
i5_default=i5_default.pm
#{type}_memory-bound=i7k40_memory-bound.pm
i7k40_memory-bound=i7k40_memory-bound.pm
#{type}_default=i7k40_default.pm
i7k40_default=i7k40_default.pm
# monitors
# <id> = "<command>"
# command should return 1 line per one invocation, values should be separated with ';'
# types:
# loop - useful when your cmd is one shot, and can be invoked from shell
# loopless - when shell command can measure in loop, without our help
# custom - user custom measure shell script, it is treated as loopless monitor, specified params are passed directly to script
#
# loop monitors has 1 build-in required parameter: interval time
# looples monitors has no build-in params
# loop and loopless monitors must print results to stdout
# custom monitors are... well, custom. Do whatever you want in your script (stdout will be redirected to result file)
#
# all monitors are killed after tested application ends
#
# if your loop[less] monitor needs custom parameters, you can add '{}' to your command, it will be replaced later:
# eg. "perf stat -e {} -I {}" (and later during binding: ["perf-stat", "event1,event2", "1000"])
#
# custom monitors don`t need '{}':
# eg. mcm = "my-custom-monitor.sh" (binding: ["mcm", "a", "b", "25"])
# remember to escape '{}', e.g. '{printf(\"%s;\"\\, $4)}' -> '{{printf(\"%s;\"\\, $4)}}'
# additional, unexpected parameters will be ignored
[loop]
free = {"name" = "free", exec = "free -m | awk 'NR==2 {{printf(\"%s;\"\\, $4)}}'"}
sensors-temp = {name = "temperature", exec = "sensors -u | egrep 'temp([2-9]|[1-9][0-9]+)_input:' | cut -d ' ' -f 4 | tr '\\n' ';'"}
sensors-power = {name = "power_usage", exec = "sensors -u | egrep 'power[1-9]+_average:' | cut -d ' ' -f 4 | tr '\\n' ';'"}
#recs-power = {name = "power_usage", exec = "sensors -u | egrep 'power[1-9]+_average:' | cut -d ' ' -f 4 | tr '\\n' ';'"}
#ipmi-power = {name = "power_usage", exec = "sensors -u | egrep 'power[1-9]+_average:' | cut -d ' ' -f 4 | tr '\\n' ';'"}
cpufreq-info = {name = "frequency", exec = "cpufreq-info | grep 'current CPU frequency is' | cut -d ' ' -f 7 | tr '\\n' ';'"}
[loopless]
perf-stat-std = {name = "perf-stat", exec = "perf stat -a -x\\; --log-fd 1 -I {} -e {}"}
perf-stat = {name = "perf-stat", exec = "sudo sh -c 'echo -1 >/proc/sys/kernel/perf_event_paranoid'; perf stat -a -x\\; --log-fd 1 -I {} -e {}"}
[custom]
# my_script.sh must be placed in 'scripts' directory!
my-super-monitor = {name = "perf-stat",exec = "my_script.sh {1} {0}" }
recs-power = {name = "power_usage",exec = "recs.power.sh {} {} {}" }
ipmi-power = {name = "power_usage",exec = "ipmi.power.sh {} {} {} {}" }
# environment
# declare environment modifier eg. cpu speed
# they are launched before test starts
[env]
null = "null.sh "
cpufreq-set = "cpufreq_set.sh {} {} "
raplapi = "raplapi.sh {} {}"
set = "rtm-set_property.sh {} {} {} {}"
set_timer = "set_timer.sh "
echo = "echo {}"
15.227649333333334 19.756119 27.070000000000004 54.43000000000001 1.0
0 26.5 0.1 96.91
3 27.31 0.22 98.73
33 35.47 0.69 92.7
60 42.98 0.83 94.7
100 53.78 1.0 98.81
actions
{"0": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"10\"]"}}], "3": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"30\"]"}}], "33": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"50\"]"}}], "60": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"60\"]"}}], "100": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"100\"]"}}]}
\ No newline at end of file
15.227649333333334 19.756119 27.070000000000004 54.43000000000001 1.0
0 25.49 0.14 93.28
1 25.63 0.2 92.72
76 35.42 0.99 65.07
78 35.61 0.96 66.58
100 37.8 0.95 70.39
actions
{"0": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"10\"]"}}], "1": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"30\"]"}}], "76": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"100\"]"}}], "78": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"80\"]"}}], "100": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"95\"]"}}]}
\ No newline at end of file
31.613885999999997 31.943408000000005 35.83 37.63 1.0
0 35.8 0.99 99.91
3 35.81 0.99 95.93
8 35.83 0.98 95.98
34 35.91 1.0 98.57
100 36.14 0.98 96.84
actions
{"0": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"50\"]"}}], "3": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"80\"]"}}], "8": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"0\"]"}}], "34": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"95\"]"}}], "100": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"10\"]"}}]}
\ No newline at end of file
31.613885999999997 31.943408000000005 35.83 37.63 1.0
0 34.62 1.0 96.57
14 34.78 0.96 97.08
50 35.23 0.98 96.68
73 35.51 0.99 95.15
100 35.83 0.96 95.22
actions
{"0": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"60\"]"}}], "14": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"50\"]"}}], "50": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"20\"]"}}], "73": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"10\"]"}}], "100": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"70\"]"}}]}
\ No newline at end of file
19.909766 20.522724 24.75 26.56 1.0
0 24.41 0.99 98.6
5 24.43 0.99 94.19
8 24.44 0.99 93.07
35 24.53 0.99 97.99
100 24.74 1.0 95.46
actions
{"0": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"50\"]"}}], "5": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"30\"]"}}], "8": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"20\"]"}}], "35": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"95\"]"}}], "100": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"0\"]"}}]}
\ No newline at end of file
19.909766 20.522724 24.75 26.56 1.0
0 23.52 0.99 95.02
13 23.68 0.98 95.67
26 23.84 1.0 95.24
77 24.45 0.98 93.13
100 24.73 0.99 93.21
actions
{"0": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"10\"]"}}], "13": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"80\"]"}}], "26": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"95\"]"}}], "77": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"90\"]"}}], "100": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"60\"]"}}]}
\ No newline at end of file
79.83333333333333 112.0 86.83333333333333 184.33333333333334 1.0
0 86.02 0.07 99.06
12 95.87 0.32 98.5
79 151.86 0.94 93.42
81 153.58 0.99 83.71
100 164.25 0.99 89.26
actions
{"0": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"10\"]"}}], "12": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"30\"]"}}], "79": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"60\"]"}}], "81": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"100\"]"}}], "100": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"95\"]"}}]}
\ No newline at end of file
79.83333333333333 112.0 86.83333333333333 184.33333333333334 1.0
0 83.74 0.16 96.43
29 96.21 0.65 98.86
75 115.69 0.92 99.03
91 122.44 0.99 66.72
100 124.54 0.93 67.87
actions
{"0": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"10\"]"}}], "29": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"30\"]"}}], "75": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"40\"]"}}], "91": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"80\"]"}}], "100": [{"resourceId": "", "powerAction": "set_property", "properties": {"value": "[\"-p\", \"rapl\", \"-p\", \"100\"]"}}]}
\ No newline at end of file
......@@ -38,6 +38,10 @@ class CurrentState(val powerUsage: Double) {
val unusedMachines: ArrayList<NodeUtil> = ArrayList()
private var activeMachines: ArrayList<NodeUtil> = ArrayList()
fun getNodeUtil(resourceId: String):NodeUtil? {
return activeMachines.find { it.nodeId == resourceId }
?: this.unusedMachines.find { it.nodeId == resourceId }?:null
}
/**
* filtered node resources Map
......@@ -64,17 +68,22 @@ class CurrentState(val powerUsage: Double) {
val currentProfile = nodeUtil?.loadProfile ?: ActionCache.getProfile(node.id)
nodeMap[node.id] = NodeState(node, power, currentPerf, currentProfile)
val model = DAO.Resource.getComponentPowerModel(node.typeId, null)!!
val util = if (PCMApi.instance().getPowerCappingStrategy() == PowerCappingStrategy.EAGER)
100.0
else
nodeUtil?.utilization ?: model.getUtil(power, currentPerf)
// printConsole("util for: ${node.id}- $util/$power")
val newNodeUtil = NodeUtil(node.id, util, power, currentProfile, null, currentTimeInterval)
currentUtil[node.id] = newNodeUtil
var currentUtilization = nodeUtil?.utilization ?: model.getUtil(power, currentPerf)
// val util = if (PCMApi.instance().getPowerCappingStrategy() == PowerCappingStrategy.EAGER)
// 100.0
// else
// nodeUtil?.utilization ?: model.getUtil(power, currentPerf)
//// printConsole("util for: ${node.id}- $util/$power")
var newNodeUtil = NodeUtil(node.id, currentUtilization, power, currentProfile, null, currentTimeInterval)
// currentUtil[node.id] = newNodeUtil
if (newNodeUtil.isInUse(currentTimeInterval)) {
this.activeMachines.add(newNodeUtil)
val priority = StorageKeys.NODE_PRIORITIES_MAP[node.id]?.weight ?: 0.5
val state = StateDefinition(model, util, currentPerf, priority)
if (PCMApi.instance().getPowerCappingStrategy() == PowerCappingStrategy.EAGER) {
newNodeUtil = NodeUtil(node.id, 100.0, power * 100 / currentUtilization, currentProfile, null, currentTimeInterval)
}
//TODO: przy eager mode przeliczyc overlimit i zuzucia renergi
val state = StateDefinition(model, newNodeUtil.utilization!!, currentPerf, priority)
if (this.canSetPerformance(node.id))
eval.addState(node.id, state)
} else {
......@@ -82,6 +91,7 @@ class CurrentState(val powerUsage: Double) {
}
})
this.orderUnusedMachines()
this.orderMachines()
// printConsole("${this.activeMachines} unused: ${this.unusedMachines}")
......
......@@ -5,15 +5,15 @@ import psnc.m2dc.rtm.model.rpm.ComponentPowerModel
import psnc.m2dc.rtm.model.rpm.ComponentPowerModel.Companion.MAX_PERFORMANCE_LVL
import psnc.m2dc.rtm.model.rpm.StateDefinition
import psnc.m2dc.rtm.properties.RTMProperties
import psnc.m2dc.rtm.utils.logInfo
import psnc.m2dc.rtm.utils.toJson
/**
* Created by Tomek on 2018-04-20.
* @tradeoff power and energy efficiency tradeoff - α, (1- maximum performance, 0 – maximum energy efficiency), α ε * <0,1>
* @impact tradeoff impact - β, β ε<0,∞)
* @tradeoff power and energy efficiency tradeoff - α, (0- maximum performance, 1 – maximum energy efficiency), α ε * <0,1>
* @impact tradeoff's impact - β, β ε<0,∞)
*/
class Evaluation(initialPowerToReduce: Double, tradeOff: Double = 0.6, impact: Double = 1.0, val
advancedPriorityMode: Boolean = true) {
class Evaluation(initialPowerToReduce: Double, tradeOff: Double = 0.4, private val advancedPriorityMode: Boolean = true) {
/* poweroverlimit = - PowerBudget*/
private var mPowerOverLimit = initialPowerToReduce
......@@ -35,11 +35,10 @@ advancedPriorityMode: Boolean = true) {
}
val alpha: Double
val beta: Double
//#region initializers
constructor(powerCap: Double, mode: PowerMode, advancedPriorityMode: Boolean = true) : this(powerCap, mode.alpha,
mode.beta, advancedPriorityMode)
advancedPriorityMode)
enum class PriorityGroup(val min: Double, val max: Double, val priorityValue: Double) {
zero(-1.0, 0.0, 0.0),
......@@ -58,7 +57,7 @@ advancedPriorityMode: Boolean = true) {
}
open class PowerMode(val alpha: Double, val beta: Double = 1.5) {
open class PowerMode(val alpha: Double/*,val beta: Double=1.0*/) {
companion object {
fun valueOf(s: String) = when (s) {
"MAX_PERFORRMANCE" -> MAX_PERFORRMANCE
......@@ -70,16 +69,14 @@ advancedPriorityMode: Boolean = true) {
}!!
}
override fun toString(): String {
return this::class.java.simpleName
}
override fun toString() = this::class.java.simpleName
object MAX_PERFORRMANCE : PowerMode(1.0, 2.0)
object PERFORMANCE : PowerMode(0.85, 1.5)
object BALANCED : PowerMode(0.5, 1.0)
object EFFICIENCY : PowerMode(0.15, 1.5)
object MAX_EFFICIENCY : PowerMode(0.0, 2.0)
class CUSTOM(alpha: Double, beta: Double = 1.5) : PowerMode(alpha, beta) {
object MAX_PERFORRMANCE : PowerMode(0.0)
object PERFORMANCE : PowerMode(0.2)
object BALANCED : PowerMode(0.55)
object EFFICIENCY : PowerMode(0.85)
object MAX_EFFICIENCY : PowerMode(1.0)
class CUSTOM(alpha: Double) : PowerMode(alpha) {
override fun toString(): String {
return this.toJson()
}
......@@ -98,11 +95,8 @@ advancedPriorityMode: Boolean = true) {
} else {
throw IllegalArgumentException("trade off value must be between 0 and 1 inclusively")
}
if (impact >= 0.0) {
beta = impact
} else {
throw IllegalArgumentException("impact value must be positive")
}
logInfo("Evaluation tradeOff (alpha parameter): $alpha")
}
//#endregion
......@@ -180,7 +174,7 @@ advancedPriorityMode: Boolean = true) {
perfLvlxMap.forEach { key, perfLvlx ->
val state = this.stateMap.get(key)!!
val util = state.model.calculateUtil(perfLvlx,state.perfLevel, state.util)
val util = state.model.calculateUtil(perfLvlx, state.perfLevel, state.util)
sum += state.power - state.model.getPower(perfLvlx, util)
}
......@@ -191,7 +185,7 @@ advancedPriorityMode: Boolean = true) {
val state = this.stateMap.get(resourceId)!!
val util = state.model.calculateUtil( perfLvlx,state.perfLevel, state.util)
val util = state.model.calculateUtil(perfLvlx, state.perfLevel, state.util)
return state.model.getPower(perfLvlx, util)
}
......@@ -226,19 +220,13 @@ advancedPriorityMode: Boolean = true) {
// }
//
// fun getPowerSavings(i0: StateDefinition, perfLvlx: Double): Double {
// val utilx = i0.model.recalculateUtil(i0.perfLevel, perfLvlx, i0.util)
// val powerx = i0.model.getPower(perfLvlx, utilx)
// val powerChange = i0.power - powerx
// return powerChange
// }
fun evaluateState(currentState: StateDefinition, perfLvlx: Double, print: Boolean = false): Double {
val model = currentState.model
// power_{iyi}*r(i)(t_{ij})^{\alpha}(eff_{ij})^{1-\alpha}
val util0 = model.calculateUtil(MAX_PERFORMANCE_LVL, currentState.perfLevel, currentState.util)
val power = model.getPower(MAX_PERFORMANCE_LVL, util0) //TODO: czy na pewno skalować przez utylizacje
val util_0 = model.calculateUtil(MAX_PERFORMANCE_LVL, currentState.perfLevel, currentState.util)
val power = model.getPower(MAX_PERFORMANCE_LVL, util_0) //TODO: czy na pewno skalować przez utylizacje
val r_i = if (currentState.priority > 0.0 && currentState.priority < 1.0) (currentState.priority) / (1 - currentState.priority) else 1.0
val performanceImpact = Math.pow(model.getPerformance(perfLvlx), alpha)
......
package psnc.m2dc.rtm.commands.java
val APP_VERSION = "1.0.529_76456"
\ No newline at end of file
val APP_VERSION = "1.0.530_65154"
\ No newline at end of file
package psnc.m2dc.rtm.client
const val APP_VERSION = "1.1.529_76456"
\ No newline at end of file
const val APP_VERSION = "1.1.530_65155"
\ No newline at end of file
......@@ -20,8 +20,8 @@ class RTM {
val recs_hosts_file = RTMProperty(RTM + "recs_hosts_file", null, String::class.java)
val recs_hosts = RTMProperty(RTM + "recs_hosts", arrayOf<String>(), description = "comma separated list of hosts")
val resource_file = RTMProperty(RTM + "resource_file", "\$[basePath]/conf/resources.conf", String::class.java)
val resource_json_file = RTMProperty(RTM + "resource_json_file", "\$[basePath]/conf/resources.json", String::class.java,description = " File containing resource properties in json format")
// val file_storage_location = RTMProperty(RTM + "file_storage_location", null, String::class.java)
val resource_json_file = RTMProperty(RTM + "resource_json_file", "\$[basePath]/conf/resources.json", String::class.java, description = " File containing resource properties in json format")
// val file_storage_location = RTMProperty(RTM + "file_storage_location", null, String::class.java)
val remote_script_location = RTMProperty(RTM + "remote_script_location", "/home/\$user/rtm/bin")
val ipmi_privilage_lvl = RTMProperty(RTM + "ipmi_privilage_lvl", null, PrivLvl::class.java, description = "CALLBACK, USER, OPERATOR, ADMINISTRATOR")
......@@ -31,45 +31,23 @@ class RTM {
val default_ssh_user = RTMProperty(RTM + "default_ssh_user", null, String::class.java)
val model_map_directory = RTMProperty(RTM + "model_map_directory", "\$[basePath]/models",
String::class.java)
val notification_endpoint = RTMProperty(RTM + "notification_endpoint",
"example.org", description = "Notify about actions")
val notification_endpoint = RTMProperty(RTM + "notification_endpoint", null, description = "Notify about actions")
// val model_map by lazy {
// val x = RTMProperties.storageWrapper.getMapKey<ComponentPowerModel>(PCM + "model_map",
// ComponentPowerModelMapWrapperInstance)
// val default = ComponentPowerModel.default("default");
// x.set(default.name, default);
// x
// }
val model_map_file = RTMProperty(RTM + "model_map_file", " \$[basePath]/models/model_map.txt ", String::class.java)
val resource_type_map = RTMMapProperty(RTM + "resource_type_map", GenericTypeMapWrapper.get<ResourceType>(ResourceTypeMapWrapperInstance),"\$[file]\$[basePath]/models/type.map.json")
val resource_type_map = RTMMapProperty(RTM + "resource_type_map", GenericTypeMapWrapper.get<ResourceType>(ResourceTypeMapWrapperInstance), "\$[file]\$[basePath]/models/type.map.json")
val scan_timeout_ms = RTMProperty(RTM + "scan_timeout_ms", 60000L)
val scan_thread = RTMProperty(RTM + "scan_thread", true)
// moved to filestorage keys
// val online_data_timeout = RTMProperty(RTM + "online_data_timeout", 15000L /* 1000L*/)
// moved to filestorage keys
// val online_data_timeout = RTMProperty(RTM + "online_data_timeout", 15000L /* 1000L*/)
val debug_actions = RTMProperty(RTM + "debug_actions", false)
val power_setting_evaluation_mode = RTMProperty(RTM + "power_setting_evaluation_mode", "BALANCED")
val power_setting_evaluation_mode = RTMProperty(RTM + "power_setting_evaluation_mode", "BALANCED", description = """
MAX_PERFORRMANCE(0.0), PERFORMANCE(0.2) ,BALANCED(0.55), EFFICIENCY (0.85),MAX_EFFICIENCY (1.0), CUSTOM: {"alpa":0.3}
""".trimIndent())
val management_threadpool_size = RTMProperty(RTM + "management_threadpool_size", 10)
val load_node_children = RTMProperty(RTM + "load_node_children", false)
// val recs_node_filter = RTMProperty(RTM + "recs_node_filter",
// arrayOf<String>())
// val host_block_filter = RTMProperty(RTM + "host_block_filter",
// arrayOf<String>())
// val node_block_filter = RTMProperty(RTM + "node_block_filter",
// arrayOf<String>())
// val resource_action_ttl = RTMProperty(RTM + "resource_action_ttl",
// 86400000L)
// val algorithm_ahead_buffer = RTMProperty(RTM + "algorithm_ahead_buffer",
// 1800L)
// val performance_workers_count = RTMProperty(RTM + "performance_workers_count",
// 10)
// val node_power_model_map = RTMMapProperty(
// RTM + "node_power_model_map",
// GenericTypeMapWrapper.get<String>(MapWrapperInstance))
val dump_current_state = RTMProperty(RTM + "dump_current_state", false, description = "Dump current RTM's algorithm state to file. ")
val dump_current_state_count = RTMProperty(RTM + "dump_current_state_count", 10, description = "Number of current RTM's algorithm states. (set -1 for infinite) ")
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment