Open GoogleCodeExporter opened 8 years ago
This issue was found when checking the issue 922. I just checked the
AbstractFrameSorter.sort part and confirmed that it was trying to allocate "new
int[size]" where the size was 83800068. If we multiply this number by 4 bytes,
then we gets 320MB. Jianfeng, it would be really nice if you could find out why
it generates an OOM exception since his is related with the frame. :-)
Original comment by wangs...@gmail.com
on 12 Aug 2015 at 1:56
The int array is the pointer array storing the offset to the frame tuples which
is created when the FrameMemoryBuffer is full. If the pointer is that big then
the objects it pointed to could be even bigger.
The source of the problem is that the `frameLimit` parameter that sent to
initialize the `ExternalSortRunGenerator` is too larger.
Can you find out how big is that `frameLimit`?
And what is the `compiler.framesize` and `compiler.sortmemory` in your settings?
Original comment by jianfeng...@gmail.com
on 12 Aug 2015 at 3:02
Thanks. Based on the sort memory, it makes sense? However, the problem is we
have five partitions, and an OOM exception happens.
compiler.framesize: 655,360 (650KB)
compiler.sortmemory: 335,544,320 (320MB)
I will try to check the frameLimit.
Original comment by wangs...@gmail.com
on 12 Aug 2015 at 3:10
Yes, it makes sense if the `sortmemory` is 320MB. I guess your tuple is also
very small, then the size of the pointer array is not neglectable. It will be a
very tricky problems if we want to calculate the memory consumption very
precisely, though it is a separate issue.
You can try to lower the `sortmemory` to 120MB or smaller to trigger the 2nd
round ExternalSort.
Original comment by jianfeng...@gmail.com
on 12 Aug 2015 at 3:24
Yes. I will try that. 320MB for 6GB java heap was too much, maybe.
Original comment by wangs...@gmail.com
on 12 Aug 2015 at 3:25
While, the OOM exception is an overall effect. Each operator may hold several
hundred of MB, sort operator is the last straw.
Original comment by jianfeng...@gmail.com
on 12 Aug 2015 at 4:40
Original issue reported on code.google.com by
wangs...@gmail.com
on 12 Aug 2015 at 1:52