nextflow-io/nextflow

How to set the computing resources (cpus, memory) in total submitted jobs

Open

#5.702 aberto em 23 de jan. de 2025

Ver no GitHub
 (6 comments) (0 reactions) (0 assignees)Groovy (784 forks)batch import
executor/slurmgood first issuestale

Métricas do repositório

Stars
 (3.382 stars)
Métricas de merge de PR
 (Mesclagem média 3d 18h) (38 fundiu PRs em 30d)

Description

Use cases: I have a SLURM HPC with small computing resources and a few users. What I want is that when l run a nextflow pipeline that it can limit the total cpus and memory. For example, I have 10 jobs, each job requires 4 cpus and 8.GB memory. However, I want to run only with overall cpus in total is 8 cpus and 16 GB memory. As a result, it will only submit the jobs with 2 jobs. It will wait on done to submit next 4 times. However, nextflow only limits cpus and memory in each process that I can not control this.

One possible solution is using the queueSize and resourceLimits. I can set the queue sizes to be 2, the max cpus and max memory is 4. However, it takes time if I have the too many small resources processes (1 cpus, 2GB memory), it can be run 4 processes each time however, due to the queue size, it can only submit with 2 processes. Is there any alternative solution that I may miss via the nextflow documentation?

Guia do colaborador