Skip to content
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

Recycle serialization buffers on transmission #342

Draft
wants to merge 1 commit into
base: rolling
Choose a base branch
from

Conversation

fuzzypixelz
Copy link
Contributor

Adds a LIFO buffer pool in the context to reuse buffers allocated on serialization. The aim is not (only) to avoid the overhead of dynamic allocation but rather to enhance the cache locality of serialization buffers.

@fuzzypixelz
Copy link
Contributor Author

fuzzypixelz commented Dec 16, 2024

The aim of this pull request is to fix high latency for relatively large topics (e.g. 1 MB tagus) in the single-process iRobot benchmark with --ipc off. Results were obtained using the Mont Blanc topology on an Ubuntu 24.04.1 LTS machine with an Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz.

dd82e84

node topic size_b mean_us min_us max_us
ponce tagus 1000000 3016 2512 5705
geneva tagus 1000000 3513 2997 6457
mandalay tagus 1000000 2678 2214 5233

401016c

node topic size_b mean_us min_us max_us
ponce tagus 1000000 1947 1476 2788
geneva tagus 1000000 2200 1667 3063
mandalay tagus 1000000 1603 1225 1997

401016c + eed223a

node topic size_b mean_us min_us max_us
ponce tagus 1000000 393 257 1301
geneva tagus 1000000 657 438 1701
mandalay tagus 1000000 108 68 650

@fuzzypixelz fuzzypixelz changed the title Recycle serialization buffers on transmission. Recycle serialization buffers on transmission Dec 16, 2024
@clalancette
Copy link
Collaborator

All right, now that we've merged in #327 , we can consider this one. Please rebase this onto the latest, then we can do a full review of it. Until then, I'll mark it as a draft.

@clalancette clalancette marked this pull request as draft December 17, 2024 21:41
Adds a LIFO buffer pool in the context to reuse buffers allocated
on serialization. The aim is not (only) to avoid the overhead of
dynamic allocation but rather to enhance the cache locality of
serialization buffers.
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.

2 participants