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

Large memory allocations which are not tracked #11099

Open
FelixYBW opened this issue Sep 26, 2024 · 3 comments
Open

Large memory allocations which are not tracked #11099

FelixYBW opened this issue Sep 26, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@FelixYBW
Copy link
Contributor

Description

In Gluten there is one common issue is "killed by yarn", the root cause is that some memory allocation usually the std::vector which bypasses memory pool track. Some of the std::vector can be very large like a commonly used per row std::vector<char*>. If row size is 1G, the vector size can be as large as 8G.

The ideal solution is to avoid the per row vector as much as possible. If we have to use it's better to track in memory pool by using std::vector<char*, memory::StlAllocator<char*>> and std::allocated_shared.

Here is a umbrella track of such allocations.
Link to Gluten issue: apache/incubator-gluten#6947

@FelixYBW FelixYBW added the enhancement New feature or request label Sep 26, 2024
@FelixYBW
Copy link
Contributor Author

#11077 remove the per row vector allocation

@FelixYBW
Copy link
Contributor Author

FelixYBW commented Sep 26, 2024

sortedRows_.resize(numInputRows_);

Per row memory allocation. Sorted row is passed to std::sort. Looks we can't assign allocator

@FelixYBW
Copy link
Contributor Author

auto spillRows = std::vector<char*>(

Potential per row allocation. Spill is already triggered, we should allocate it using spill_memorypool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant