-
Notifications
You must be signed in to change notification settings - Fork 7
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
Share a custom PayloadPool between DDS and RTPS participants #70
Conversation
e93e5ff
to
1252aa2
Compare
ddspipe_core/include/ddspipe_core/efficiency/payload/PayloadPoolMediator.hpp
Show resolved
Hide resolved
ddspipe_core/include/ddspipe_core/efficiency/payload/PayloadPoolMediator.hpp
Outdated
Show resolved
Hide resolved
ddspipe_core/src/cpp/efficiency/payload/PayloadPoolMediator.cpp
Outdated
Show resolved
Hide resolved
ddspipe_core/src/cpp/efficiency/payload/PayloadPoolMediator.cpp
Outdated
Show resolved
Hide resolved
1252aa2
to
cecc3dd
Compare
ddspipe_core/include/ddspipe_core/efficiency/payload/PayloadPoolMediator.hpp
Outdated
Show resolved
Hide resolved
The tests are failing because it has to be run with Fast-CDR 1.1.x & Fast-DDS in master until commit b913df0a6. Merge when Fast-DDS 2.12.1 comes out. |
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.
LGTM
Signed-off-by: tempate <[email protected]>
Signed-off-by: tempate <[email protected]>
Signed-off-by: Juan Lopez Fernandez <[email protected]>
Signed-off-by: tempate <[email protected]>
Signed-off-by: tempate <[email protected]>
Signed-off-by: tempate <[email protected]>
Signed-off-by: tempate <[email protected]>
Signed-off-by: tempate <[email protected]>
Signed-off-by: tempate <[email protected]>
Signed-off-by: tempate <[email protected]>
Signed-off-by: tempate <[email protected]>
Signed-off-by: tempate <[email protected]>
a24e4ab
to
2d6d245
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #70 +/- ##
==========================================
- Coverage 36.91% 36.76% -0.16%
==========================================
Files 115 116 +1
Lines 4946 4975 +29
Branches 1893 1905 +12
==========================================
+ Hits 1826 1829 +3
- Misses 2310 2332 +22
- Partials 810 814 +4 ☔ View full report in Codecov by Sentry. |
* Use the router's PayloadPool to avoid copies Signed-off-by: tempate <[email protected]> * Update TypeSupport to use the PayloadPool Signed-off-by: tempate <[email protected]> * Mediator PoC: no leaks and copies Signed-off-by: Juan Lopez Fernandez <[email protected]> * Fix memory leaks: XML participants without ignore_local_endpoints Signed-off-by: tempate <[email protected]> * Replace the PoC with the actual implementation Signed-off-by: tempate <[email protected]> * Destroy saved payloads after getting them Signed-off-by: tempate <[email protected]> * Destroy the discarded payloads Signed-off-by: tempate <[email protected]> * Uncrustify Signed-off-by: tempate <[email protected]> * Apply suggestions Signed-off-by: tempate <[email protected]> * Complete TODOs Signed-off-by: tempate <[email protected]> * Apply suggestions Signed-off-by: tempate <[email protected]> * Apply more suggestions Signed-off-by: tempate <[email protected]> --------- Signed-off-by: tempate <[email protected]> Signed-off-by: Juan Lopez Fernandez <[email protected]> Co-authored-by: Juan Lopez Fernandez <[email protected]>
In the previous version, DDS and RTPS had two different Payload Pools, and the data forwarded through the DDS Router would get copied from one to the other. In this version, making use of Fast-DDS's recently added functionality to create DataWriters and DataReaders with a custom Payload Pool, it's become possible to share the same Payload Pool between DDS and RTPS participants and avoid the copies. This version also fixes the leaks that were taking place when using DDS participants.
In the following example, we launch a DDS Router with two DDS participants, and publish a hundred 1MB messages on a reliable-volatile topic. Here's the heap memory consumption of the DDS Router before and after this update.
Before (Peak Heap Memory 6.0 MiB):

After (Peak Heap Memory 5.0 MiB):

Merge after: