Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/smspark/bootstrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,9 @@ def get_yarn_spark_resource_config(
# default parallelism
default_parallelism = executor_count_total * executor_cores * 2
# total memory for one executor on the instance, leave 1GB for the Hadoop daemons
total_executor_memory = int((reduced_instance_mem_mb - constants.HADOOP_DAEMONS_MEM_MB) / executor_count_per_instance)
total_executor_memory = int(
(reduced_instance_mem_mb - constants.HADOOP_DAEMONS_MEM_MB) / executor_count_per_instance
)
# executor memory MB (90% of the total executor mem)
executor_mem_mb = int(total_executor_memory * constants.EXECUTOR_MEM_INSTANCE_MEM_RATIO_ADV)
# executor memory overhead MB (10% of the total executor mem)
Expand All @@ -426,11 +428,7 @@ def get_yarn_spark_resource_config(
driver_mem_mb = executor_mem_mb
driver_mem_overhead_mb = executor_mem_overhead_mb
else:
raise ValueError(
"Could not determine Spark configuration mode: {}.".format(
spark_config_mode
)
)
raise ValueError("Could not determine Spark configuration mode: {}.".format(spark_config_mode))

driver_gc_config = (
"-XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=70 -XX:MaxHeapFreeRatio=70 "
Expand Down