-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
GH-43902: [Java] Support for Long memory addresses #43903
GH-43902: [Java] Support for Long memory addresses #43903
Conversation
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 this is the right idea but we should be adding the long
version as an overload in most cases (and if it's in return position we need to add a separate method), then we need to deprecate the int
variants
java/memory/memory-core/src/main/java/org/apache/arrow/memory/util/HistoricalLog.java
Outdated
Show resolved
Hide resolved
java/memory/memory-core/src/main/java/org/apache/arrow/memory/util/ByteFunctionHelpers.java
Outdated
Show resolved
Hide resolved
Right. I will update. Thank you! |
java/memory/memory-core/src/main/java/org/apache/arrow/memory/LowCostIdentityHashMap.java
Outdated
Show resolved
Hide resolved
java/memory/memory-core/src/main/java/org/apache/arrow/memory/LowCostIdentityHashMap.java
Outdated
Show resolved
Hide resolved
...memory/memory-core/src/main/java/org/apache/arrow/memory/rounding/SegmentRoundingPolicy.java
Show resolved
Hide resolved
@lidavidm I updated. Sorry I have missed a few things earlier. |
Can we ensure we fix the warnings? (Also can we enable warnings-as-errors?) |
Right, we discussed this earlier as well. We can create a ticket to follow up with this. But in relation to this context, I think we need to sort of organize the warning -> error migration as I created a parent issue apache/arrow-java#59, and I will update each module upon feasibility and create new issues for cases like |
At least here, let's fix any warnings about deprecation of things we deprecated in this PR |
@lidavidm fixed the warnings and locally they don't appear, but let's check via the CI logs as well. |
Sorry for not having commented earlier but I wonder how much the changes do increase the memory footprint overall. When many buffers are created, this has a non negligeable impact abd I wonder if we should not adapt the fields based on the actual need for more than 2gb (4gb if we consider it unsigned) allocations |
Hmm, is there a use case where you'd expect many tens of thousands of buffers allocated but memory is constrained (measured in megabytes, I suppose)? |
After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit b2e0668. There were 2 benchmark results with an error:
There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 6 possible false positives for unstable benchmarks that are known to sometimes produce them. |
The query engine I work with runs multiple fragments concurrently and we are regularly seing hundreds of thousands of buffers allocated and being live. We try to keep the heap size at a minimum size (4g/8g) and use as much direct memory as possible and so arrow bufs footprint (along with related objects) have a large impact for us |
But even for 1 million buffers, 4 bytes of overhead per buffer is 4 megabytes (or we can say 8 bytes of overhead: 8 megabytes). I suppose we could continue storing |
### Rationale for this change The usage of `Integer` instead of `Long` must be encouraged with the usage of memory sizing, indexing and addresses. ### What changes are included in this PR? This PR refactors the usage of `Integer` into `Long` along with utilities refactors. ### Are these changes tested? Existing test cases. ### Are there any user-facing changes? Yes, certain API calls may subject changes. * GitHub Issue: apache#43902 Authored-by: Vibhatha Lakmal Abeykoon <[email protected]> Signed-off-by: David Li <[email protected]>
### Rationale for this change The usage of `Integer` instead of `Long` must be encouraged with the usage of memory sizing, indexing and addresses. ### What changes are included in this PR? This PR refactors the usage of `Integer` into `Long` along with utilities refactors. ### Are these changes tested? Existing test cases. ### Are there any user-facing changes? Yes, certain API calls may subject changes. * GitHub Issue: apache#43902 Authored-by: Vibhatha Lakmal Abeykoon <[email protected]> Signed-off-by: David Li <[email protected]>
Rationale for this change
The usage of
Integer
instead ofLong
must be encouraged with the usage of memory sizing, indexing and addresses.What changes are included in this PR?
This PR refactors the usage of
Integer
intoLong
along with utilities refactors.Are these changes tested?
Existing test cases.
Are there any user-facing changes?
Yes, certain API calls may subject changes.