-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-54354][SQL] Fix Spark hanging when there's not enough JVM heap memory for broadcast hashed relation #53065
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -143,9 +143,8 @@ private[execution] object HashedRelation { | |
| new TaskMemoryManager( | ||
| new UnifiedMemoryManager( | ||
| new SparkConf().set(MEMORY_OFFHEAP_ENABLED.key, "false"), | ||
| Long.MaxValue, | ||
| Long.MaxValue / 2, | ||
| 1), | ||
| Runtime.getRuntime.maxMemory, | ||
| Runtime.getRuntime.maxMemory / 2, 1), | ||
| 0) | ||
| } | ||
|
|
||
|
|
@@ -401,9 +400,8 @@ private[joins] class UnsafeHashedRelation( | |
| val taskMemoryManager = new TaskMemoryManager( | ||
| new UnifiedMemoryManager( | ||
| new SparkConf().set(MEMORY_OFFHEAP_ENABLED.key, "false"), | ||
| Long.MaxValue, | ||
| Long.MaxValue / 2, | ||
| 1), | ||
| Runtime.getRuntime.maxMemory, | ||
| Runtime.getRuntime.maxMemory / 2, 1), | ||
| 0) | ||
|
|
||
| val pageSizeBytes = Option(SparkEnv.get).map(_.memoryManager.pageSizeBytes) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you know if the per-JVM memory manager here can be used?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not right now but I think it's the final target. We cannot directly modify the memory manager here, because currently Spark has to stick BHJ's memory allocation on the JVM heap. The per-JVM memory manager may be using off-heap mode. #52817 will improve SHJ to make sure it follows the per-JVM memory manager's memory mode, but we need a separate solution for BHJ in the future (which relies on the |
||
|
|
@@ -576,9 +574,8 @@ private[execution] final class LongToUnsafeRowMap( | |
| new TaskMemoryManager( | ||
| new UnifiedMemoryManager( | ||
| new SparkConf().set(MEMORY_OFFHEAP_ENABLED.key, "false"), | ||
| Long.MaxValue, | ||
| Long.MaxValue / 2, | ||
| 1), | ||
| Runtime.getRuntime.maxMemory, | ||
| Runtime.getRuntime.maxMemory / 2, 1), | ||
| 0), | ||
| 0) | ||
| } | ||
|
|
||
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.