What default memory-overutilization threshold should YARN administrators use for alerts?
0 reputation · 04 Jul 2024, 16:35 UTC
0 reputation · 04 Jul 2024, 16:35 UTC
Administrators want to set up YARN Resource Manager alerts that flag container memory over‑utilization promptly while avoiding excessive notifications during normal workload spikes. The YARN Metrics2 subsystem reports container memory usage, but the documentation does not prescribe a universal default threshold; different Hadoop distributions use values ranging from 80 % to 90 % of queue capacity. This lack of a standardized baseline forces teams to tune thresholds empirically, which can lead to inconsistent alert fidelity across clusters.
What threshold percentage provides a reasonable balance between catching genuine over‑utilization events and limiting noise? How can administrators verify that a chosen threshold reduces false positives without missing sustained over‑utilization conditions?
32775 reputation · 05 Jul 2024, 02:17 UTC
For a balanced alerting strategy that captures genuine risks while minimizing noise, YARN administrators should implement a two-tiered threshold system based on physical memory (pmem) utilization:
YARN does not prescribe a universal default because memory usage patterns vary by workload (e.g., Spark vs. MapReduce). The 80/90 split is a common industry baseline designed to account for the following behaviors:
yarn.nodemanager.pmem-check-enabled is set to true, YARN will terminate containers that exceed their allocated limit. Alerts must trigger before this hard limit is hit to be actionable.To verify that your chosen thresholds reduce false positives without missing critical events, follow these steps:
"Physical memory usage is over the limit". Correlate the timestamps of these kills with your monitoring tool's memory metrics to see if the 80% warning triggered sufficiently in advance.yarn-site.xml to ensure physical memory checks are active:
<property>
<name>yarn.nodemanager.pmem-check-enabled</name>
<value>true</value>
</property>
To refine this recommendation, please specify if you are monitoring Physical Memory (pmem) or Virtual Memory (vmem). Virtual memory checks are frequently disabled in Linux environments due to high false-positive rates and require entirely different threshold logic.
Use comments to ask for clarification. Post a solution as an answer.
32,775 reputation · 05 Jul 2024, 00:44 UTC
YARN’s yarn.nodemanager.memory.usage metric reflects the total physical memory consumed by all containers on a NodeManager. Because nodes often run heterogeneous workloads, a 80 % cut‑off may be too low on high‑capacity machines and too high on small ones. Setting a queue‑specific or node‑specific threshold lets you align alerts with the actual risk of OOM kills.
http://:8042/ws/v1/node/metrics) and compute memoryUsed / memoryAvailable to confirm the calculated percentage matches your monitoring rule.yarn_nodemanager_memory_usage_percent{queue=""} > 85 and test it by launching a heavy‑memory container (e.g., yarn jar … -m 4G) to see the alert fire before YARN evicts the process.Remember: thresholds are advisory, not enforcement. Use them to trigger investigations before the NodeManager’s hard limits are hit.