Hi Dick, Sorry for the late reply, but I wanted to answer your question from the last email. If you are using the default Posix isolation, then there is no enforcement on the actual cpu/memory usage of your tasks. Rather, it is only the master's resource allocator that does its own resource accounting and allocation based on the stated resources on the slaves and the stated resources used by running/completed tasks. You will need to use cgroups isolation to actually restrict your tasks from overstepping their cpu-shares or memory limits. If the tasks running on your slaves are reporting resource usage matching the resource requirements you set in Marathon, then you're fortunate to have chosen accurate requirements, but nothing in Mesos is enforcing these limits. Let us know how cgroups are working out for you. Are there any specific setup/configuration steps that we could document better?
Cheers, -Adam- On Tue, Jun 10, 2014 at 12:37 PM, Dick Davies <[email protected]> wrote: > Thanks, I'd normally read code to figure this kind of thing out but > C++ is one of the > few languages I have no clue with. > > What I'll do then (I'm on RHEL) is install libcgroup, start cgconfig > and see what happens > with that new --isolation flag. > > Part of the reason I was asking is I wasn't clear that the tasks I'm > sending out with RAM > and CPU allocations on them are actually enforced out of the box - is > that right? > > We're running Marathon and shipping out jobs with 256MbRAM/01.CPU > requirements, > and seems like the slaves are reporting used resources based on those > numbers. > > I think it's a bit unlikely these random jobs are actually using > exactly those resources, > and so I wondered if we're enforcing it anywhere. > > > > On 9 June 2014 17:02, Jie Yu <[email protected]> wrote: > > Hi Dick, > > > >> > >> what croup isolation provides over stock posix / process isolation > > > > > > Currently, mesos provides cpu and memory isolation through cgroups on > Linux > > boxes '--isolation=cgroups/cpu,cgroups/mem' > > > >> the configuration required to setup cgroups > > > > > > If no other service on the host uses cgroup (no cgroup subsystems being > > mounted), then it should be pretty simple because mesos will mount > > corresponding subsystems for you. You can choose the root hierarchy using > > the following slave flag: > > > > add(&Flags::cgroups_hierarchy, > > "cgroups_hierarchy", > > "The path to the cgroups hierarchy root\n", > > "/sys/fs/cgroup"); > > > > If some services on the host are using cgroup (e.g, systemd), then it > > depends on how cgroups are mounted. > > > > - Jie > > > > > > > > On Mon, Jun 9, 2014 at 3:09 AM, Dick Davies <[email protected]> > wrote: > >> > >> So we're running with default isolation (posix) > >> and thinking about enabling cgroups (mesos 0.17.0 > >> right now but the upgrade to 0.18.2 was seamless > >> in dev. so that'll probably happen too). > >> > >> I just need to justify the effort and extra complexity, > >> so can someone explain briefly > >> > >> * what croup isolation provides over stock posix / process isolation > >> * the configuration required to setup cgroups > >> > >> Thanks! > > > > >

