Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flight Recorder Mode when Driver crashed from OOM #46

Closed
maytasm opened this issue Dec 9, 2022 · 3 comments
Closed

Flight Recorder Mode when Driver crashed from OOM #46

maytasm opened this issue Dec 9, 2022 · 3 comments

Comments

@maytasm
Copy link

maytasm commented Dec 9, 2022

Hi,

I am wondering if you have any workaround or recommendation for using flight recorder mode when the driver can crashed from OOM. When the driver crashed from OOM, the Listener would never received onApplicationEnd and no metrics would be written to the sink. Ideally, we would still want to know all the metrics of the jobs accumulated right before it crashed.

@LucaCanali
Copy link
Owner

Hi,

Flight recorder mode with file output currently has a very simple implementation, where all metrics are buffered into the driver memory and will only be written out as the application finishes, which indeed is a problem if youhave a driver crash in between.

You may want to have a looks the Filght recorder mode with InfluxDB sink and/or Kafka sink, to overcome those issues: https://github.com/LucaCanali/sparkMeasure/blob/master/docs/Flight_recorder_mode_InfluxDBSink.md https://github.com/LucaCanali/sparkMeasure/blob/master/docs/Flight_recorder_mode_KafkaSink.md

You may also want to check the SPark dashboard project https://github.com/cerndb/spark-dashboard

Best,
Luca

@maytasm
Copy link
Author

maytasm commented Dec 27, 2022

@LucaCanali
Thanks for the reply. Even if Filght recorder is using InfluxDB sink and/or Kafka sink, it would not be able to report metrics of the latest / on-going task/stage/executor at the time of the crash right? One solution might be to have some sort of monitoring done outside of Spark Driver? Do you know of anything like that or is there any other workaround I might have missed? Thanks!

@LucaCanali
Copy link
Owner

If your goal is to investigate OOMs in the Spark driver, sparkMeasure is not the best tool.
Spark metrics instrumentation has metrics for Java memory usage on the driver (and executors), which may be useful for your case, see https://github.com/LucaCanali/Miscellaneous/tree/master/Spark_Dashboard
Or else you can try using JAVA instrumentation like JFR, or debugging tools like https://github.com/jvm-profiling-tools/async-profiler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants