Open adamnovak opened 3 months ago
See also: https://github.com/chanzuckerberg/miniwdl/issues/244 where the feature was originally specced out.
@adamnovak on defaults, miniwdl delegates the container scheduling to Docker Swarm, so it doesn't directly control how many CPUs will be scheduled concurrently. Maybe there's a way to reconfigure Docker Swarm's scheduler to limit how many CPUs it'll occupy?
The [scheduler] task_concurrency
setting indeed bounds the number of tasks submitted to Docker Swarm -- more specifically the size of the thread pool miniwdl uses to run drive tasks concurrently (one orchestration thread per task). I don't see a reasonable default value for that other than the number of CPUs, though I don't disagree that can promote misinterpretation. That setting ends up being used more in the cloud backends where it's going to limit how many concurrent tasks will be hitting the shared filesystem, for example.
I'm running a workflow like this:
My machine has 160 cores, but I want to limit the workflow to 80 so that some cores are available for other users.
But my terminal shows:
Even though I set
MINIWDL__SCHEDULER__TASK_CONCURRENCY
to80
, the workflow is still using 160 cores across 10 running tasks.Is
MINIWDL__SCHEDULER__TASK_CONCURRENCY
actually in raw tasks independent of how many CPUs they get? If so, why does it default to the number of cores on the machine? Is there not a way to limit a MiniWDL execution to, say, either 8 tasks of 10 cores each or 80 tasks of 1 core each by limiting the total cores used?