diff --git a/nextflow/plugins/nf-k8s/src/main/nextflow/k8s/K8sRuntimeEstimator.groovy b/nextflow/plugins/nf-k8s/src/main/nextflow/k8s/K8sRuntimeEstimator.groovy index e554b7a..71a8d6d 100644 --- a/nextflow/plugins/nf-k8s/src/main/nextflow/k8s/K8sRuntimeEstimator.groovy +++ b/nextflow/plugins/nf-k8s/src/main/nextflow/k8s/K8sRuntimeEstimator.groovy @@ -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) diff --git a/nextflow/plugins/nf-k8s/src/main/nextflow/k8s/strategies/K8sDVFSSchedulingStrategy.groovy b/nextflow/plugins/nf-k8s/src/main/nextflow/k8s/strategies/K8sDVFSSchedulingStrategy.groovy index 2bc46c6..554d04b 100644 --- a/nextflow/plugins/nf-k8s/src/main/nextflow/k8s/strategies/K8sDVFSSchedulingStrategy.groovy +++ b/nextflow/plugins/nf-k8s/src/main/nextflow/k8s/strategies/K8sDVFSSchedulingStrategy.groovy @@ -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 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 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) } diff --git a/test/nextflow.config b/test/nextflow.config index 0d8efde..43fdbba 100644 --- a/test/nextflow.config +++ b/test/nextflow.config @@ -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 } }