YARN-8077. The vmemLimit parameter in ContainersMonitorImpl#isProcessTreeOverLimit is confusing. Contributed by Sen Zhao.

This commit is contained in:
Miklos Szegedi 2018-03-28 09:05:25 -07:00
parent 411993f6e5
commit cdee0a4f84
1 changed files with 6 additions and 6 deletions

View File

@ -367,7 +367,7 @@ public class ContainersMonitorImpl extends AbstractService implements
* @param curMemUsageOfAgedProcesses * @param curMemUsageOfAgedProcesses
* Memory usage of processes older than an iteration in a container * Memory usage of processes older than an iteration in a container
* tree * tree
* @param vmemLimit * @param memLimit
* The limit specified for the container * The limit specified for the container
* @return true if the memory usage is more than twice the specified limit, * @return true if the memory usage is more than twice the specified limit,
* or if processes in the tree, older than this thread's monitoring * or if processes in the tree, older than this thread's monitoring
@ -376,18 +376,18 @@ public class ContainersMonitorImpl extends AbstractService implements
private boolean isProcessTreeOverLimit(String containerId, private boolean isProcessTreeOverLimit(String containerId,
long currentMemUsage, long currentMemUsage,
long curMemUsageOfAgedProcesses, long curMemUsageOfAgedProcesses,
long vmemLimit) { long memLimit) {
boolean isOverLimit = false; boolean isOverLimit = false;
if (currentMemUsage > (2 * vmemLimit)) { if (currentMemUsage > (2 * memLimit)) {
LOG.warn("Process tree for container: " + containerId LOG.warn("Process tree for container: " + containerId
+ " running over twice " + "the configured limit. Limit=" + vmemLimit + " running over twice " + "the configured limit. Limit=" + memLimit
+ ", current usage = " + currentMemUsage); + ", current usage = " + currentMemUsage);
isOverLimit = true; isOverLimit = true;
} else if (curMemUsageOfAgedProcesses > vmemLimit) { } else if (curMemUsageOfAgedProcesses > memLimit) {
LOG.warn("Process tree for container: " + containerId LOG.warn("Process tree for container: " + containerId
+ " has processes older than 1 " + " has processes older than 1 "
+ "iteration running over the configured limit. Limit=" + vmemLimit + "iteration running over the configured limit. Limit=" + memLimit
+ ", current usage = " + curMemUsageOfAgedProcesses); + ", current usage = " + curMemUsageOfAgedProcesses);
isOverLimit = true; isOverLimit = true;
} }