[24/50] [abbrv] hadoop git commit: YARN-6705 Add separate NM preemption thresholds for cpu and memory (Haibo Chen)
YARN-6705 Add separate NM preemption thresholds for cpu and memory (Haibo Chen) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/d7cdf2ce Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/d7cdf2ce Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/d7cdf2ce Branch: refs/heads/YARN-1011 Commit: d7cdf2cecc128b69c15aac87e60f77ee7e462a2e Parents: 013c977 Author: Haibo Chen Authored: Wed Jul 12 12:32:13 2017 -0700 Committer: Haibo Chen Committed: Fri Sep 21 14:10:13 2018 -0700 -- .../hadoop/yarn/conf/YarnConfiguration.java | 31 +-- .../src/main/resources/yarn-default.xml | 34 ++-- .../monitor/ContainersMonitorImpl.java | 42 +--- 3 files changed, 85 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/d7cdf2ce/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java index daf9910..18ff086 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java @@ -2144,10 +2144,33 @@ public class YarnConfiguration extends Configuration { public static final String NM_OVERALLOCATION_MEMORY_UTILIZATION_THRESHOLD = NM_PREFIX + "overallocation.memory-utilization-threshold"; - public static final String NM_OVERALLOCATION_PREEMPTION_THRESHOLD = - NM_PREFIX + "overallocation.preemption-threshold"; - public static final float DEFAULT_NM_OVERALLOCATION_PREEMPTION_THRESHOLD - = 0.96f; + /** + * The CPU utilization threshold, if went beyond for a few times in a row, + * OPPORTUNISTIC containers started due to overallocation should start + * getting preempted. + */ + public static final String NM_OVERALLOCATION_CPU_PREEMPTION_THRESHOLD = + NM_PREFIX + "overallocation.preemption-threshold.cpu"; + public static final float + DEFAULT_NM_OVERALLOCATION_CPU_PREEMPTION_THRESHOLD = 0.99f; + + /** + * The number of times that CPU utilization must go over the CPU preemption + * threshold consecutively before preemption starts to kick in. + */ + public static final String NM_OVERALLOCATION_PREEMPTION_CPU_COUNT = + NM_PREFIX + "overallocation.preemption-threshold-count.cpu"; + public static final int DEFAULT_NM_OVERALLOCATION_PREEMPTION_CPU_COUNT = 4; + + + /** + * The memory utilization threshold beyond which OPPORTUNISTIC containers + * started due to overallocation should start getting preempted. + */ + public static final String NM_OVERALLOCATION_MEMORY_PREEMPTION_THRESHOLD = + NM_PREFIX + "overallocation.preemption-threshold.memory"; + public static final float + DEFAULT_NM_OVERALLOCATION_MEMORY_PREEMPTION_THRESHOLD = 0.95f; /** * Interval of time the linux container executor should try cleaning up http://git-wip-us.apache.org/repos/asf/hadoop/blob/d7cdf2ce/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml index 84a4225..985936a 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml @@ -1769,11 +1769,37 @@ When a node is over-allocated to improve utilization by - running OPPORTUNISTIC containers, this config captures the utilization - beyond which OPPORTUNISTIC containers should start getting preempted. + running OPPORTUNISTIC containers, this config captures the CPU + utilization beyond which OPPORTUNISTIC containers should start getting + preempted. This is used in combination with + yarn.nodemanager.overallocation.preemption-threshold-count.cpu, that is, + only when the CPU utilization goes over this threshold consecutively for + a few times will preemption kicks in. -yarn.nodemanager.overallocation.preemption-threshold -0.96 +yarn.nodemanager.overallocation.preemption-threshold.cpu +0.99 + + + +When a node is over-allocated to improve utilization by + running
[30/50] [abbrv] hadoop git commit: YARN-6705 Add separate NM preemption thresholds for cpu and memory (Haibo Chen)
YARN-6705 Add separate NM preemption thresholds for cpu and memory (Haibo Chen) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/5ef1fdc6 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/5ef1fdc6 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/5ef1fdc6 Branch: refs/heads/YARN-1011 Commit: 5ef1fdc60962a5816497a29db5f8eb7fe496f652 Parents: 98dde37 Author: Haibo Chen Authored: Wed Jul 12 12:32:13 2017 -0700 Committer: Haibo Chen Committed: Mon Jun 4 16:25:31 2018 -0700 -- .../hadoop/yarn/conf/YarnConfiguration.java | 31 +-- .../src/main/resources/yarn-default.xml | 34 ++-- .../monitor/ContainersMonitorImpl.java | 42 +--- 3 files changed, 85 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/5ef1fdc6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java index aa68cb6..d98d6bd 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java @@ -2132,10 +2132,33 @@ public class YarnConfiguration extends Configuration { public static final String NM_OVERALLOCATION_MEMORY_UTILIZATION_THRESHOLD = NM_PREFIX + "overallocation.memory-utilization-threshold"; - public static final String NM_OVERALLOCATION_PREEMPTION_THRESHOLD = - NM_PREFIX + "overallocation.preemption-threshold"; - public static final float DEFAULT_NM_OVERALLOCATION_PREEMPTION_THRESHOLD - = 0.96f; + /** + * The CPU utilization threshold, if went beyond for a few times in a row, + * OPPORTUNISTIC containers started due to overallocation should start + * getting preempted. + */ + public static final String NM_OVERALLOCATION_CPU_PREEMPTION_THRESHOLD = + NM_PREFIX + "overallocation.preemption-threshold.cpu"; + public static final float + DEFAULT_NM_OVERALLOCATION_CPU_PREEMPTION_THRESHOLD = 0.99f; + + /** + * The number of times that CPU utilization must go over the CPU preemption + * threshold consecutively before preemption starts to kick in. + */ + public static final String NM_OVERALLOCATION_PREEMPTION_CPU_COUNT = + NM_PREFIX + "overallocation.preemption-threshold-count.cpu"; + public static final int DEFAULT_NM_OVERALLOCATION_PREEMPTION_CPU_COUNT = 4; + + + /** + * The memory utilization threshold beyond which OPPORTUNISTIC containers + * started due to overallocation should start getting preempted. + */ + public static final String NM_OVERALLOCATION_MEMORY_PREEMPTION_THRESHOLD = + NM_PREFIX + "overallocation.preemption-threshold.memory"; + public static final float + DEFAULT_NM_OVERALLOCATION_MEMORY_PREEMPTION_THRESHOLD = 0.95f; /** * Interval of time the linux container executor should try cleaning up http://git-wip-us.apache.org/repos/asf/hadoop/blob/5ef1fdc6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml index 0181872..9a78cbd 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml @@ -1769,11 +1769,37 @@ When a node is over-allocated to improve utilization by - running OPPORTUNISTIC containers, this config captures the utilization - beyond which OPPORTUNISTIC containers should start getting preempted. + running OPPORTUNISTIC containers, this config captures the CPU + utilization beyond which OPPORTUNISTIC containers should start getting + preempted. This is used in combination with + yarn.nodemanager.overallocation.preemption-threshold-count.cpu, that is, + only when the CPU utilization goes over this threshold consecutively for + a few times will preemption kicks in. -yarn.nodemanager.overallocation.preemption-threshold -0.96 +yarn.nodemanager.overallocation.preemption-threshold.cpu +0.99 + + + +When a node is over-allocated to improve utilization by + running
[38/50] [abbrv] hadoop git commit: YARN-6705 Add separate NM preemption thresholds for cpu and memory (Haibo Chen)
YARN-6705 Add separate NM preemption thresholds for cpu and memory (Haibo Chen) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/da3021d8 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/da3021d8 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/da3021d8 Branch: refs/heads/YARN-1011 Commit: da3021d8c9659399ea86e69c004c8670309a3012 Parents: 4fb0e82 Author: Haibo ChenAuthored: Wed Jul 12 12:32:13 2017 -0700 Committer: Haibo Chen Committed: Mon Apr 9 17:07:06 2018 -0700 -- .../hadoop/yarn/conf/YarnConfiguration.java | 31 +-- .../src/main/resources/yarn-default.xml | 34 ++-- .../monitor/ContainersMonitorImpl.java | 42 +--- 3 files changed, 85 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/da3021d8/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java index 45a2fb2..fdbbdbf 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java @@ -2078,10 +2078,33 @@ public class YarnConfiguration extends Configuration { public static final String NM_OVERALLOCATION_MEMORY_UTILIZATION_THRESHOLD = NM_PREFIX + "overallocation.memory-utilization-threshold"; - public static final String NM_OVERALLOCATION_PREEMPTION_THRESHOLD = - NM_PREFIX + "overallocation.preemption-threshold"; - public static final float DEFAULT_NM_OVERALLOCATION_PREEMPTION_THRESHOLD - = 0.96f; + /** + * The CPU utilization threshold, if went beyond for a few times in a row, + * OPPORTUNISTIC containers started due to overallocation should start + * getting preempted. + */ + public static final String NM_OVERALLOCATION_CPU_PREEMPTION_THRESHOLD = + NM_PREFIX + "overallocation.preemption-threshold.cpu"; + public static final float + DEFAULT_NM_OVERALLOCATION_CPU_PREEMPTION_THRESHOLD = 0.99f; + + /** + * The number of times that CPU utilization must go over the CPU preemption + * threshold consecutively before preemption starts to kick in. + */ + public static final String NM_OVERALLOCATION_PREEMPTION_CPU_COUNT = + NM_PREFIX + "overallocation.preemption-threshold-count.cpu"; + public static final int DEFAULT_NM_OVERALLOCATION_PREEMPTION_CPU_COUNT = 4; + + + /** + * The memory utilization threshold beyond which OPPORTUNISTIC containers + * started due to overallocation should start getting preempted. + */ + public static final String NM_OVERALLOCATION_MEMORY_PREEMPTION_THRESHOLD = + NM_PREFIX + "overallocation.preemption-threshold.memory"; + public static final float + DEFAULT_NM_OVERALLOCATION_MEMORY_PREEMPTION_THRESHOLD = 0.95f; /** * Interval of time the linux container executor should try cleaning up http://git-wip-us.apache.org/repos/asf/hadoop/blob/da3021d8/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml index 5238f60..c12e6cf 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml @@ -1753,11 +1753,37 @@ When a node is over-allocated to improve utilization by - running OPPORTUNISTIC containers, this config captures the utilization - beyond which OPPORTUNISTIC containers should start getting preempted. + running OPPORTUNISTIC containers, this config captures the CPU + utilization beyond which OPPORTUNISTIC containers should start getting + preempted. This is used in combination with + yarn.nodemanager.overallocation.preemption-threshold-count.cpu, that is, + only when the CPU utilization goes over this threshold consecutively for + a few times will preemption kicks in. -yarn.nodemanager.overallocation.preemption-threshold -0.96 +yarn.nodemanager.overallocation.preemption-threshold.cpu +0.99 + + + +When a node is over-allocated to
[39/50] [abbrv] hadoop git commit: YARN-6705 Add separate NM preemption thresholds for cpu and memory (Haibo Chen)
YARN-6705 Add separate NM preemption thresholds for cpu and memory (Haibo Chen) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/e7158d46 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/e7158d46 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/e7158d46 Branch: refs/heads/YARN-1011 Commit: e7158d46b41cb34abfcc26412ec104a355088e9d Parents: 31a732e Author: Haibo ChenAuthored: Wed Jul 12 12:32:13 2017 -0700 Committer: Haibo Chen Committed: Sun Jan 28 17:43:50 2018 -0800 -- .../hadoop/yarn/conf/YarnConfiguration.java | 31 +-- .../src/main/resources/yarn-default.xml | 34 ++-- .../monitor/ContainersMonitorImpl.java | 42 +--- 3 files changed, 85 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/e7158d46/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java index ded0c1f..ed8404c 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java @@ -1978,10 +1978,33 @@ public class YarnConfiguration extends Configuration { public static final String NM_OVERALLOCATION_MEMORY_UTILIZATION_THRESHOLD = NM_PREFIX + "overallocation.memory-utilization-threshold"; - public static final String NM_OVERALLOCATION_PREEMPTION_THRESHOLD = - NM_PREFIX + "overallocation.preemption-threshold"; - public static final float DEFAULT_NM_OVERALLOCATION_PREEMPTION_THRESHOLD - = 0.96f; + /** + * The CPU utilization threshold, if went beyond for a few times in a row, + * OPPORTUNISTIC containers started due to overallocation should start + * getting preempted. + */ + public static final String NM_OVERALLOCATION_CPU_PREEMPTION_THRESHOLD = + NM_PREFIX + "overallocation.preemption-threshold.cpu"; + public static final float + DEFAULT_NM_OVERALLOCATION_CPU_PREEMPTION_THRESHOLD = 0.99f; + + /** + * The number of times that CPU utilization must go over the CPU preemption + * threshold consecutively before preemption starts to kick in. + */ + public static final String NM_OVERALLOCATION_PREEMPTION_CPU_COUNT = + NM_PREFIX + "overallocation.preemption-threshold-count.cpu"; + public static final int DEFAULT_NM_OVERALLOCATION_PREEMPTION_CPU_COUNT = 4; + + + /** + * The memory utilization threshold beyond which OPPORTUNISTIC containers + * started due to overallocation should start getting preempted. + */ + public static final String NM_OVERALLOCATION_MEMORY_PREEMPTION_THRESHOLD = + NM_PREFIX + "overallocation.preemption-threshold.memory"; + public static final float + DEFAULT_NM_OVERALLOCATION_MEMORY_PREEMPTION_THRESHOLD = 0.95f; /** * Interval of time the linux container executor should try cleaning up http://git-wip-us.apache.org/repos/asf/hadoop/blob/e7158d46/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml index 27e1996..da31694 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml @@ -1711,11 +1711,37 @@ When a node is over-allocated to improve utilization by - running OPPORTUNISTIC containers, this config captures the utilization - beyond which OPPORTUNISTIC containers should start getting preempted. + running OPPORTUNISTIC containers, this config captures the CPU + utilization beyond which OPPORTUNISTIC containers should start getting + preempted. This is used in combination with + yarn.nodemanager.overallocation.preemption-threshold-count.cpu, that is, + only when the CPU utilization goes over this threshold consecutively for + a few times will preemption kicks in. -yarn.nodemanager.overallocation.preemption-threshold -0.96 +yarn.nodemanager.overallocation.preemption-threshold.cpu +0.99 + + + +When a node is over-allocated to
[41/50] [abbrv] hadoop git commit: YARN-6705 Add separate NM preemption thresholds for cpu and memory (Haibo Chen)
YARN-6705 Add separate NM preemption thresholds for cpu and memory (Haibo Chen) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/8b98b55a Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/8b98b55a Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/8b98b55a Branch: refs/heads/YARN-1011 Commit: 8b98b55a1ccb7bdfc77bb3d7b24e69412b36bae2 Parents: 23d3a7f Author: Haibo ChenAuthored: Wed Jul 12 12:32:13 2017 -0700 Committer: Haibo Chen Committed: Wed Jan 3 09:07:38 2018 -0800 -- .../hadoop/yarn/conf/YarnConfiguration.java | 31 +-- .../src/main/resources/yarn-default.xml | 34 ++-- .../monitor/ContainersMonitorImpl.java | 42 +--- 3 files changed, 85 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/8b98b55a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java index ce61450..6e1f033 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java @@ -1938,10 +1938,33 @@ public class YarnConfiguration extends Configuration { public static final String NM_OVERALLOCATION_MEMORY_UTILIZATION_THRESHOLD = NM_PREFIX + "overallocation.memory-utilization-threshold"; - public static final String NM_OVERALLOCATION_PREEMPTION_THRESHOLD = - NM_PREFIX + "overallocation.preemption-threshold"; - public static final float DEFAULT_NM_OVERALLOCATION_PREEMPTION_THRESHOLD - = 0.96f; + /** + * The CPU utilization threshold, if went beyond for a few times in a row, + * OPPORTUNISTIC containers started due to overallocation should start + * getting preempted. + */ + public static final String NM_OVERALLOCATION_CPU_PREEMPTION_THRESHOLD = + NM_PREFIX + "overallocation.preemption-threshold.cpu"; + public static final float + DEFAULT_NM_OVERALLOCATION_CPU_PREEMPTION_THRESHOLD = 0.99f; + + /** + * The number of times that CPU utilization must go over the CPU preemption + * threshold consecutively before preemption starts to kick in. + */ + public static final String NM_OVERALLOCATION_PREEMPTION_CPU_COUNT = + NM_PREFIX + "overallocation.preemption-threshold-count.cpu"; + public static final int DEFAULT_NM_OVERALLOCATION_PREEMPTION_CPU_COUNT = 4; + + + /** + * The memory utilization threshold beyond which OPPORTUNISTIC containers + * started due to overallocation should start getting preempted. + */ + public static final String NM_OVERALLOCATION_MEMORY_PREEMPTION_THRESHOLD = + NM_PREFIX + "overallocation.preemption-threshold.memory"; + public static final float + DEFAULT_NM_OVERALLOCATION_MEMORY_PREEMPTION_THRESHOLD = 0.95f; /** * Interval of time the linux container executor should try cleaning up http://git-wip-us.apache.org/repos/asf/hadoop/blob/8b98b55a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml index b0e8fec..a1d8ba5 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml @@ -1679,11 +1679,37 @@ When a node is over-allocated to improve utilization by - running OPPORTUNISTIC containers, this config captures the utilization - beyond which OPPORTUNISTIC containers should start getting preempted. + running OPPORTUNISTIC containers, this config captures the CPU + utilization beyond which OPPORTUNISTIC containers should start getting + preempted. This is used in combination with + yarn.nodemanager.overallocation.preemption-threshold-count.cpu, that is, + only when the CPU utilization goes over this threshold consecutively for + a few times will preemption kicks in. -yarn.nodemanager.overallocation.preemption-threshold -0.96 +yarn.nodemanager.overallocation.preemption-threshold.cpu +0.99 + + + +When a node is over-allocated to
[49/50] [abbrv] hadoop git commit: YARN-6705 Add separate NM preemption thresholds for cpu and memory (Haibo Chen)
YARN-6705 Add separate NM preemption thresholds for cpu and memory (Haibo Chen) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/4b80cad7 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/4b80cad7 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/4b80cad7 Branch: refs/heads/YARN-1011 Commit: 4b80cad710f07de215de0c7cf9eef6f1e0641dc2 Parents: b8dba7d Author: Haibo ChenAuthored: Wed Jul 12 12:32:13 2017 -0700 Committer: Haibo Chen Committed: Thu Nov 2 10:07:36 2017 -0700 -- .../hadoop/yarn/conf/YarnConfiguration.java | 31 +-- .../src/main/resources/yarn-default.xml | 34 ++-- .../monitor/ContainersMonitorImpl.java | 42 +--- 3 files changed, 85 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/4b80cad7/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java index e843ad2..f9c8b69 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java @@ -1907,10 +1907,33 @@ public class YarnConfiguration extends Configuration { public static final String NM_OVERALLOCATION_MEMORY_UTILIZATION_THRESHOLD = NM_PREFIX + "overallocation.memory-utilization-threshold"; - public static final String NM_OVERALLOCATION_PREEMPTION_THRESHOLD = - NM_PREFIX + "overallocation.preemption-threshold"; - public static final float DEFAULT_NM_OVERALLOCATION_PREEMPTION_THRESHOLD - = 0.96f; + /** + * The CPU utilization threshold, if went beyond for a few times in a row, + * OPPORTUNISTIC containers started due to overallocation should start + * getting preempted. + */ + public static final String NM_OVERALLOCATION_CPU_PREEMPTION_THRESHOLD = + NM_PREFIX + "overallocation.preemption-threshold.cpu"; + public static final float + DEFAULT_NM_OVERALLOCATION_CPU_PREEMPTION_THRESHOLD = 0.99f; + + /** + * The number of times that CPU utilization must go over the CPU preemption + * threshold consecutively before preemption starts to kick in. + */ + public static final String NM_OVERALLOCATION_PREEMPTION_CPU_COUNT = + NM_PREFIX + "overallocation.preemption-threshold-count.cpu"; + public static final int DEFAULT_NM_OVERALLOCATION_PREEMPTION_CPU_COUNT = 4; + + + /** + * The memory utilization threshold beyond which OPPORTUNISTIC containers + * started due to overallocation should start getting preempted. + */ + public static final String NM_OVERALLOCATION_MEMORY_PREEMPTION_THRESHOLD = + NM_PREFIX + "overallocation.preemption-threshold.memory"; + public static final float + DEFAULT_NM_OVERALLOCATION_MEMORY_PREEMPTION_THRESHOLD = 0.95f; /** * Interval of time the linux container executor should try cleaning up http://git-wip-us.apache.org/repos/asf/hadoop/blob/4b80cad7/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml index fdae629..89d4d1f 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml @@ -1663,11 +1663,37 @@ When a node is over-allocated to improve utilization by - running OPPORTUNISTIC containers, this config captures the utilization - beyond which OPPORTUNISTIC containers should start getting preempted. + running OPPORTUNISTIC containers, this config captures the CPU + utilization beyond which OPPORTUNISTIC containers should start getting + preempted. This is used in combination with + yarn.nodemanager.overallocation.preemption-threshold-count.cpu, that is, + only when the CPU utilization goes over this threshold consecutively for + a few times will preemption kicks in. -yarn.nodemanager.overallocation.preemption-threshold -0.96 +yarn.nodemanager.overallocation.preemption-threshold.cpu +0.99 + + + +When a node is over-allocated to
[50/50] [abbrv] hadoop git commit: YARN-6705 Add separate NM preemption thresholds for cpu and memory (Haibo Chen)
YARN-6705 Add separate NM preemption thresholds for cpu and memory (Haibo Chen) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/e5a996e8 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/e5a996e8 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/e5a996e8 Branch: refs/heads/YARN-1011 Commit: e5a996e85778e08d80464d998c40b2493317314a Parents: 85a6887 Author: Haibo ChenAuthored: Wed Jul 12 12:32:13 2017 -0700 Committer: Haibo Chen Committed: Thu Oct 19 21:26:14 2017 -0700 -- .../hadoop/yarn/conf/YarnConfiguration.java | 31 +-- .../src/main/resources/yarn-default.xml | 34 ++-- .../monitor/ContainersMonitorImpl.java | 42 +--- 3 files changed, 85 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/e5a996e8/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java index f312f24..c8ab62a 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java @@ -1860,10 +1860,33 @@ public class YarnConfiguration extends Configuration { public static final String NM_OVERALLOCATION_MEMORY_UTILIZATION_THRESHOLD = NM_PREFIX + "overallocation.memory-utilization-threshold"; - public static final String NM_OVERALLOCATION_PREEMPTION_THRESHOLD = - NM_PREFIX + "overallocation.preemption-threshold"; - public static final float DEFAULT_NM_OVERALLOCATION_PREEMPTION_THRESHOLD - = 0.96f; + /** + * The CPU utilization threshold, if went beyond for a few times in a row, + * OPPORTUNISTIC containers started due to overallocation should start + * getting preempted. + */ + public static final String NM_OVERALLOCATION_CPU_PREEMPTION_THRESHOLD = + NM_PREFIX + "overallocation.preemption-threshold.cpu"; + public static final float + DEFAULT_NM_OVERALLOCATION_CPU_PREEMPTION_THRESHOLD = 0.99f; + + /** + * The number of times that CPU utilization must go over the CPU preemption + * threshold consecutively before preemption starts to kick in. + */ + public static final String NM_OVERALLOCATION_PREEMPTION_CPU_COUNT = + NM_PREFIX + "overallocation.preemption-threshold-count.cpu"; + public static final int DEFAULT_NM_OVERALLOCATION_PREEMPTION_CPU_COUNT = 4; + + + /** + * The memory utilization threshold beyond which OPPORTUNISTIC containers + * started due to overallocation should start getting preempted. + */ + public static final String NM_OVERALLOCATION_MEMORY_PREEMPTION_THRESHOLD = + NM_PREFIX + "overallocation.preemption-threshold.memory"; + public static final float + DEFAULT_NM_OVERALLOCATION_MEMORY_PREEMPTION_THRESHOLD = 0.95f; /** * Interval of time the linux container executor should try cleaning up http://git-wip-us.apache.org/repos/asf/hadoop/blob/e5a996e8/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml index 3a98060..9e97ddf 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml @@ -1645,11 +1645,37 @@ When a node is over-allocated to improve utilization by - running OPPORTUNISTIC containers, this config captures the utilization - beyond which OPPORTUNISTIC containers should start getting preempted. + running OPPORTUNISTIC containers, this config captures the CPU + utilization beyond which OPPORTUNISTIC containers should start getting + preempted. This is used in combination with + yarn.nodemanager.overallocation.preemption-threshold-count.cpu, that is, + only when the CPU utilization goes over this threshold consecutively for + a few times will preemption kicks in. -yarn.nodemanager.overallocation.preemption-threshold -0.96 +yarn.nodemanager.overallocation.preemption-threshold.cpu +0.99 + + + +When a node is over-allocated to
[50/50] [abbrv] hadoop git commit: YARN-6705 Add separate NM preemption thresholds for cpu and memory (Haibo Chen)
YARN-6705 Add separate NM preemption thresholds for cpu and memory (Haibo Chen) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/6d9500c9 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/6d9500c9 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/6d9500c9 Branch: refs/heads/YARN-1011 Commit: 6d9500c9966a7c0366e4f192fac58c7eb1d523d4 Parents: 6ca0bc8 Author: Haibo ChenAuthored: Wed Jul 12 12:32:13 2017 -0700 Committer: Haibo Chen Committed: Fri Sep 15 09:54:55 2017 -0700 -- .../hadoop/yarn/conf/YarnConfiguration.java | 31 +-- .../src/main/resources/yarn-default.xml | 34 ++-- .../monitor/ContainersMonitorImpl.java | 42 +--- 3 files changed, 85 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/6d9500c9/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java index 9ecde42..f346db1 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java @@ -1741,10 +1741,33 @@ public class YarnConfiguration extends Configuration { public static final String NM_OVERALLOCATION_MEMORY_UTILIZATION_THRESHOLD = NM_PREFIX + "overallocation.memory-utilization-threshold"; - public static final String NM_OVERALLOCATION_PREEMPTION_THRESHOLD = - NM_PREFIX + "overallocation.preemption-threshold"; - public static final float DEFAULT_NM_OVERALLOCATION_PREEMPTION_THRESHOLD - = 0.96f; + /** + * The CPU utilization threshold, if went beyond for a few times in a row, + * OPPORTUNISTIC containers started due to overallocation should start + * getting preempted. + */ + public static final String NM_OVERALLOCATION_CPU_PREEMPTION_THRESHOLD = + NM_PREFIX + "overallocation.preemption-threshold.cpu"; + public static final float + DEFAULT_NM_OVERALLOCATION_CPU_PREEMPTION_THRESHOLD = 0.99f; + + /** + * The number of times that CPU utilization must go over the CPU preemption + * threshold consecutively before preemption starts to kick in. + */ + public static final String NM_OVERALLOCATION_PREEMPTION_CPU_COUNT = + NM_PREFIX + "overallocation.preemption-threshold-count.cpu"; + public static final int DEFAULT_NM_OVERALLOCATION_PREEMPTION_CPU_COUNT = 4; + + + /** + * The memory utilization threshold beyond which OPPORTUNISTIC containers + * started due to overallocation should start getting preempted. + */ + public static final String NM_OVERALLOCATION_MEMORY_PREEMPTION_THRESHOLD = + NM_PREFIX + "overallocation.preemption-threshold.memory"; + public static final float + DEFAULT_NM_OVERALLOCATION_MEMORY_PREEMPTION_THRESHOLD = 0.95f; /** * Interval of time the linux container executor should try cleaning up http://git-wip-us.apache.org/repos/asf/hadoop/blob/6d9500c9/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml index 20d4c1d..681e394 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml @@ -1639,11 +1639,37 @@ When a node is over-allocated to improve utilization by - running OPPORTUNISTIC containers, this config captures the utilization - beyond which OPPORTUNISTIC containers should start getting preempted. + running OPPORTUNISTIC containers, this config captures the CPU + utilization beyond which OPPORTUNISTIC containers should start getting + preempted. This is used in combination with + yarn.nodemanager.overallocation.preemption-threshold-count.cpu, that is, + only when the CPU utilization goes over this threshold consecutively for + a few times will preemption kicks in. -yarn.nodemanager.overallocation.preemption-threshold -0.96 +yarn.nodemanager.overallocation.preemption-threshold.cpu +0.99 + + + +When a node is over-allocated to
[50/50] [abbrv] hadoop git commit: YARN-6705 Add separate NM preemption thresholds for cpu and memory (Haibo Chen)
YARN-6705 Add separate NM preemption thresholds for cpu and memory (Haibo Chen) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/f6e03a59 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/f6e03a59 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/f6e03a59 Branch: refs/heads/YARN-1011 Commit: f6e03a59b0ad4ab0ac5e6b520884b7c7e8019986 Parents: 5baae1b Author: Haibo ChenAuthored: Wed Jul 12 12:32:13 2017 -0700 Committer: Haibo Chen Committed: Wed Aug 16 10:02:43 2017 -0700 -- .../hadoop/yarn/conf/YarnConfiguration.java | 31 +-- .../src/main/resources/yarn-default.xml | 34 ++-- .../monitor/ContainersMonitorImpl.java | 42 +--- 3 files changed, 85 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/f6e03a59/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java index a54bd11..6fb75de 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java @@ -1643,10 +1643,33 @@ public class YarnConfiguration extends Configuration { public static final String NM_OVERALLOCATION_MEMORY_UTILIZATION_THRESHOLD = NM_PREFIX + "overallocation.memory-utilization-threshold"; - public static final String NM_OVERALLOCATION_PREEMPTION_THRESHOLD = - NM_PREFIX + "overallocation.preemption-threshold"; - public static final float DEFAULT_NM_OVERALLOCATION_PREEMPTION_THRESHOLD - = 0.96f; + /** + * The CPU utilization threshold, if went beyond for a few times in a row, + * OPPORTUNISTIC containers started due to overallocation should start + * getting preempted. + */ + public static final String NM_OVERALLOCATION_CPU_PREEMPTION_THRESHOLD = + NM_PREFIX + "overallocation.preemption-threshold.cpu"; + public static final float + DEFAULT_NM_OVERALLOCATION_CPU_PREEMPTION_THRESHOLD = 0.99f; + + /** + * The number of times that CPU utilization must go over the CPU preemption + * threshold consecutively before preemption starts to kick in. + */ + public static final String NM_OVERALLOCATION_PREEMPTION_CPU_COUNT = + NM_PREFIX + "overallocation.preemption-threshold-count.cpu"; + public static final int DEFAULT_NM_OVERALLOCATION_PREEMPTION_CPU_COUNT = 4; + + + /** + * The memory utilization threshold beyond which OPPORTUNISTIC containers + * started due to overallocation should start getting preempted. + */ + public static final String NM_OVERALLOCATION_MEMORY_PREEMPTION_THRESHOLD = + NM_PREFIX + "overallocation.preemption-threshold.memory"; + public static final float + DEFAULT_NM_OVERALLOCATION_MEMORY_PREEMPTION_THRESHOLD = 0.95f; /** * Interval of time the linux container executor should try cleaning up http://git-wip-us.apache.org/repos/asf/hadoop/blob/f6e03a59/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml index d76e13e..9b9b816 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml @@ -1588,11 +1588,37 @@ When a node is over-allocated to improve utilization by - running OPPORTUNISTIC containers, this config captures the utilization - beyond which OPPORTUNISTIC containers should start getting preempted. + running OPPORTUNISTIC containers, this config captures the CPU + utilization beyond which OPPORTUNISTIC containers should start getting + preempted. This is used in combination with + yarn.nodemanager.overallocation.preemption-threshold-count.cpu, that is, + only when the CPU utilization goes over this threshold consecutively for + a few times will preemption kicks in. -yarn.nodemanager.overallocation.preemption-threshold -0.96 +yarn.nodemanager.overallocation.preemption-threshold.cpu +0.99 + + + +When a node is over-allocated to
hadoop git commit: YARN-6705 Add separate NM preemption thresholds for cpu and memory (Haibo Chen)
Repository: hadoop Updated Branches: refs/heads/YARN-1011 3764b8a06 -> 8e458246c YARN-6705 Add separate NM preemption thresholds for cpu and memory (Haibo Chen) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/8e458246 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/8e458246 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/8e458246 Branch: refs/heads/YARN-1011 Commit: 8e458246c59e9385724d48b42272fe2d81fe1192 Parents: 3764b8a Author: Haibo ChenAuthored: Wed Jul 12 12:32:13 2017 -0700 Committer: Haibo Chen Committed: Wed Jul 12 12:32:49 2017 -0700 -- .../hadoop/yarn/conf/YarnConfiguration.java | 31 +-- .../src/main/resources/yarn-default.xml | 34 ++-- .../monitor/ContainersMonitorImpl.java | 42 +--- 3 files changed, 85 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/8e458246/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java index 03fa1ce..2be9523 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java @@ -1611,10 +1611,33 @@ public class YarnConfiguration extends Configuration { public static final String NM_OVERALLOCATION_MEMORY_UTILIZATION_THRESHOLD = NM_PREFIX + "overallocation.memory-utilization-threshold"; - public static final String NM_OVERALLOCATION_PREEMPTION_THRESHOLD = - NM_PREFIX + "overallocation.preemption-threshold"; - public static final float DEFAULT_NM_OVERALLOCATION_PREEMPTION_THRESHOLD - = 0.96f; + /** + * The CPU utilization threshold, if went beyond for a few times in a row, + * OPPORTUNISTIC containers started due to overallocation should start + * getting preempted. + */ + public static final String NM_OVERALLOCATION_CPU_PREEMPTION_THRESHOLD = + NM_PREFIX + "overallocation.preemption-threshold.cpu"; + public static final float + DEFAULT_NM_OVERALLOCATION_CPU_PREEMPTION_THRESHOLD = 0.99f; + + /** + * The number of times that CPU utilization must go over the CPU preemption + * threshold consecutively before preemption starts to kick in. + */ + public static final String NM_OVERALLOCATION_PREEMPTION_CPU_COUNT = + NM_PREFIX + "overallocation.preemption-threshold-count.cpu"; + public static final int DEFAULT_NM_OVERALLOCATION_PREEMPTION_CPU_COUNT = 4; + + + /** + * The memory utilization threshold beyond which OPPORTUNISTIC containers + * started due to overallocation should start getting preempted. + */ + public static final String NM_OVERALLOCATION_MEMORY_PREEMPTION_THRESHOLD = + NM_PREFIX + "overallocation.preemption-threshold.memory"; + public static final float + DEFAULT_NM_OVERALLOCATION_MEMORY_PREEMPTION_THRESHOLD = 0.95f; /** * Interval of time the linux container executor should try cleaning up http://git-wip-us.apache.org/repos/asf/hadoop/blob/8e458246/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml index 42166a9..837e9f3 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml @@ -1606,11 +1606,37 @@ When a node is over-allocated to improve utilization by - running OPPORTUNISTIC containers, this config captures the utilization - beyond which OPPORTUNISTIC containers should start getting preempted. + running OPPORTUNISTIC containers, this config captures the CPU + utilization beyond which OPPORTUNISTIC containers should start getting + preempted. This is used in combination with + yarn.nodemanager.overallocation.preemption-threshold-count.cpu, that is, + only when the CPU utilization goes over this threshold consecutively for + a few times will preemption kicks in. -yarn.nodemanager.overallocation.preemption-threshold -0.96 +