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

Andrew Ferguson commented on MAPREDUCE-4334:
--------------------------------------------

@Arun:  no, the NM does not need superuser privs. in my comment above [1], the 
line "$ sudo cgcreate -a hadoop_user_name -g memory:hadoop-yarn" is run when 
installing Hadoop. This creates a branch of the memory hierarchy called 
"hadoop-yarn" which is owned by the user "hadoop_user_name" (which would be the 
user running the NM). This allows the NM to create and move cgroups without 
superuser privs.

The one complication is only the superuser or the owner of a process may move a 
process into a cgroup. As the LinuxContainerExecutor runs processes under 
different user accounts, we will need to either augment it, or use a similar 
tool to move such processes into a cgroup created by the NM user. 

Let me know if you'd like further clarification.



[1] 
https://issues.apache.org/jira/browse/MAPREDUCE-4334?focusedCommentId=13399014&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13399014
                
> Add support for CPU isolation/monitoring of containers
> ------------------------------------------------------
>
>                 Key: MAPREDUCE-4334
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4334
>             Project: Hadoop Map/Reduce
>          Issue Type: Sub-task
>            Reporter: Arun C Murthy
>            Assignee: Andrew Ferguson
>         Attachments: MAPREDUCE-4334-pre1.patch, 
> MAPREDUCE-4334-pre2-with_cpu.patch, MAPREDUCE-4334-pre2.patch, 
> MAPREDUCE-4334-pre3-with_cpu.patch, MAPREDUCE-4334-pre3.patch
>
>
> Once we get in MAPREDUCE-4327, it will be important to actually enforce 
> limits on CPU consumption of containers. 
> Several options spring to mind:
> # taskset (RHEL5+)
> # cgroups (RHEL6+)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to