[ 
https://issues.apache.org/jira/browse/MESOS-458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13696002#comment-13696002
 ] 

Benjamin Mahler commented on MESOS-458:
---------------------------------------

I should have used fractions instead of CPUs. =/

I think it's either what you've described, or the system gets 1024 / (1024 sys 
+ 1024 slave + 1024 mesos) and the executors in total have to share under the 
1024 shares at the top level of the tree. This means the executors in total are 
sharing 1/3 of the CPU resources on a fully loaded machine. Here's one example 
that explains shares in a hierarchical manner (according to what I've 
described):
http://oakbytes.wordpress.com/2012/09/02/cgroup-cpu-allocation-cpu-shares-examples/

Let me know if I'm wrong, or if you find better documentation!
                
> Current cgroups layout does not ensure the slave gets a fair share of the CPU 
> resources.
> ----------------------------------------------------------------------------------------
>
>                 Key: MESOS-458
>                 URL: https://issues.apache.org/jira/browse/MESOS-458
>             Project: Mesos
>          Issue Type: Improvement
>            Reporter: Benjamin Mahler
>
> We currently have the following layout when there is no system cgroup present 
> on a machine:
> /cgroup: (system processes, including the mesos-slave) 1024 shares
> /cgroup/mesos: (no processes) 1024 shares
> /cgroup/mesos/executor1: X shares
> ...
> /cgroup/mesos/executorN: X shares
> This does not ensure the slave gets a fair share of the cpu, especially when 
> there is load inside the root cgroup. This is because the slave is contending 
> with other processes inside the root cgroup. If the administrators set up a 
> system cgroup, the layout looks as follows:
> /cgroup: (no processes)
> /cgroup/system: (system processes, including the mesos-slave) 1024 shares
> /cgroup/mesos: (no processes) 1024 shares
> /cgroup/mesos/executor1: X shares
> ...
> /cgroup/mesos/executorN: X shares
> This still does not ensure the slave gets a fair share for the same reasons.
> However, if we create a cgroup to hold only the slave:
> /cgroup: (no processes)
> /cgroup/system: (system processes) 1024 shares
> /cgroup/mesos-slave: (mesos-slave process) 1024 shares
> /cgroup/mesos: (no processes) 1024 shares
> /cgroup/mesos/executor1: X shares
> ...
> /cgroup/mesos/executorN: X shares
> With the above configuration, the slave will get 1 cpu, system processes will 
> get 1 cpu, and the executors will get the rest.
> See the following link for sharing behavior in the root cgroup: 
> https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/process_behavior.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to