-
Notifications
You must be signed in to change notification settings - Fork 115
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
Configurable workers #46
Conversation
@@ -42,6 +49,10 @@ | |||
# Make tachyon_mb as spark_mb for now. | |||
tachyon_mb = spark_mb | |||
|
|||
worker_instances = int(os.getenv("SPARK_WORKER_INSTANCES", 1)) | |||
# Distribute equally cpu cores among worker instances | |||
worker_cores = slave_cpus / worker_instances |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be good to do:
max(slave_cpus / worker_instances, 1)
I some divergent cases people might try to over-subscribe the machines. It would be good to have Spark at least give 1 core to each worker in these cases.
This is cool - just suggested one minor change, but looks good other than that. |
Fixed the over-subscribing issue. |
Added option to configure number of worker instances and to set SPARK_MASTER_OPTS Depends on: mesos/spark-ec2#46 Author: Allan Douglas R. de Oliveira <[email protected]> Closes #612 from douglaz/ec2_configurable_workers and squashes the following commits: d6c5d65 [Allan Douglas R. de Oliveira] Added master opts parameter 6c34671 [Allan Douglas R. de Oliveira] Use number of worker instances as string on template ba528b9 [Allan Douglas R. de Oliveira] Added SPARK_WORKER_INSTANCES parameter (cherry picked from commit 4669a84) Signed-off-by: Patrick Wendell <[email protected]>
Added option to configure number of worker instances and to set SPARK_MASTER_OPTS Depends on: mesos/spark-ec2#46 Author: Allan Douglas R. de Oliveira <[email protected]> Closes #612 from douglaz/ec2_configurable_workers and squashes the following commits: d6c5d65 [Allan Douglas R. de Oliveira] Added master opts parameter 6c34671 [Allan Douglas R. de Oliveira] Use number of worker instances as string on template ba528b9 [Allan Douglas R. de Oliveira] Added SPARK_WORKER_INSTANCES parameter
Added option to configure number of worker instances and to set SPARK_MASTER_OPTS Depends on: mesos/spark-ec2#46 Author: Allan Douglas R. de Oliveira <[email protected]> Closes apache#612 from douglaz/ec2_configurable_workers and squashes the following commits: d6c5d65 [Allan Douglas R. de Oliveira] Added master opts parameter 6c34671 [Allan Douglas R. de Oliveira] Use number of worker instances as string on template ba528b9 [Allan Douglas R. de Oliveira] Added SPARK_WORKER_INSTANCES parameter
Added configuration for SPARK_MASTER_OPTS, SPARK_WORKER_INSTANCES and SPARK_WORKER_CORES