Hi all,
I have read RTI article about DDS fragmentation and IP fragmentation (link here: https://rtidds.wordpress.com/2017/07/27/who-is-chopping-my-application-data-and-why-should-i-care/).
First of all, thanks for the article and all explanation! It is very helpful.
Secondly, in SHMEM, the allowed maximum size of sample is also determined by message_size_max and the default value is 65536. My questions are:
- If the size of sample exceed message_size_max, is it also fragmented?
- If yes, is RTPS header added in front of the fragment?
- If RTPS header is not added in SHMEM case, how can sample be re-assembled in DataReader side?
Thanks in advance for spending time with my questions.
Hey Dung Chao,
Data sent over the SHMEM transport can be fragmented in the same way that data sent over any other (e.g. UDPv4) transport is. So yes, if the serialised size of your sample exceeds the configured message_size_max, it will be fragmented. It is important to note that the message_size_max property is configured per transport, so if you need to modify its value, you'll have to do it specifically for SHMEM.
The short answer to questions 2 and 3 is yes, an RTPS header is attached to the fragment. Fragmented data is sent using DATA_FRAG(_X) RTPS messages.
Sam
Hi Dung,
Thank you for your feedback on the article! We appreciate it. Let me answer your questions.
--Fran
Hi Dung,
Just to complete the info that Sam and Fran shared, if you are sending larger data, you may as well use Zero Copy features to avoid serialization/deserialization when sharing data in the same device and just pass around a reference to the data.
All the best
Sara
Thanks a lot for your answer, Sam!
Thanks Fran!
As I understand from your answer, you mean that if I have, for example, 64kB for UDP message_size_max and 100 kB for SHMEM, and my application communicates both in UDP and SHMEM, it automatically chooses 64 kB for both of them even though I set 100 kB for SHMEM?
Also, if I increase the the message_size_max to avoid fragmentation, I assume that it takes more memory to ensure there is enough space for my sample, right?
Thanks Sara for your extra information!