You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ros2 run examples_rclcpp_minimal_subscriber subscriber_lambda
ps aux | grep subscriber_lambda
ros2 run examples_rclcpp_minimal_client client_main
ps aux | grep subscriber_lambda
Expected behavior
The memory used by the subscriber_lambda process does not change while creating an additional node that does not share any pub/sub/client/service with it.
Actual behavior
The memory used by the subscriber_lambda process increases.
Before:
RSS: 21192 VRT: 433292
After:
RSS: 21452 VRT: 498828
The increase in memory is proportional to the number of pub/sub/client/service created in the new node.
For example, slightly changing the code for examples_rclcpp_minimal_client client_main in order to create 12 clients instead of only 1 causes the following:
After:
RSS: 21720 VRT: 498828
This behavior is observed with both Fast-RTPS 1.7.0, 1.7.2 and OpenSplice (version shipped with Crystal patch3).
Note that with OpenSplice, this should not happen if nodes are run in the same process.
Moreover, creating a FastRTPS example and simulating this behavior, there is only an increase in VRT.
Feature request
It looks like the RMW is allocating some memory whenever a new end-point is discovered.
However, this aggressive approach does not scale well (especially if every node contains a ParameterServer and a ParameterClient).
For example, in Fast-RTPS v1.7.0, considering a single process application with multiple nodes.
If we have 1 node and we add a second one, the memory overhead is approximately 10Mb.
If we have 20 nodes and we add a 21st one, the memory overhead is 23Mb.
I guess that the reason for this behavior is the following scenario:
Node A publishes to topic 1.
Node B is created and discovers Node A and its publisher.
Later, Node B creates a subscriber to topic 1 and it can immediately receive messages as everything is already set-up.
The text was updated successfully, but these errors were encountered:
Bug report
Required Info:
Steps to reproduce issue
Run in different terminals
Expected behavior
The memory used by the
subscriber_lambda
process does not change while creating an additional node that does not share any pub/sub/client/service with it.Actual behavior
The memory used by the
subscriber_lambda
process increases.Before:
RSS: 21192 VRT: 433292
After:
RSS: 21452 VRT: 498828
The increase in memory is proportional to the number of pub/sub/client/service created in the new node.
For example, slightly changing the code for
examples_rclcpp_minimal_client client_main
in order to create 12 clients instead of only 1 causes the following:After:
RSS: 21720 VRT: 498828
This behavior is observed with both Fast-RTPS 1.7.0, 1.7.2 and OpenSplice (version shipped with Crystal patch3).
Note that with OpenSplice, this should not happen if nodes are run in the same process.
Moreover, creating a FastRTPS example and simulating this behavior, there is only an increase in VRT.
Feature request
It looks like the RMW is allocating some memory whenever a new end-point is discovered.
However, this aggressive approach does not scale well (especially if every node contains a ParameterServer and a ParameterClient).
For example, in Fast-RTPS v1.7.0, considering a single process application with multiple nodes.
If we have 1 node and we add a second one, the memory overhead is approximately 10Mb.
If we have 20 nodes and we add a 21st one, the memory overhead is 23Mb.
I guess that the reason for this behavior is the following scenario:
Node A publishes to topic 1.
Node B is created and discovers Node A and its publisher.
Later, Node B creates a subscriber to topic 1 and it can immediately receive messages as everything is already set-up.
The text was updated successfully, but these errors were encountered: