-
Notifications
You must be signed in to change notification settings - Fork 106
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
Track ColumnChunk allocations through the BufferManager #3743
Conversation
a017e6b
to
27bbaa5
Compare
77d13d8
to
a72b813
Compare
ecae6e3
to
1e1bd9d
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3743 +/- ##
==========================================
- Coverage 87.32% 87.25% -0.07%
==========================================
Files 1327 1327
Lines 51287 51316 +29
Branches 6884 6886 +2
==========================================
- Hits 44786 44776 -10
- Misses 6329 6368 +39
Partials 172 172 ☔ View full report in Codecov by Sentry. |
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.
Is the spilling gonna be in another PR?
0d55c2d
to
4a5cf76
Compare
a47e21b
to
a6481c0
Compare
510fa03
to
bde85c7
Compare
Benchmark ResultMaster commit hash:
|
a36a164
to
ecbfa15
Compare
Benchmark ResultMaster commit hash:
|
ecbfa15
to
f552893
Compare
Benchmark ResultMaster commit hash:
|
f552893
to
b5413de
Compare
Benchmark ResultMaster commit hash:
|
b5413de
to
91e2153
Compare
Benchmark ResultMaster commit hash:
|
91e2153
to
5a126bd
Compare
5a126bd
to
cbd8165
Compare
Benchmark ResultMaster commit hash:
|
(cherry picked from commit bc3cc71)
(cherry picked from commit bc3cc71)
Implements #3660 (also see #3698)
I've merged the MemoryAllocator and MemoryManager; it wasn't obvious the purpose of the distinction (though it's occurred to me that we could have separate allocators for stuff using malloc like the ColumnChunks and our own allocator). Mainly I just wanted to avoid having to store separate references to the MemoryManager everywhere. The MemoryManager seemed better suited than the memory allocator to pass around to initialize column chunk buffers, however there wasn't an way of getting a MemoryManager from an existing buffer (just a MemoryAllocator). While I could have changed that, merging MemoryManager and MemoryAllocator seemed simpler.
Note that it was necessary to raise the buffer pool size used for the tests; that should be able to be lowered again once spilling to disk is implemented as part of testing that behaviour.
Issues
I was having some issues with hanging instead of throwing exceptions when doing large rel copies with a restricted buffer pool size (looking at the behaviour when there is not sufficient memory).
As far as I can tell, sometimes, with a large buffer pool of ~2000-3000 MB the hanging seems to be it continuously swapping out pages in the hash index. It may be that it will eventually throw an exception, but there sometimes is enough free memory for it to almost continuously try to do a small amount of work.
What's more concerning is that restricting the buffer pool size to the minimum 64MB on the same tests it will hang, and running it with backtraces will show a backtrace from a buffer manager exception (when looking up in the hash index; a couple of times it was the assert in freeUsedMemory), but that exception isn't stopping execution and it continues running with high CPU usage (possibly related to #3459).
I suspect that spilling to disk (#3698) will more or less solve these issues, as we generally shouldn't need to operate in such a memory restricted environment, and with spilling to disk ideally won't need to actually fail unless both disk and memory are full, but I'm concerned that we don't seem to be failing reliably in those circumstances.