run 64 nodes , cpu utilization becomes 100%
On the ROS2(Ardent) environment , when I start 32 Publisher nodes and 32 Subscriber nodes, CPU utilization becomes 100%.
As Publisher, I use the example code from
https://github.com/ros2/examples/blob...
As Subscriber, I use the example code from
https://github.com/ros2/examples/blob...
launched as follows
test.launch
from ros2run.api import get_executable_path
def launch(launch_descriptor, argv):
ld = launch_descriptor
for loop in range(32):
ld.add_process(
cmd=[get_executable_path(package_name='examples_rclcpp_minimal_subscriber', executable_name='subscriber_member_function')],
)
ld.add_process(
cmd=[get_executable_path(package_name='examples_rclcpp_minimal_publisher', executable_name='publisher_member_function')],
)
My emviromment
Operating System : Ubuntu 16.04
DDS implementation:FastRTPS
CPU : Intel core i3 (2.4GHz)
Have you tried the same with the latest release Bouncy? Can you share your ready-to-user example to reproduce the problem?
What CPU are you running this on?
Thomas
Sorry, I haven't tried on Bouncy yet.
Publisher and Subscriber source code is downloadable from Github example .
and just launched 32 subscriber_member_functions and 32 publisher_member_function.
Allen
CPU is Intel core i3 , 2,4GHz.
Operating System : Ubuntu 16.04
DDS implementation : FastRTPS
Please provide a working snippet (copy-n-pastable) to save time for everyone who volunteers to help.
The snippet still doesn't look complete. How do you run your launch file?
Please try the same without
launch
- running all the publishers and subscribers viaros2 run
instead - to compare if the load is the same.I've already test with ros2 run, and have a same result.
I 've done as follows
ros2 run examples_rclcpp_minimal_publisher publisher_member_function &
ros2 run examples_rclcpp_minimal_subscriber subscriber_member_function&
repeat these command 32 times.