-
Notifications
You must be signed in to change notification settings - Fork 1.1k
memory tracking with memory pool #7303
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
Conversation
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
|
cc @jhorstmann @alamb from previous discussion |
Dandandan
left a comment
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.
I think we should do this.
|
I think this is a nice API that could be used for more precise memory tracking in DataFusion (which is really missing at this point). |
|
Thank you @Dandandan, I'm going to merge this tomorrow if there are no other comments ❤️ |
|
Thank you ❤️ |
|
🚀 |
|
Thanks @waynexia and @Dandandan |
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.
I filed an epic to try and organize this work
| [package.metadata.docs.rs] | ||
| all-features = true | ||
|
|
||
| [features] |
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.
Would it be possible to also document this feature flag on the crate page?
Which issue does this PR close?
Follow-up of #6590.
Closes #7151.
Rationale for this change
Add
MemoryPoolunderarrow-buffer/poolfeature gate. This pool can implement precise memory tracking for Array/Bytes/MutableBuffer etc. Even in a shared buffer. Design credit to @tustvoldWhat changes are included in this PR?
New feature gate
arrow-buffer/pool.New traits
MemoryPoolandMemoryReservation.New structs
TrackingMemoryPoolwhich implementsMemoryPoolfor tracking memory usage.Corresponding new API
claimforBuffer/MutableBuffer/Bytes.Are there any user-facing changes?
Above new feature and APIs.