-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-22292][Mesos] Added spark.mem.max support for Mesos #19510
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
Conversation
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.
remove space
|
@windkit there is an open issue here: https://issues.apache.org/jira/browse/SPARK-22133 |
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.
Can we defend against minimum values and fail fast? For example default executor memory is 1.4MB. We could calculate the value returned by MesosSchedulerUtils.executorMemory. I don't think these values calculated in canLaunchTask ever change. Same applies for cpus.
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.
@skonto
For cpus, I think we can compare with minCoresPerExecutor
For mem, calling the MesosSchedulerUtils.executorMemory to get the minimum requirement.
Then at here, we parse the option, check the minimum and if it is too small, throw exception?
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.
Exception I think would be ok, the idea if something is never going to work let the user know, especially for the novice user. In general, the minimum would be a warning if we dont want an exception thrown.
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.
Should I add the check with this PR or a separate one?
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.
Do we need to have a check similar to
Line 73 in 06df34d
| // Maximum number of cores to acquire |
|
@skonto sure I can add those in, can you point to me where the documentation source code is? |
|
@susanxhuynh pls review. |
|
@windkit Trying to understand the need for this config ... could you accomplish the same thing by setting spark.cores.max, spark.executor.cores, and spark.executor.memory? Could you give an example scenario where this is needed? |
docs/running-on-mesos.md
Outdated
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.
Typo: 'park'
docs/running-on-mesos.md
Outdated
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.
Typo: 'park'
docs/running-on-mesos.md
Outdated
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.
Typo: 'park'
docs/running-on-mesos.md
Outdated
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.
Maybe add "across the cluster (not from each machine)". And, something about there is no maximum if this property is not set.
docs/running-on-mesos.md
Outdated
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.
My suggestion: "Duration for which unused resources are considered declined, when maximum number of cores spark.cores.max has been reached."
@ArtRand Is this the documentation you had in mind in https://issues.apache.org/jira/browse/SPARK-22133 ? Is this enough information for a non-Mesos expert to set this?
|
@susanxhuynh Thanks for reviewing. |
## What changes were proposed in this pull request? Documentation about Mesos Reject Offer Configurations ## Related PR #19510 for `spark.mem.max` Author: Li, YanKit | Wilson | RIT <[email protected]> Closes #19555 from windkit/spark_22133.
|
@windkit Could you update the PR? @susanxhuynh I think this is fine to merge, are you ok? |
|
Can one of the admins verify this patch? |
|
gentle ping @windkit |
What changes were proposed in this pull request?
To limit the amount of resources a spark job accept from Mesos, currently we can only use
spark.cores.maxto limit in terms of cpu cores.However, when we have big memory executors, it would consume all the resources.
This PR added
spark.mem.maxoption for MesosHow was this patch tested?
Added Unit Test