You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mesos.apache.org by Li Jin <ic...@gmail.com> on 2013/08/22 17:16:34 UTC

Questions on implementing mesos framework

Hi guys,

I am trying to implement a mesos framework. Here are some questions I have:

(1) One thing particular I found unexpected is that the executors are
shutdown if the scheduler is shutdown. Is there a way to keep
executors/tasks running when the scheduler is down? I would imagine when
the scheduler comes back, it could reestablish the state somehow and keep
going without interrupting the running tasks. Is this a use case that mesos
is designed for?

(2) How does mesos use cgroups? In particular, if I launch two tasks with
the same executor, each take 10G memory, does mesos put my executor in a
cgroup with 20G memory limit? If not, how does it work

Thank you,
Li

Re: Questions on implementing mesos framework

Posted by Vinod Kone <vi...@gmail.com>.

> (1) One thing particular I found unexpected is that the executors are shutdown if the scheduler is shutdown. Is there a way to keep executors/tasks running when the scheduler is down? I would imagine when the scheduler comes back, it could reestablish the state somehow and keep going without interrupting the running tasks. Is this a use case that mesos is designed for?
> 
You can use FrameworkInfo.failover_timeout to tell Mesos how long to wait for the framework to re-register before it cleans up the framework's executors and tasks. 

Also, note that for this to work the framework has to persist its frameworkId when it first registers with the master.  When the framework comes back up it needs to reconnect by setting FrameworkInfo.framework_id = persisted id. 


> (2) How does mesos use cgroups? In particular, if I launch two tasks with the same executor, each take 10G memory, does mesos put my executor in a cgroup with 20G memory limit? If not, how does it work
> 

That's correct. Each executor is run in its own cgroup. If you want to isolate your tasks run them in different executors. 
> Thank you,
> Li