You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Klaus Ma <kl...@gmail.com> on 2015/12/08 07:05:19 UTC

Docker Executor in Mesos

Hi team,

Currently, if we run docker in mesos, we'll start docker-executor, "docker
run" and container in slave hosts. So why not use one executor to launch
docker tasks? One reason I can image is compatibility of docker API. If
there're thousands of tasks in a powerful task, do you get docker startup
performance issue?

----
Da (Klaus), Ma (马达) | PMP® | Advisory Software Engineer
Platform Symphony/DCOS Development & Support, STG, IBM GCG
+86-10-8245 4084 | klaus1982.cn@gmail.com | http://k82.me

Re: Docker Executor in Mesos

Posted by "Du, Fan" <fa...@intel.com>.

On 2015/12/8 16:00, Guangya Liu wrote:
> Some comments in line.
>
> Thanks,
>
> Guangya
>
> On Tue, Dec 8, 2015 at 2:13 PM, Du, Fan<fa...@intel.com>  wrote:
>
>> >
>> >So why not use one executor to launch docker tasks?
>>> >>
>> >
>> >Each task resides(or runs to be more precisely) in its own docker
>> >container,
>> >Every docker container is an executor by its nature.
>> >If you launch 6 instances of task, there will be 6 docker
>> >containers(docker ps).
>> >
>> >I'm not sure what's the intention of "use one executor to launch docker
>> >tasks",
>> >and how to do this.
> The Kubernetes+Mesos is using such logic, it is using one executor to
> manage all of the pods on one slave host, this can definitely reduce the
> resource usage overhead. The current docker executor will waste a lot of
> resources as it request one extra container.

Good to know, thanks for the pointer!
I will take a look at this.

Re: Docker Executor in Mesos

Posted by "Du, Fan" <fa...@intel.com>.

On 2015/12/8 22:48, Chengwei Yang wrote:
> On Tue, Dec 08, 2015 at 08:27:32PM +0800, tommy xiao wrote:
>> >"The current docker executor will waste a lot of
>> >resources as it request one extra container."  Guangya  could you please
>> >show the code?
> It's the mesos-docker-executor I think, which just spawn `docker run`
> and wait, doesn't cost a lot of resource I think.

Yes. I think Klaus is pointing at mesos-docker-executor exactly.

Here is its memory footprint.
# smemstat -p pidof mesos-docker-executor -k
   PID       Swap       USS       PSS       RSS User       Command
  96133         0      3120      3189     17480 root 
mesos-docker-executor
Total:         0      3120      3189     17480


- mesos-docker-executor itself, without proportional shared library, 
costs 3120KB memory.
- Counting into proportional shared library(there are about 200 
executors on my env), it's 3189KB.
- Share library used here is about 14MB, mainly libmesos-0.25.0.so, 
which takes up to 10MB.
   Use pmap to get more details.

IMO, it hurts when running small footprint containers like busybox as 
I'm currently doing,
the memory of executor nearly is same as docker instance.



Re: Docker Executor in Mesos

Posted by Chengwei Yang <ch...@gmail.com>.
On Tue, Dec 08, 2015 at 08:27:32PM +0800, tommy xiao wrote:
> "The current docker executor will waste a lot of
> resources as it request one extra container."  Guangya  could you please
> show the code?

It's the mesos-docker-executor I think, which just spawn `docker run`
and wait, doesn't cost a lot of resource I think.

-- 
Thanks,
Chengwei

> 
> 2015-12-08 16:00 GMT+08:00 Guangya Liu <gy...@gmail.com>:
> 
> > Some comments in line.
> >
> > Thanks,
> >
> > Guangya
> >
> > On Tue, Dec 8, 2015 at 2:13 PM, Du, Fan <fa...@intel.com> wrote:
> >
> > >
> > > So why not use one executor to launch docker tasks?
> > >>
> > >
> > > Each task resides(or runs to be more precisely) in its own docker
> > > container,
> > > Every docker container is an executor by its nature.
> > > If you launch 6 instances of task, there will be 6 docker
> > > containers(docker ps).
> > >
> > > I'm not sure what's the intention of "use one executor to launch docker
> > > tasks",
> > > and how to do this.
> >
> > The Kubernetes+Mesos is using such logic, it is using one executor to
> > manage all of the pods on one slave host, this can definitely reduce the
> > resource usage overhead. The current docker executor will waste a lot of
> > resources as it request one extra container.
> >
> > >
> > >
> > > On 2015/12/8 14:05, Klaus Ma wrote:
> > >
> > >> Hi team,
> > >>
> > >> Currently, if we run docker in mesos, we'll start docker-executor,
> > "docker
> > >> run" and container in slave hosts. So why not use one executor to launch
> > >> docker tasks? One reason I can image is compatibility of docker API. If
> > >> there're thousands of tasks in a powerful task, do you get docker
> > startup
> > >> performance issue?
> > >>
> > >> ----
> > >> Da (Klaus), Ma (马达) | PMP® | Advisory Software Engineer
> > >> Platform Symphony/DCOS Development & Support, STG, IBM GCG
> > >> +86-10-8245 4084 | klaus1982.cn@gmail.com | http://k82.me
> > >>
> > >>
> >
> 
> 
> 
> -- 
> Deshi Xiao
> Twitter: xds2000
> E-mail: xiaods(AT)gmail.com

Re: Docker Executor in Mesos

Posted by tommy xiao <xi...@gmail.com>.
"The current docker executor will waste a lot of
resources as it request one extra container."  Guangya  could you please
show the code?

2015-12-08 16:00 GMT+08:00 Guangya Liu <gy...@gmail.com>:

> Some comments in line.
>
> Thanks,
>
> Guangya
>
> On Tue, Dec 8, 2015 at 2:13 PM, Du, Fan <fa...@intel.com> wrote:
>
> >
> > So why not use one executor to launch docker tasks?
> >>
> >
> > Each task resides(or runs to be more precisely) in its own docker
> > container,
> > Every docker container is an executor by its nature.
> > If you launch 6 instances of task, there will be 6 docker
> > containers(docker ps).
> >
> > I'm not sure what's the intention of "use one executor to launch docker
> > tasks",
> > and how to do this.
>
> The Kubernetes+Mesos is using such logic, it is using one executor to
> manage all of the pods on one slave host, this can definitely reduce the
> resource usage overhead. The current docker executor will waste a lot of
> resources as it request one extra container.
>
> >
> >
> > On 2015/12/8 14:05, Klaus Ma wrote:
> >
> >> Hi team,
> >>
> >> Currently, if we run docker in mesos, we'll start docker-executor,
> "docker
> >> run" and container in slave hosts. So why not use one executor to launch
> >> docker tasks? One reason I can image is compatibility of docker API. If
> >> there're thousands of tasks in a powerful task, do you get docker
> startup
> >> performance issue?
> >>
> >> ----
> >> Da (Klaus), Ma (马达) | PMP® | Advisory Software Engineer
> >> Platform Symphony/DCOS Development & Support, STG, IBM GCG
> >> +86-10-8245 4084 | klaus1982.cn@gmail.com | http://k82.me
> >>
> >>
>



-- 
Deshi Xiao
Twitter: xds2000
E-mail: xiaods(AT)gmail.com

Re: Docker Executor in Mesos

Posted by Guangya Liu <gy...@gmail.com>.
Some comments in line.

Thanks,

Guangya

On Tue, Dec 8, 2015 at 2:13 PM, Du, Fan <fa...@intel.com> wrote:

>
> So why not use one executor to launch docker tasks?
>>
>
> Each task resides(or runs to be more precisely) in its own docker
> container,
> Every docker container is an executor by its nature.
> If you launch 6 instances of task, there will be 6 docker
> containers(docker ps).
>
> I'm not sure what's the intention of "use one executor to launch docker
> tasks",
> and how to do this.

The Kubernetes+Mesos is using such logic, it is using one executor to
manage all of the pods on one slave host, this can definitely reduce the
resource usage overhead. The current docker executor will waste a lot of
resources as it request one extra container.

>
>
> On 2015/12/8 14:05, Klaus Ma wrote:
>
>> Hi team,
>>
>> Currently, if we run docker in mesos, we'll start docker-executor, "docker
>> run" and container in slave hosts. So why not use one executor to launch
>> docker tasks? One reason I can image is compatibility of docker API. If
>> there're thousands of tasks in a powerful task, do you get docker startup
>> performance issue?
>>
>> ----
>> Da (Klaus), Ma (马达) | PMP® | Advisory Software Engineer
>> Platform Symphony/DCOS Development & Support, STG, IBM GCG
>> +86-10-8245 4084 | klaus1982.cn@gmail.com | http://k82.me
>>
>>

Re: Docker Executor in Mesos

Posted by "Du, Fan" <fa...@intel.com>.
> So why not use one executor to launch docker tasks?

Each task resides(or runs to be more precisely) in its own docker container,
Every docker container is an executor by its nature.
If you launch 6 instances of task, there will be 6 docker 
containers(docker ps).

I'm not sure what's the intention of "use one executor to launch docker 
tasks",
and how to do this.

On 2015/12/8 14:05, Klaus Ma wrote:
> Hi team,
>
> Currently, if we run docker in mesos, we'll start docker-executor, "docker
> run" and container in slave hosts. So why not use one executor to launch
> docker tasks? One reason I can image is compatibility of docker API. If
> there're thousands of tasks in a powerful task, do you get docker startup
> performance issue?
>
> ----
> Da (Klaus), Ma (马达) | PMP® | Advisory Software Engineer
> Platform Symphony/DCOS Development & Support, STG, IBM GCG
> +86-10-8245 4084 | klaus1982.cn@gmail.com | http://k82.me
>