cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to incorporate these GC options into my Databricks Cluster? )(spark.executor.extraJavaOptions)

auser85
New Contributor III

I want to try incorporating these options into my databricks cluster.

spark.driver.extraJavaOptions -XX:+UseG1GC -XX:+G1SummarizeConcMark
spark.executor.extraJavaOptions -XX:+UseG1GC -XX:+G1SummarizeConcMark

If I put them under Compute -> Cluster -> Configuration -> Advanced Options -> Spark -> Spark config, my cluster fails to boot;

If I add them to Compute -> Cluster -> Configuration -> Advanced Options -> Spark -> Environment variables, the UI says its an illegal key value pair and wont proceed.

1 REPLY 1

Aviral-Bhardwaj
Esteemed Contributor III

hey @Andrew Fogarty​ , I think this is only for the spark-submit command, not for cluster UI.

Please have a look at this doc - http://progexc.blogspot.com/2014/12/spark-configuration-mess-solved.html

spark.executor.extraJavaOptions

A string of extra JVM options to pass to executors. This is intended to be set by users. For instance, GC settings or other logging. Note that it is illegal to set Spark properties or maximum heap size (-Xmx) settings with this option. Spark properties should be set using a SparkConf object or the spark-defaults.conf file used with the spark-submit script. Maximum heap size settings can be set with spark.executor.memory. The following symbols, if present will be interpolated: will be replaced by application ID and will be replaced by executor ID. For example, to enable verbose gc logging to a file named for the executor ID of the app in /tmp, pass a 'value' of: 

-verbose:gc -Xloggc:/tmp/-.gc

spark.executor.defaultJavaOptions

 will be prepended to this configuration.

And more you can explore here - https://spark.apache.org/docs/latest/configuration.html

Thanks

Aviral

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!