Thanks Ian for the answer. Now it is clear. It's up to a user which isolation mechanism to use - for more efficient slave resource usage, cpu.shares needs to be enabled (work-conserving mode), For the extreme isolation between frameworks, one need to enable cfs.
- r On Wed, Jan 22, 2014 at 4:42 PM, Ian Downes <[email protected]> wrote: > Mesos supports all three methods; I don't really know which one is > most frequently used but, if you don't have specific requirements, > then I suggest cpu.shares (the default, provides fair proportional > sharing of CPU) or cpu.cfs_quota_us (provides a hard upper bound on > CPU). > > Use the --cgroups_subsystems flag to select between the "cpu" (for > cpu.shares and cpu.cfs) or the "cpuset" cgroup subsystem. If you > select the "cpu" controller then you can enable cfs with the > --cgroups_enable_cfs flag. If you use cfs then it will still set the > cpu.shares values. All of this is determined in > CgroupsIsolator::initialize() using the flags. > > Please ask further questions if this isn't clear. > > On Wed, Jan 22, 2014 at 7:41 AM, ricky l <[email protected]> wrote: > > I have a question regarding CPU isolation policy of mesos using cgroup. > In > > cgroup, there are multiple cpu resource isolation policies - controlling > > "cpu.shares", quota ("cpu.cfs_quota_us"), or cpu core binding > > ("cpuset.cpus"). Among them, which method does mesos mainly use? I read > the > > CgroupsIsolator class in the source code, but it seems to set all three > > values. thanks in advance. > > > > -r >

