compass icon indicating copy to clipboard operation
compass copied to clipboard

[Question]: Configuring Spark Executor for GC Logging in the Same Directory as Standard Output

Open huangzhir opened this issue 2 years ago • 2 comments

Contact Details

No response

What would you like to ask or discuss?

I have a question regarding memory waste diagnosis, which relies on the executor's GC logs. However, by default, Spark's executor logs do not include this. How should I add the parameter "spark.executor.extraJavaOptions=-verbose:gc -XX:+PrintGCDetails -Xloggc:gc.log"? How can I specify that the gc.log should be in the same directory as the standard output? This is necessary so that the YARN history server can collect the logs.

huangzhir avatar Nov 24 '23 02:11 huangzhir

We can add this parameter -Xloggc:<LOG_DIR>/gc.log.

nilnon avatar Nov 24 '23 03:11 nilnon

Thank you for the suggestion. This approach is indeed viable.

huangzhir avatar Nov 24 '23 06:11 huangzhir