This commit is contained in:
2026-07-10 22:19:33 +02:00
parent ca45b4069f
commit 7b9188ab54
3 changed files with 7 additions and 6 deletions

View File

@@ -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)

View File

@@ -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)
}

View File

@@ -22,7 +22,7 @@ k8s {
projectDir = '/workspace/projects'
cleanup = false
nextflowImage = 'gitea.kleine.eulenhexe.de/kevin/ma/nextflow-dvfs:0.6.15'
nextflowImage = 'gitea.kleine.eulenhexe.de/kevin/ma/nextflow-dvfs:0.6.18'
imagePullPolicy = 'IfNotPresent'
schedulerInterval = '10s'
recordTaskRuntimes = true
@@ -33,7 +33,7 @@ k8s {
image = 'gitea.kleine.eulenhexe.de/kevin/ma/dvfs-agent:0.2.0'
command = ['/usr/local/bin/agent']
wait = 'Running'
cleanup = false
cleanup = true
}
}