mesosmesospheremesos-chronos

Modifying number of tasks executed on mesos slave


In a Mesos ecosystem(master + scheduler + slave), with the master executing tasks on the slaves, is there a configuration that allows modifying number of tasks executed on each slave?

Say for example, currently a mesos master runs 4 tasks on one of the slaves(each task is using 1 cpu). Now, we have 4 slaves(4 cores each) and except for this one slave the other three are not being used.
So, instead of this execution scenario, I'd rather prefer the master running 1 task on each of the 4 slaves.

I found this stackoverflow question and these configurations relevant to this case, but still not clear on how to use the --isolation=VALUE or --resources=VALUE configuration here.

Thanks for the help!


Solution

  • Was able to reduce number of tasks being executed on a single host at a time by adding the following properties to startup script for mesos agent.
    --resources="cpus:<<value>>" and --cgroups_enable_cfs=true.

    This however does not take care of the concurrent scheduling issue where the requirement is to have each agent executing a task at the same time. For that need to look into the scheduler code as also suggested above.