-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[C++] Acero buffer alignment #33313
Comments
Weston Pace / @westonpace: |
Antoine Pitrou / @pitrou: |
Antoine Pitrou / @pitrou: |
Sasha Krassovsky / @save-buffer: Configure alignment of a memory pool: that does seem like a much smaller code change than my previous PR. Realigning buffers: I think it could get confusing if an input batch gets some of its buffers in the plan-owned memory pool and part of it is in the global memory pool. I'd be in favor of always reallocating and memcpying batches from external sources so that we can modify buffers in-place eventually. This probably wouldn't be a problem in the common case because the dataset reader would allocate these buffers from within the plan. Always realign to 64 byte: At this point we should just always realign to 512 byte and have only one memory pool. |
Weston Pace / @westonpace:
We could relax the constraint to "value-aligned" or maybe just 8-byte aligned. In that case I would expect this operation to be, in most cases, a no-op. One has to go out of their way to obtain a buffer that does not meet that alignment. Even with 64-byte alignment we are still limiting the performance hit to cases where the memory was allocated outside of arrow-c++.
Would this still meet your needs? Would you be interested in updating your PR? |
I'm not sure which PR it is about, but I think there's value in being able to pass alignment explicitly on allocation calls. "Configuring" suddenly means you have global state that might be changed in conflicting ways by various users of the memory pool. |
Passing alignment on allocation calls is preferred for me. So if we want to do that then we should do that. I just thought a smaller change would be easier. |
Antoine Pitrou / @pitrou: |
Sasha Krassovsky / @save-buffer: |
This is a general JIRA to centralize some discussion / proposal on a buffer alignment strategy for Acero based on discussions that have happened in a few different contexts. Any actual work will probably span multiple JIRAs, some of which are already in progress.
Motivations:
Proposal:
Reporter: Weston Pace / @westonpace
Subtasks:
Note: This issue was originally created as ARROW-18115. Please see the migration documentation for further details.
The text was updated successfully, but these errors were encountered: