Skip to content

Conversation

@antiguru
Copy link
Member

@antiguru antiguru commented Dec 2, 2021

Instead of allocating buffers at construction time, allocate buffers
before pushing or cloning. This adds additional instructions on the fast
path for input/buffer/exchange/tee, but seems to be justified by the
memory savings.

We expect a linear amount of memory savings per operator in the number of workers. For non-serializing allocators, this memory saving will persist during the lifetime of the instance, for returning (serializing) allocators, the memory savings will remain until the first data is sent.

The exchange benchmark does not report a change in performance.

The main question that we'd need to answer is whether we're comfortable with Message::push_at not ensuring that the returned object is allocated. With current Timely, this moves the burden of ensuring allocations to clients of push_at, which is not great. Considering #426, this problem would disappear (somewhat) because containers would be responsible for their own buffer management. We could delay this PR until after #426 lands

Instead of allocating buffers at construction time, allocate buffers
before pushing or cloning. This adds additional instructions on the fast
path for input/buffer/exchange/tee, but seems to be justified by the
memory savings.

The exchange benchmark does not report a change in performance.

Signed-off-by: Moritz Hoffmann <[email protected]>
@antiguru
Copy link
Member Author

Would need to be rewritten.

@antiguru antiguru closed this May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant