[
https://issues.apache.org/jira/browse/MAPREDUCE-4334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13414567#comment-13414567
]
Bikas Saha commented on MAPREDUCE-4334:
---------------------------------------
Somewhere in this thread it was mentioned controlling memory via OS. In my
experience this is not an optimal choice because
1) makes it hard to debug task failures due to memory issues. Abrupt OS
termination or denial or more memory resulting in NPE/bad pointers etc. Its
better to just monitor the memory and then enforce limits with clear error
message saying - task was terminated because it used more memory than alloted.
2) due to different scenarios, tasks may have memory spikes or temporary
increases. The OS will enforce tight limits but NodeManager monitoring can be
more flexible and not terminate a task because it shot to 2.1GB instead of
staying under 2.
Disk scheduling and monitoring would be a hard to achieve goal with multiple
writers to disk spinning things their own way and expecting something that will
likely not happen. Network scheduling and monitoring shares choke points at
multiple levels beyond the machines and trying to optimally and proportionally
use the network tends to be a problem thats better served globally.
My 2 cents would be to limit this to just CPU for now. Based on the comments
above, I would agree that we need to make sure platform specific stuff should
not leak into the code so that other platforms (imminently Windows) can support
this stuff.
An alternative to pluggable ContainersMonitor would be to make CPU management a
pluggable component of ContainersManager. My POV is that ContainersManager
manages the resources of containers and has logic that will be common across
platforms. The tools it uses will change. Eg. ProcfsBaseProcessTree is the tool
used to monitor and manage memory. I can see that being changed to a
MemoryMonitor interface with platform specific implementations. Thats whats
happening on the Windows port in branch 1. I can see a CPUMonitor interface for
CPU. Or maybe a ResourceMonitor that has methods for both memory and CPU.
> 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