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

use conf to get num cores per executor #404

Merged
merged 1 commit into from
Oct 22, 2018

Conversation

imatiach-msft
Copy link
Contributor

We should use a combination of spark conf and number of cores per machine via java.lang.Runtime.getRuntime.availableProcessors to figure out the number of cores per executor.
Fixed based on discussion here: #379
Thank to @humbinal for figuring out how to fix the issue.
Also should resolve the issue brought by @ywskycn here: #346

Note: This may be eventually resolved in a better way with spark's barrier execution mode when it is implemented aka project hydrogen (without needing to compute num cores):
https://jira.apache.org/jira/browse/SPARK-24374

@mmlspark-bot
Copy link
Contributor

PASS Pass! — The build has succeeded. (ff4244df)

MMLSpark 0.14.dev10+1.gff4244df

This is a build for Github PR #404, changes:


@ywskycn
Copy link
Contributor

ywskycn commented Oct 22, 2018

@imatiach-msft I think we also need to include "spark.task.cpus" which is the number of cores to allocate for each task. "spark.executor.cores"/"spark.task.cpus" is the number of tasks in one executor.

@imatiach-msft
Copy link
Contributor Author

@ywskycn done! I used spark.executer.cores/spark.task.cpus. It looks like task cpus is usually default to 1 anyway (or not defined, as on my databricks cluster). Hopefully this will handle all cluster scenarios (other than possibly the spark standalone cluster with different # of cores per executor, which I haven't encountered yet from users).

@ywskycn
Copy link
Contributor

ywskycn commented Oct 22, 2018

LGTM

@mmlspark-bot
Copy link
Contributor

PASS Pass! — The build has succeeded. (3d053637)

MMLSpark 0.14.dev13+1.gbb2e6065

This is a build for Github PR #404, changes:


@mmlspark-bot
Copy link
Contributor

PASS Pass! — The build has succeeded. (58a2027c)

MMLSpark 0.14.dev13+1.g3d053637

This is a build for Github PR #404, changes:


@mmlspark-bot
Copy link
Contributor

PASS Pass! — The build has succeeded. (58a2027c)

MMLSpark 0.14.dev13+1.g58a2027c

This is a build for Github PR #404, changes:


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.

4 participants