Is there a way to enforce max memory and time give...
# nostupidquestions
e
Is there a way to enforce max memory and time given to a process, when there is no scheduler? A colleague is working on a shared server, but there is no scheduler there, and even though defines a label_high for a module, it will still keep sucking all the resources.
m
I'd recommend using a custom config, and a with name selector to control the allocated resources for it
e
We do have that
I first show this behavior on my laptop; it doesn't care about the withName limits I set..it bypasses them without failing the job
Maybe because there are not 'jobs' without a scheduler?
e
A single job will use the specified recourses but if you have multiple samples (or multiple same job pending) it will still fill up your memory and cpus to run in parallel as many processes fit on your system.
e
We have multiple samples, but maxForks 1, and still one jobs fills it by itself and crashes :D
e
I believe resourceLimits should help in this case
Ah if a single job fills up all the memory thats different
e
Hmm I dont remember them helping with my local test profile, but I'll try once more
m
Set the cpu and memory with the executor specific configuration: https://www.nextflow.io/docs/latest/reference/config.html#executor-specific-configuration
e
I think this will do it!!!
n
With local you cannot really limit memory, because it is not something the scheduler can do, you can enforce memory through container engines.
Not sure about time, but why would you need to explicitly limit time for something that is not shared, you do not really need to schedule around this task?
e
Ah no, @Mahesh Binzer-Panchal this (e.g. executor.memory) will only enforce it if the
withName
asks for more than it. If my module asks for less than the limit, it will be allowed to start, but then will still start hogging the memory without anything stopping it.
@Niklas Schandry I do run with singularity, and it's still the same. Or is there a setting somewhere else?
n
According to the docs only docker and podman actually enfore limits
this 1
e
can you share the paragraph that says that please?
n
(memory limits that is)
the note
e
Thank you so much....
t
All the things that Nextflow does about resource allocation is to pass it on to the scheduler, etc. You need some mechanism to actually enforce them (which e.g. SLURM does, or Docker, but not the
local
executor).
👍 2