You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mesos.apache.org by Asim <li...@gmail.com> on 2014/07/11 18:06:07 UTC

mesos isolation

Hi,

I am running a job on few machines in my Linux cluster. Each machine is an
Intel 8 core (with 32 threads). I see a total of 32 CPUs in /etc/cpuinfo
and within mesos web interface. When I launch a job using mesos, I see that
all CPUs are used equally and not just the number of CPUs I specify for
that task.

Furthermore, I also see that the average per task running time within a
single machine, with 5 tasks/machine is 1/2 as much as that with 10
tasks/machine. Within mesos, each task has 1 CPU assigned and it is
completely CPU bound (no dataset, no file access). As per mesos, the 5
tasks job uses 5 CPUs while the 10 task job uses 10 CPUs (so average task
run times should be same unlike what I am seeing). Also, when I monitor CPU
utilization, I see that all CPUs are used equally.  I am really confused.
Is this how mesos/container isolation is supposed to work?

Thanks,
Asim

Re: mesos isolation

Posted by Ian Downes <ia...@gmail.com>.
It's named posix because it should work on any Posix compatible
system, e.g., Linux, OSX, *BSD, etc.



On Sat, Jul 12, 2014 at 2:14 AM, yifan <my...@msn.com> wrote:
> BTW why it's called posix isolation? It confused me too at the first time.
>
> Yifan
>
>
> On 07/11/2014 11:24 AM, Asim wrote:
>
>
>> Is there any reason preventing you from using the cgroups cpu and
>>memory isolators?
> yes -- the reason was ignorance. I was not aware cgroups are not enabled by
> default. I will enable cgroups now. Thanks for your response!
>
> Regards,
> Asim
>
>
> On Fri, Jul 11, 2014 at 2:12 PM, Ian Downes <ia...@gmail.com> wrote:
>>
>> The posix/cpu isolator doesn't actually do any isolation - it only is
>> useful to report cpu utilization. If you want to constrain the amount
>> of cpu available to each container you must use the cgroups/cpu
>> isolator.
>>
>> Ian
>>
>> On Fri, Jul 11, 2014 at 10:55 AM, Asim <li...@gmail.com> wrote:
>> > Hi,
>> >
>> > I am using the default (posix) isolation. Also, I do not see the systemd
>> > running (not sure how that affects isolation).
>> >
>> >
>> > Thanks,
>> > Asim
>> >
>> >
>> >
>> > On Fri, Jul 11, 2014 at 12:46 PM, Tim St Clair <ts...@redhat.com>
>> > wrote:
>> >>
>> >> It will also matter if you are using systemd.
>> >>
>> >> Cheers,
>> >> Tim
>> >>
>> >> ----- Original Message -----
>> >> > From: "Dick Davies" <di...@hellooperator.net>
>> >> > To: user@mesos.apache.org
>> >> > Sent: Friday, July 11, 2014 11:43:36 AM
>> >> > Subject: Re: mesos isolation
>> >> >
>> >> > Are you using cgroups, or the default (posix) isolation?
>> >> >
>> >> >
>> >> >
>> >> > On 11 July 2014 17:06, Asim <li...@gmail.com> wrote:
>> >> > > Hi,
>> >> > >
>> >> > > I am running a job on few machines in my Linux cluster. Each
>> >> > > machine
>> >> > > is an
>> >> > > Intel 8 core (with 32 threads). I see a total of 32 CPUs in
>> >> > > /etc/cpuinfo
>> >> > > and
>> >> > > within mesos web interface. When I launch a job using mesos, I see
>> >> > > that all
>> >> > > CPUs are used equally and not just the number of CPUs I specify for
>> >> > > that
>> >> > > task.
>> >> > >
>> >> > > Furthermore, I also see that the average per task running time
>> >> > > within
>> >> > > a
>> >> > > single machine, with 5 tasks/machine is 1/2 as much as that with 10
>> >> > > tasks/machine. Within mesos, each task has 1 CPU assigned and it is
>> >> > > completely CPU bound (no dataset, no file access). As per mesos,
>> >> > > the 5
>> >> > > tasks
>> >> > > job uses 5 CPUs while the 10 task job uses 10 CPUs (so average task
>> >> > > run
>> >> > > times should be same unlike what I am seeing). Also, when I monitor
>> >> > > CPU
>> >> > > utilization, I see that all CPUs are used equally.  I am really
>> >> > > confused.
>> >> > > Is
>> >> > > this how mesos/container isolation is supposed to work?
>> >> > >
>> >> > > Thanks,
>> >> > > Asim
>> >> > >
>> >> >
>> >>
>> >> --
>> >> Cheers,
>> >> Timothy St. Clair
>> >> Red Hat Inc.
>> >
>> >
>
>
>
>
> --
> Gu Yifan

Re: mesos isolation

Posted by yifan <my...@msn.com>.
BTW why it's called posix isolation? It confused me too at the first time.

Yifan

On 07/11/2014 11:24 AM, Asim wrote:
>
> > Is there any reason preventing you from using the cgroups cpu and
> >memory isolators?
> yes -- the reason was ignorance. I was not aware cgroups are not 
> enabled by default. I will enable cgroups now. Thanks for your response!
>
> Regards,
> Asim
>
>
> On Fri, Jul 11, 2014 at 2:12 PM, Ian Downes <ian.downes@gmail.com 
> <ma...@gmail.com>> wrote:
>
>     The posix/cpu isolator doesn't actually do any isolation - it only is
>     useful to report cpu utilization. If you want to constrain the amount
>     of cpu available to each container you must use the cgroups/cpu
>     isolator.
>
>     Ian
>
>     On Fri, Jul 11, 2014 at 10:55 AM, Asim <linkasim@gmail.com
>     <ma...@gmail.com>> wrote:
>     > Hi,
>     >
>     > I am using the default (posix) isolation. Also, I do not see the
>     systemd
>     > running (not sure how that affects isolation).
>     >
>     >
>     > Thanks,
>     > Asim
>     >
>     >
>     >
>     > On Fri, Jul 11, 2014 at 12:46 PM, Tim St Clair
>     <tstclair@redhat.com <ma...@redhat.com>> wrote:
>     >>
>     >> It will also matter if you are using systemd.
>     >>
>     >> Cheers,
>     >> Tim
>     >>
>     >> ----- Original Message -----
>     >> > From: "Dick Davies" <dick@hellooperator.net
>     <ma...@hellooperator.net>>
>     >> > To: user@mesos.apache.org <ma...@mesos.apache.org>
>     >> > Sent: Friday, July 11, 2014 11:43:36 AM
>     >> > Subject: Re: mesos isolation
>     >> >
>     >> > Are you using cgroups, or the default (posix) isolation?
>     >> >
>     >> >
>     >> >
>     >> > On 11 July 2014 17:06, Asim <linkasim@gmail.com
>     <ma...@gmail.com>> wrote:
>     >> > > Hi,
>     >> > >
>     >> > > I am running a job on few machines in my Linux cluster.
>     Each machine
>     >> > > is an
>     >> > > Intel 8 core (with 32 threads). I see a total of 32 CPUs in
>     >> > > /etc/cpuinfo
>     >> > > and
>     >> > > within mesos web interface. When I launch a job using
>     mesos, I see
>     >> > > that all
>     >> > > CPUs are used equally and not just the number of CPUs I
>     specify for
>     >> > > that
>     >> > > task.
>     >> > >
>     >> > > Furthermore, I also see that the average per task running
>     time within
>     >> > > a
>     >> > > single machine, with 5 tasks/machine is 1/2 as much as that
>     with 10
>     >> > > tasks/machine. Within mesos, each task has 1 CPU assigned
>     and it is
>     >> > > completely CPU bound (no dataset, no file access). As per
>     mesos, the 5
>     >> > > tasks
>     >> > > job uses 5 CPUs while the 10 task job uses 10 CPUs (so
>     average task
>     >> > > run
>     >> > > times should be same unlike what I am seeing). Also, when I
>     monitor
>     >> > > CPU
>     >> > > utilization, I see that all CPUs are used equally.  I am really
>     >> > > confused.
>     >> > > Is
>     >> > > this how mesos/container isolation is supposed to work?
>     >> > >
>     >> > > Thanks,
>     >> > > Asim
>     >> > >
>     >> >
>     >>
>     >> --
>     >> Cheers,
>     >> Timothy St. Clair
>     >> Red Hat Inc.
>     >
>     >
>
>


-- 
Gu Yifan


Re: mesos isolation

Posted by Asim <li...@gmail.com>.
> Is there any reason preventing you from using the cgroups cpu and
>memory isolators?
yes -- the reason was ignorance. I was not aware cgroups are not enabled by
default. I will enable cgroups now. Thanks for your response!

Regards,
Asim


On Fri, Jul 11, 2014 at 2:12 PM, Ian Downes <ia...@gmail.com> wrote:

> The posix/cpu isolator doesn't actually do any isolation - it only is
> useful to report cpu utilization. If you want to constrain the amount
> of cpu available to each container you must use the cgroups/cpu
> isolator.
>
> Ian
>
> On Fri, Jul 11, 2014 at 10:55 AM, Asim <li...@gmail.com> wrote:
> > Hi,
> >
> > I am using the default (posix) isolation. Also, I do not see the systemd
> > running (not sure how that affects isolation).
> >
> >
> > Thanks,
> > Asim
> >
> >
> >
> > On Fri, Jul 11, 2014 at 12:46 PM, Tim St Clair <ts...@redhat.com>
> wrote:
> >>
> >> It will also matter if you are using systemd.
> >>
> >> Cheers,
> >> Tim
> >>
> >> ----- Original Message -----
> >> > From: "Dick Davies" <di...@hellooperator.net>
> >> > To: user@mesos.apache.org
> >> > Sent: Friday, July 11, 2014 11:43:36 AM
> >> > Subject: Re: mesos isolation
> >> >
> >> > Are you using cgroups, or the default (posix) isolation?
> >> >
> >> >
> >> >
> >> > On 11 July 2014 17:06, Asim <li...@gmail.com> wrote:
> >> > > Hi,
> >> > >
> >> > > I am running a job on few machines in my Linux cluster. Each machine
> >> > > is an
> >> > > Intel 8 core (with 32 threads). I see a total of 32 CPUs in
> >> > > /etc/cpuinfo
> >> > > and
> >> > > within mesos web interface. When I launch a job using mesos, I see
> >> > > that all
> >> > > CPUs are used equally and not just the number of CPUs I specify for
> >> > > that
> >> > > task.
> >> > >
> >> > > Furthermore, I also see that the average per task running time
> within
> >> > > a
> >> > > single machine, with 5 tasks/machine is 1/2 as much as that with 10
> >> > > tasks/machine. Within mesos, each task has 1 CPU assigned and it is
> >> > > completely CPU bound (no dataset, no file access). As per mesos,
> the 5
> >> > > tasks
> >> > > job uses 5 CPUs while the 10 task job uses 10 CPUs (so average task
> >> > > run
> >> > > times should be same unlike what I am seeing). Also, when I monitor
> >> > > CPU
> >> > > utilization, I see that all CPUs are used equally.  I am really
> >> > > confused.
> >> > > Is
> >> > > this how mesos/container isolation is supposed to work?
> >> > >
> >> > > Thanks,
> >> > > Asim
> >> > >
> >> >
> >>
> >> --
> >> Cheers,
> >> Timothy St. Clair
> >> Red Hat Inc.
> >
> >
>

Re: mesos isolation

Posted by Ian Downes <ia...@gmail.com>.
The posix/cpu isolator doesn't actually do any isolation - it only is
useful to report cpu utilization. If you want to constrain the amount
of cpu available to each container you must use the cgroups/cpu
isolator.

Is there any reason preventing you from using the cgroups cpu and
memory isolators?

Ian

On Fri, Jul 11, 2014 at 10:55 AM, Asim <li...@gmail.com> wrote:
> Hi,
>
> I am using the default (posix) isolation. Also, I do not see the systemd
> running (not sure how that affects isolation).
>
>
> Thanks,
> Asim
>
>
>
> On Fri, Jul 11, 2014 at 12:46 PM, Tim St Clair <ts...@redhat.com> wrote:
>>
>> It will also matter if you are using systemd.
>>
>> Cheers,
>> Tim
>>
>> ----- Original Message -----
>> > From: "Dick Davies" <di...@hellooperator.net>
>> > To: user@mesos.apache.org
>> > Sent: Friday, July 11, 2014 11:43:36 AM
>> > Subject: Re: mesos isolation
>> >
>> > Are you using cgroups, or the default (posix) isolation?
>> >
>> >
>> >
>> > On 11 July 2014 17:06, Asim <li...@gmail.com> wrote:
>> > > Hi,
>> > >
>> > > I am running a job on few machines in my Linux cluster. Each machine
>> > > is an
>> > > Intel 8 core (with 32 threads). I see a total of 32 CPUs in
>> > > /etc/cpuinfo
>> > > and
>> > > within mesos web interface. When I launch a job using mesos, I see
>> > > that all
>> > > CPUs are used equally and not just the number of CPUs I specify for
>> > > that
>> > > task.
>> > >
>> > > Furthermore, I also see that the average per task running time within
>> > > a
>> > > single machine, with 5 tasks/machine is 1/2 as much as that with 10
>> > > tasks/machine. Within mesos, each task has 1 CPU assigned and it is
>> > > completely CPU bound (no dataset, no file access). As per mesos, the 5
>> > > tasks
>> > > job uses 5 CPUs while the 10 task job uses 10 CPUs (so average task
>> > > run
>> > > times should be same unlike what I am seeing). Also, when I monitor
>> > > CPU
>> > > utilization, I see that all CPUs are used equally.  I am really
>> > > confused.
>> > > Is
>> > > this how mesos/container isolation is supposed to work?
>> > >
>> > > Thanks,
>> > > Asim
>> > >
>> >
>>
>> --
>> Cheers,
>> Timothy St. Clair
>> Red Hat Inc.
>
>

Re: mesos isolation

Posted by Asim <li...@gmail.com>.
Hi,

I am using the default (posix) isolation. Also, I do not see the systemd
running (not sure how that affects isolation).


Thanks,
Asim



On Fri, Jul 11, 2014 at 12:46 PM, Tim St Clair <ts...@redhat.com> wrote:

> It will also matter if you are using systemd.
>
> Cheers,
> Tim
>
> ----- Original Message -----
> > From: "Dick Davies" <di...@hellooperator.net>
> > To: user@mesos.apache.org
> > Sent: Friday, July 11, 2014 11:43:36 AM
> > Subject: Re: mesos isolation
> >
> > Are you using cgroups, or the default (posix) isolation?
> >
> >
> >
> > On 11 July 2014 17:06, Asim <li...@gmail.com> wrote:
> > > Hi,
> > >
> > > I am running a job on few machines in my Linux cluster. Each machine
> is an
> > > Intel 8 core (with 32 threads). I see a total of 32 CPUs in
> /etc/cpuinfo
> > > and
> > > within mesos web interface. When I launch a job using mesos, I see
> that all
> > > CPUs are used equally and not just the number of CPUs I specify for
> that
> > > task.
> > >
> > > Furthermore, I also see that the average per task running time within a
> > > single machine, with 5 tasks/machine is 1/2 as much as that with 10
> > > tasks/machine. Within mesos, each task has 1 CPU assigned and it is
> > > completely CPU bound (no dataset, no file access). As per mesos, the 5
> > > tasks
> > > job uses 5 CPUs while the 10 task job uses 10 CPUs (so average task run
> > > times should be same unlike what I am seeing). Also, when I monitor CPU
> > > utilization, I see that all CPUs are used equally.  I am really
> confused.
> > > Is
> > > this how mesos/container isolation is supposed to work?
> > >
> > > Thanks,
> > > Asim
> > >
> >
>
> --
> Cheers,
> Timothy St. Clair
> Red Hat Inc.
>

Re: mesos isolation

Posted by Tim St Clair <ts...@redhat.com>.
It will also matter if you are using systemd.  

Cheers,
Tim

----- Original Message -----
> From: "Dick Davies" <di...@hellooperator.net>
> To: user@mesos.apache.org
> Sent: Friday, July 11, 2014 11:43:36 AM
> Subject: Re: mesos isolation
> 
> Are you using cgroups, or the default (posix) isolation?
> 
> 
> 
> On 11 July 2014 17:06, Asim <li...@gmail.com> wrote:
> > Hi,
> >
> > I am running a job on few machines in my Linux cluster. Each machine is an
> > Intel 8 core (with 32 threads). I see a total of 32 CPUs in /etc/cpuinfo
> > and
> > within mesos web interface. When I launch a job using mesos, I see that all
> > CPUs are used equally and not just the number of CPUs I specify for that
> > task.
> >
> > Furthermore, I also see that the average per task running time within a
> > single machine, with 5 tasks/machine is 1/2 as much as that with 10
> > tasks/machine. Within mesos, each task has 1 CPU assigned and it is
> > completely CPU bound (no dataset, no file access). As per mesos, the 5
> > tasks
> > job uses 5 CPUs while the 10 task job uses 10 CPUs (so average task run
> > times should be same unlike what I am seeing). Also, when I monitor CPU
> > utilization, I see that all CPUs are used equally.  I am really confused.
> > Is
> > this how mesos/container isolation is supposed to work?
> >
> > Thanks,
> > Asim
> >
> 

-- 
Cheers,
Timothy St. Clair
Red Hat Inc.

Re: mesos isolation

Posted by Dick Davies <di...@hellooperator.net>.
Are you using cgroups, or the default (posix) isolation?



On 11 July 2014 17:06, Asim <li...@gmail.com> wrote:
> Hi,
>
> I am running a job on few machines in my Linux cluster. Each machine is an
> Intel 8 core (with 32 threads). I see a total of 32 CPUs in /etc/cpuinfo and
> within mesos web interface. When I launch a job using mesos, I see that all
> CPUs are used equally and not just the number of CPUs I specify for that
> task.
>
> Furthermore, I also see that the average per task running time within a
> single machine, with 5 tasks/machine is 1/2 as much as that with 10
> tasks/machine. Within mesos, each task has 1 CPU assigned and it is
> completely CPU bound (no dataset, no file access). As per mesos, the 5 tasks
> job uses 5 CPUs while the 10 task job uses 10 CPUs (so average task run
> times should be same unlike what I am seeing). Also, when I monitor CPU
> utilization, I see that all CPUs are used equally.  I am really confused. Is
> this how mesos/container isolation is supposed to work?
>
> Thanks,
> Asim
>