You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/com/linkedin/drelephant/spark/heuristics/ExecutorGcHeuristic.scala
+9-2Lines changed: 9 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -55,11 +55,13 @@ class ExecutorGcHeuristic(private val heuristicConfigurationData: HeuristicConfi
55
55
56
56
//adding recommendations to the result, severityTimeA corresponds to the ascending severity calculation
57
57
if (evaluator.severityTimeA.getValue >Severity.LOW.getValue) {
58
-
resultDetails = resultDetails :+newHeuristicResultDetails("Gc ratio high", "The job is spending too much time on GC. We recommend increasing the executor memory.")
58
+
resultDetails = resultDetails :+newHeuristicResultDetails("Gc ratio high",
59
+
"The job is spending too much time on GC. Recommended to increase the executor memory."+ evaluator.parallelGcRecommendation +"Can also try reducing number of UDF calls.")
59
60
}
60
61
//severityTimeD corresponds to the descending severity calculation
61
62
if (evaluator.severityTimeD.getValue >Severity.LOW.getValue) {
62
-
resultDetails = resultDetails :+newHeuristicResultDetails("Gc ratio low", "The job is spending too little time in GC. Please check if you have asked for more executor memory than required.")
63
+
resultDetails = resultDetails :+newHeuristicResultDetails("Gc ratio low",
64
+
"The job is spending too little time in GC. Please check if you have asked for more executor memory than required.")
63
65
}
64
66
65
67
valresult=newHeuristicResult(
@@ -103,6 +105,11 @@ object ExecutorGcHeuristic {
103
105
thrownewException("No executor information available.")
Copy file name to clipboardExpand all lines: app/views/help/spark/helpExecutorGcHeuristic.scala.html
+9-1Lines changed: 9 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -17,4 +17,12 @@
17
17
<p>This analysis shows how much time a job is spending in GC. To normalise the results across all jobs, the ratio of the time a job spends in Gc to the total run time of the job is calculated. </p>
18
18
<p>A job is flagged if the ratio is too high, meaning the job spends too much time in GC.</p>
19
19
<h3>Suggestions</h3>
20
-
<p>We recommend increasing the executor memory.</p>
20
+
<ul>
21
+
<li>We recommend increasing the executor memory.</li>
22
+
<li>Enabling G1GC or ParallelGC using spark.executor.extraJavaOptions could help.</li>
23
+
<ul>
24
+
<li>User can enable G1GC or ParallelGC by adding <b>-XX:+UseG1GC</b> or <b>-XX:+UseParallelGC</b> respectively to Spark configuration spark.executor.extraJavaOptions</li>
25
+
</ul>
26
+
<li>High GC can occur if the number of UDF calls made is high, especially if the UDFs are inefficient or use a lot of memory.</li>
27
+
</ul>
28
+
<p>For some general guideline about how to tune GC for your Spark application refer <ahref="https://spark.apache.org/docs/latest/tuning.html#garbage-collection-tuning" target="_blank">here</a></p>
0 commit comments