Details
-
Improvement
-
Status: Patch Available
-
Major
-
Resolution: Unresolved
-
2.6.0, 3.1.1
-
None
-
None
-
Patch
Description
There are two modes in yarn container cpu limitation. The default is Shared mode which guarantees the requested resource and can also use other spare CPU if available. Another one is Strict mode, container's resource is limited to allocated resource strictly.
If we want to limit the resource usage of the container and can use a certain percentage of spare CPU if available, the above two modes cannot satisfy our demand. We can define a relax coefficient(yarn.nodemanager.linux-container-executor.cgroups.strict-resource-usage.ratio) to relax the restrictions on resources in strict mode.
Attachments are different modes comparison. Especifically, the last picture is the maximum percentage of container using CPU when the relaxation coefficient is 1.5.