You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "waynexia (via GitHub)" <gi...@apache.org> on 2025/03/18 00:22:55 UTC
[PR] memory tracking with memory pool [arrow-rs]
waynexia opened a new pull request, #7303:
URL: https://github.com/apache/arrow-rs/pull/7303
# Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
-->
Follow-up of #6590.
Closes #7151.
# Rationale for this change
<!--
Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
-->
Add `MemoryPool` under `arrow-buffer/pool` feature gate. This pool can implement precise memory tracking for Array/Bytes/MutableBuffer etc. Even in a shared buffer. Design credit to @tustvold
# What changes are included in this PR?
<!--
There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
-->
New feature gate `arrow-buffer/pool`.
New traits `MemoryPool` and `MemoryReservation`.
New structs `TrackingMemoryPool` which implements `MemoryPool` for tracking memory usage.
Corresponding new API `claim` for `Buffer`/`MutableBuffer`/`Bytes`.
# Are there any user-facing changes?
Above new feature and APIs.
<!--
If there are user-facing changes then we may require documentation to be updated before approving the PR.
-->
<!---
If there are any breaking changes to public APIs, please call them out.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] memory tracking with memory pool [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #7303:
URL: https://github.com/apache/arrow-rs/pull/7303#issuecomment-3060147455
🚀
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] memory tracking with memory pool [arrow-rs]
Posted by "waynexia (via GitHub)" <gi...@apache.org>.
waynexia commented on PR #7303:
URL: https://github.com/apache/arrow-rs/pull/7303#issuecomment-3049946303
Thank you @Dandandan, I'm going to merge this tomorrow if there are no other comments ❤️
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] memory tracking with memory pool [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #7303:
URL: https://github.com/apache/arrow-rs/pull/7303#discussion_r2276569041
##########
arrow-buffer/Cargo.toml:
##########
@@ -35,6 +35,9 @@ bench = false
[package.metadata.docs.rs]
all-features = true
+[features]
Review Comment:
Would it be possible to also document this feature flag on the crate page?
- https://github.com/apache/arrow-rs/tree/main/arrow#feature-flags
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] memory tracking with memory pool [arrow-rs]
Posted by "waynexia (via GitHub)" <gi...@apache.org>.
waynexia merged PR #7303:
URL: https://github.com/apache/arrow-rs/pull/7303
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] memory tracking with memory pool [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #7303:
URL: https://github.com/apache/arrow-rs/pull/7303#issuecomment-3060147580
Thanks @waynexia and @Dandandan
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] memory tracking with memory pool [arrow-rs]
Posted by "Dandandan (via GitHub)" <gi...@apache.org>.
Dandandan commented on PR #7303:
URL: https://github.com/apache/arrow-rs/pull/7303#issuecomment-3038219418
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).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] memory tracking with memory pool [arrow-rs]
Posted by "waynexia (via GitHub)" <gi...@apache.org>.
waynexia commented on PR #7303:
URL: https://github.com/apache/arrow-rs/pull/7303#issuecomment-3058249152
Thank you :heart:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] memory tracking with memory pool [arrow-rs]
Posted by "waynexia (via GitHub)" <gi...@apache.org>.
waynexia commented on PR #7303:
URL: https://github.com/apache/arrow-rs/pull/7303#issuecomment-2737635101
cc @jhorstmann @alamb from previous discussion
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org