-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-25073][Yarn] AM and Executor Memory validation message is not proper while submitting spark yarn application #22199
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
9fe1a62 to
f4189d4
Compare
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.
What does this add?
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.
As mentioned in the JIRA even though the memory defined in the yarn.nodemanager.resource.memory-mb parameter is less eg:
yarn.scheduler.maximum-allocation-mb =15g and yarn.nodemanager.resource.memory-mb =8g
Launch spark-shell --master yarn --conf spark.yarn.am.memory=10g
we are getting below error
java.lang.IllegalArgumentException: Required AM memory (10240+1024 MB) is above the max threshold (8096 MB) of this cluster! Please increase the value of 'yarn.scheduler.maximum-allocation-mb'.
This message is very confusing to a user since spark indicate to increase the arn.scheduler.maximum-allocation-mb which is actually more than 10G as per this scenario whereas the issue is with yarn.nodemanager.resource.memory-mb,
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.
Both settings may have to change. But your text change doesn't mention anything new. Why does this help? I also don't think that the current behavior is wrong
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.
Where as in the executor memory validation check we are displaying the proper message considering both yarn.nodemanager.resource.memory-mb and yarn.scheduler.maximum-allocation-mb
if (executorMem > maxMem) {
throw new IllegalArgumentException(s"Required executor memory ($executorMemory" +
s"+$executorMemoryOverhead MB) is above the max threshold ($maxMem MB) of this cluster! " +
"Please check the values of 'yarn.scheduler.maximum-allocation-mb' and/or " +
"'yarn.nodemanager.resource.memory-mb and increase the memory appropriately.")
}
so same message i think is required for am memory validation as well,
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.
Please let me know for any suggestions. Thanks
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.
Yes both settings has to be changed, but for the AM container memory allocation validation only yarn.scheduler.maximum-allocation-mb parameter is mentioned ,message does not indicate to increase yarn.nodemanager.resource.memory-mb, in my change i updated this message by including "yarn.nodemanager.resource.memory-mb" paramter
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.
I understand the change below, that's probably fine. The change above doesn't seem to add anything. You want to tell the user to check both settings in both cases.
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.
just trying to make the messages more informative by mentioning to increase the memory appropriately as per the business use-case .i shall remove the part where we are mentioning about 'increasing memory' if it doesn't make much difference to the information we are trying to convey.
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.
Sure, though the solution may be to reduce the app memory usage rather than increase the YARN limits (which only admins can do). I think that's why the message more neutrally suggests that these are the limits that the app is hitting.
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.
Got your point, i will update as per the suggestion. Thanks for the feedback Sean.
f4189d4 to
3f4051c
Compare
…is throwing analysis exception ## What changes were proposed in this pull request? [SPARK-25073][Yarn] AM and Executor Memory validation message is not proper while submitting spark yarn applicationWhen the yarn.nodemanager.resource.memory-mb or yarn.scheduler.maximum-allocation-mb memory assignment is insufficient, Spark always reports an error request to adjust yarn.scheduler.maximum-allocation-mbeven though in message it shows the memory value of yarn.nodemanager.resource.memory-mb.As the error Message is bit misleading to the user we can modify the same, We can keep the error message same as executor memory validation message. ## How was this patch tested? Manually tested in hdfs-Yarn clustaer
|
ok to test. |
|
Test build #95196 has finished for PR 22199 at commit
|
…proper while submitting spark yarn application **## What changes were proposed in this pull request?** When the yarn.nodemanager.resource.memory-mb or yarn.scheduler.maximum-allocation-mb memory assignment is insufficient, Spark always reports an error request to adjust yarn.scheduler.maximum-allocation-mb even though in message it shows the memory value of yarn.nodemanager.resource.memory-mb parameter,As the error Message is bit misleading to the user we can modify the same, We can keep the error message same as executor memory validation message. Defintion of **yarn.nodemanager.resource.memory-mb:** Amount of physical memory, in MB, that can be allocated for containers. It means the amount of memory YARN can utilize on this node and therefore this property should be lower then the total memory of that machine. **yarn.scheduler.maximum-allocation-mb:** It defines the maximum memory allocation available for a container in MB it means RM can only allocate memory to containers in increments of "yarn.scheduler.minimum-allocation-mb" and not exceed "yarn.scheduler.maximum-allocation-mb" and It should not be more than total allocated memory of the Node. **## How was this patch tested?** Manually tested in hdfs-Yarn clustaer Closes apache#22199 from sujith71955/maste_am_log. Authored-by: s71955 <[email protected]> Signed-off-by: Sean Owen <[email protected]>
## What changes were proposed in this pull request?
When the yarn.nodemanager.resource.memory-mb or yarn.scheduler.maximum-allocation-mb
memory assignment is insufficient, Spark always reports an error request to adjust
yarn.scheduler.maximum-allocation-mb even though in message it shows the memory value
of yarn.nodemanager.resource.memory-mb parameter,As the error Message is bit misleading to the user we can modify the same, We can keep the error message same as executor memory validation message.
Defintion of yarn.nodemanager.resource.memory-mb:
Amount of physical memory, in MB, that can be allocated for containers. It means the amount of memory YARN can utilize on this node and therefore this property should be lower then the total memory of that machine.
yarn.scheduler.maximum-allocation-mb:
It defines the maximum memory allocation available for a container in MB
it means RM can only allocate memory to containers in increments of "yarn.scheduler.minimum-allocation-mb" and not exceed "yarn.scheduler.maximum-allocation-mb" and It should not be more than total allocated memory of the Node.
## How was this patch tested?
Manually tested in hdfs-Yarn clustaer