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.
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: https://github.com/apache/incubator-gluten/issues/6947