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
Compare ros2 pub sub cpu usage to ros2 #3
Comments
1024 x 1024 x 20Hz ROS1
Thread breakdown:
ROS2
Publishing looks about the same but subscribing is 3x.
|
30 Hz26 - 30
40 Hz36 - 40
50 Hz
Maybe what I'm seeing is just a 4-6% extra constant cpu cost in the subscriber, higher frame rates don't cause the extra cost to scale up. There is some shifting of cpu cost from publisher to subscriber also. That may be acceptable, may need to be aggressive about reducing frame rate and resolution where not needed for visualization and elsewhere, or disabling some subscribers when not needed entirely in a high frame rate system. |
Resolution2048 x 204820 Hz
40 Hz
|
Multiple subscribersIf cpu costs are shifted to subscribers in ros2, this could be bad in a 1 to many pub sub scenario. 1024 x 1024 x 40
So the cpu cost shifted from pub to sub and the extra overhead is multiplied by the number of subscribers. |
Release mode doesn't make difference, probably because the cpu usage is in ros2/rtps libraries already built (or not) in release mode. |
https://answers.ros.org/question/319218/how-does-ros2-implement-its-network-design/
[bold emphasis mine] |
/lucasw/imgui_ros#67 and https://answers.ros.org/question/312964/ros2-megapixel-image-pubsub-cpu-usage-is-very-high/
The text was updated successfully, but these errors were encountered: