It works
This commit is contained in:
@@ -91,7 +91,7 @@ class K8sRuntimeEstimator {
|
||||
double estimate(String taskName, long inputSize) {
|
||||
Function estimator = estimators.get(taskName)
|
||||
if (estimator == null) {
|
||||
log.warn "[K8s] Unable to estimate take ${taskName}: unknown task"
|
||||
//log.warn "[K8s] Unable to estimate take ${taskName}: unknown task"
|
||||
return Double.POSITIVE_INFINITY
|
||||
}
|
||||
return estimator.estimate(inputSize)
|
||||
|
||||
@@ -82,6 +82,7 @@ class K8sDVFSSchedulingStrategy implements K8sSchedulingStrategy {
|
||||
for (AssignedTask t : tasks) {
|
||||
max = Long.max(t.frequency, max)
|
||||
}
|
||||
log.info "[K8s] node ${name} running at ${max} Hz / ${maxFrequency} Hz ${((double)max/(double)maxFrequency) * 100.0}%"
|
||||
dvfsClient.setNodeFrequency(name, (int)max)
|
||||
this.currentFrequency = max
|
||||
}
|
||||
@@ -92,7 +93,7 @@ class K8sDVFSSchedulingStrategy implements K8sSchedulingStrategy {
|
||||
this.allocatedMemory += reqBytes
|
||||
this.allocatedCPUs += reqCPUs
|
||||
|
||||
log.info "[K8s] node ${name}: task ${task.name} assigned, now have ${availableMemory} bytes and ${availableCPUs} cpus [${reqBytes}, ${reqCPUs}]"
|
||||
log.info "[K8s] node ${name}: task ${task.name} assigned, now have ${availableMemory} bytes and ${availableCPUs} cpus [${reqBytes}, ${reqCPUs}]: at ${frequency}/${maxFrequency}"
|
||||
this.tasks.add(new AssignedTask(task, frequency))
|
||||
updateFrequency(dvfsClient)
|
||||
}
|
||||
@@ -189,7 +190,7 @@ class K8sDVFSSchedulingStrategy implements K8sSchedulingStrategy {
|
||||
ArrayList<WorkerNode> suitableNodes = filterNodes(req.task)
|
||||
if (suitableNodes.size() == 0) {
|
||||
if (!anyNode(req.task)) {
|
||||
log.error "[K8s] unable to schedule task ${req.task} - no node satisfies resource requirements"
|
||||
//log.error "[K8s] unable to schedule task ${req.task} - no node satisfies resource requirements"
|
||||
return null
|
||||
}
|
||||
/* No node can currently execute this task, but it should be possible in the future */
|
||||
@@ -271,7 +272,7 @@ class K8sDVFSSchedulingStrategy implements K8sSchedulingStrategy {
|
||||
final int reqCPUs = getTaskCPURequirement(task)
|
||||
ArrayList<WorkerNode> suitableNodes = new ArrayList<>()
|
||||
for (WorkerNode n : nodes) {
|
||||
if (n.availableMemory >= reqBytes && n.availableCPUs >= reqCPUs) {
|
||||
if (n.availableMemory > reqBytes && n.availableCPUs > reqCPUs) {
|
||||
log.info "[K8s] task ${task.name}: ${reqBytes} bytes ${reqCPUs} cpus: node ${n.name} has ${n.availableMemory} bytes, ${n.availableCPUs} cpus"
|
||||
suitableNodes.add(n)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user