Hi all. I am curious about how to impose global re...
# nostupidquestions
r
Hi all. I am curious about how to impose global resource limit ( max resource ) via a nfcore config. I followed the example here https://nf-co.re/docs/usage/getting_started/configuration And set my nfcore.config to look like this
Copy code
process {
 resourceLimits = [
  cpus: 24,
  memory: 512.GB
 ]
}
However upon execution of a pipleline, the pipeline is still taking up almost all available CPU resources, which in my case I have 128 threads on the workstation and almost all threads are saturated. Am I doing this wrong? How to perform global resource limit?
p
These limits address what resources nextflow thinks there are.
Whatever the process resources actually restricts the process is another thing. Typically if you use a scheduler, they will.
If you're using the
local
executor they won't (unless if you're using Docker with a more recent nextflow).
r
I see. My runs are direct executions locally, not through schedulers. In this case I will look to apply global docker level resources constrains. Thank you for clearing things up!
a
Also worth noting that these are per-process resource limits and that Nextflow will still just try to launch as many processes in parallel as it can. If you want to limit the total resources of all jobs that is a bit trickier and typically needs to be done via scheduler limits or for local executors, using
maxForks
can help.