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

Configurable workers #46

Merged
merged 4 commits into from
May 3, 2014
Merged

Configurable workers #46

merged 4 commits into from
May 3, 2014

Conversation

douglaz
Copy link

@douglaz douglaz commented May 1, 2014

Added configuration for SPARK_MASTER_OPTS, SPARK_WORKER_INSTANCES and SPARK_WORKER_CORES

@@ -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
Copy link

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.

@pwendell
Copy link

pwendell commented May 3, 2014

This is cool - just suggested one minor change, but looks good other than that.

@douglaz
Copy link
Author

douglaz commented May 3, 2014

Fixed the over-subscribing issue.

pwendell added a commit that referenced this pull request May 3, 2014
@pwendell pwendell merged commit 695816e into mesos:v2 May 3, 2014
asfgit pushed a commit to apache/spark that referenced this pull request May 4, 2014
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]>
asfgit pushed a commit to apache/spark that referenced this pull request May 4, 2014
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
@douglaz douglaz deleted the configurable_workers branch May 4, 2014 01:37
@pwendell pwendell mentioned this pull request May 4, 2014
pwendell added a commit that referenced this pull request May 4, 2014
pdeyhim pushed a commit to pdeyhim/spark-1 that referenced this pull request Jun 25, 2014
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
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

Successfully merging this pull request may close these issues.

2 participants