Skip to content

Commit

Permalink
Refs #20493: Add troubleshooting and SHM segment size info
Browse files Browse the repository at this point in the history
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
  • Loading branch information
cferreiragonz committed Feb 29, 2024
1 parent abfd2e1 commit c475bad
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
4 changes: 4 additions & 0 deletions docs/fastdds/troubleshooting/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,9 @@ issues.
:start-after: //LARGE_DATA_BUILTIN_TRANSPORTS
:end-before: //!

* Problems with transmitting **large samples** when using the ``LARGE_DATA`` mode? Try to use the builtin transports
configuration options to adjust ``LARGE_DATA`` to your specific use case. Please refer to
:ref:`use-case-large-data-options` for more information.

* Problems with transmitting **large samples such as video or point clouds**? Please refer to
:ref:`use-case-largeData`.
20 changes: 17 additions & 3 deletions docs/fastdds/use_cases/tcp/tcp_large_data_with_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@ As it has been observed in :ref:`use-case-tcp-multicast`, ``LARGE_DATA`` builtin
and efficient way to improve performance when working with large data. Nonetheless, custom configuration can help
to enhance the performance even further.

The ``LARGE_DATA`` mode can be configured by adjusting the following parameters:
Fast DDS provides configuration options to adjust the behavior of the builtin transports. This becomes particularly
relevant when using the ``LARGE_DATA`` mode, as it enables increasing the maximum message size beyond 65500 KB and
prevents fragmentation, leveraging the TCP and SHM transports.

All builtin transports can be configured by adjusting the following parameters:

+ ``max_msg_size``: Maximum size of the message that can be sent over the transport. Sending messages larger
than this size will result in fragmentation. Its maximum value is 2^32-1.
than this size will result in fragmentation. Its maximum value is 2^32-1 for TCP and SHM and 65500 KB for UDP.
+ ``sockets_size``: Size of the send and receive socket buffers. This value must be higher or equal than the
``max_msg_size`` to obtain a valid configuration. Its maximum value is 2^64-1.
``max_msg_size`` to obtain a valid configuration. Its maximum value is 2^32-1.
+ ``non_blocking``: If set to true, the transport will use non-blocking sockets. This can be useful to avoid
blocking the application if the socket buffers are full. However, some messages will be lost. Its default value is
false.
Expand All @@ -26,6 +30,11 @@ way, it is possible to take advantage of the TCP transport to avoid fragmentatio
avoid blocking the application when the socket buffers are full. This configuration can be used, for example, when
streaming video, which will result in a significant increase in fluidity.

Note than even when using the ``LARGE_DATA`` mode within the same machine, the configuration options
can prove useful for improving performance, as they affect the SHM transport. It is highly recommended to set
a shared memory segment size large enough to accommodate the data to be sent. To achieve this, the ``sockets_size``
parameter must be set to a value at least half of the message size.

The following snippets show how to configure the ``LARGE_DATA`` mode:

.. tabs::
Expand Down Expand Up @@ -57,3 +66,8 @@ The following snippets show how to configure the ``LARGE_DATA`` mode:
To learn how to check and modify the default maximum system value for the socket buffers size, please refer to
:ref:`finding-out-maximum-socket-values`.

.. warning::

Setting a ``max_msg_size`` value higher than 65500 KB with the ``DEFAULT`` or ``UDP`` modes will result in an error
and the participant creation will fail.

0 comments on commit c475bad

Please sign in to comment.