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

feat: Implement shared memory pool for case where spark.memory.offHeap.enabled=false #1002

Closed
wants to merge 16 commits into from

Conversation

andygrove
Copy link
Member

@andygrove andygrove commented Oct 8, 2024

Which issue does this PR close?

Closes #996

Rationale for this change

Simplify memory configuration.

What changes are included in this PR?

Allocate one shared pool per executor, rather than one pool per native plan, when spark.memory.offHeap.enabled=false.

How are these changes tested?

  • Existing tests
  • Ran TPC-H benchmarks

@andygrove andygrove marked this pull request as ready for review October 8, 2024 06:48
@Kontinuation
Copy link
Member

I'm a bit worried about this approach because we are implementing greedy mode inside CometTaskMemoryManager, which is known to starve consumers frequently. I prefer using fair spill pool for "native memory management" mode. This makes spillable operators work properly without being starved but with the cost of memory pool under-utilization.

@andygrove andygrove marked this pull request as draft October 8, 2024 16:07
@andygrove
Copy link
Member Author

I'm a bit worried about this approach because we are implementing greedy mode inside CometTaskMemoryManager, which is known to starve consumers frequently. I prefer using fair spill pool for "native memory management" mode. This makes spillable operators work properly without being starved but with the cost of memory pool under-utilization.

Thanks for the feedback. I will work on a separate PR for the fair spill approach. I am moving this PR to draft for now.

@andygrove
Copy link
Member Author

Closing in favor of #1021

@andygrove andygrove closed this Oct 16, 2024
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.

Implement shared memory pool when native memory management is enabled
2 participants