Skip to content
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

Use thread pool to run benchmark publishers in rosbag2_performance_benchmarking #1250

Merged
merged 11 commits into from Feb 28, 2023

Conversation

carlossvg
Copy link
Contributor

@carlossvg carlossvg commented Feb 27, 2023

Follow-up from: #1171 (comment)
Related to: #688

Depends on #1153

This PR changes benchmark_publishers to use a thread pool instead of running each publisher in separate threads. The motivation for this change is to overcome a limitation on the number of threads imposed by Cyclone DDS (limited to 128 threads).

carlossvg and others added 11 commits February 27, 2023 09:04
Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai>
Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai>
…marking (ros2#1242)

Signed-off-by: Shane Loretz <sloretz@google.com>
Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai>
…osbag2_performance_benchmarking/config_utils.hpp

Co-authored-by: Michael Orlov <morlovmr@gmail.com>
Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai>
…osbag2_performance_benchmarking/thread_pool.hpp

Co-authored-by: Michael Orlov <morlovmr@gmail.com>
Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai>
…mark_publishers.cpp

Co-authored-by: Michael Orlov <morlovmr@gmail.com>
Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai>
…osbag2_performance_benchmarking/thread_pool.hpp

Co-authored-by: Michael Orlov <morlovmr@gmail.com>
Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai>
…osbag2_performance_benchmarking/thread_pool.hpp

Co-authored-by: Michael Orlov <morlovmr@gmail.com>
Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai>
Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai>
Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai>
Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai>
@carlossvg carlossvg requested a review from a team as a code owner February 27, 2023 08:10
@carlossvg carlossvg requested review from emersonknapp and jhdcs and removed request for a team February 27, 2023 08:10
@MichaelOrlov MichaelOrlov changed the title Add thread pool Use thread pool to run benchmark publishers in rosbag2_performance_benchmarking Feb 28, 2023
Copy link
Contributor

@MichaelOrlov MichaelOrlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@carlossvg LGTM. Thanks for restoring PR.

@MichaelOrlov
Copy link
Contributor

@ros-pull-request-builder retest this please

@MichaelOrlov
Copy link
Contributor

Gist: https://gist.githubusercontent.com/MichaelOrlov/ca15d2faeb4b9e50d96c0c663ec65a96/raw/6a833de131f461ffff0171ab0b8a2a5490362943/ros2.repos
BUILD args: --packages-above-and-dependencies rosbag2_performance_benchmarking --cmake-args -DB U I L D _ R O S B A G 2 _ B E N C H M A R K S = 1
TEST args: --packages-above rosbag2_performance_benchmarking
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/11510

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

@MichaelOrlov
Copy link
Contributor

Gist: https://gist.githubusercontent.com/MichaelOrlov/6b0258febb43edc9f0e760e6ab243c68/raw/6a833de131f461ffff0171ab0b8a2a5490362943/ros2.repos
BUILD args: --packages-above-and-dependencies rosbag2_performance_benchmarking --cmake-args -DBUILD_ROSBAG2_BENCHMARKS=1
TEST args: --packages-above rosbag2_performance_benchmarking
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/11511

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

@MichaelOrlov
Copy link
Contributor

Gist: https://gist.githubusercontent.com/MichaelOrlov/6b0258febb43edc9f0e760e6ab243c68/raw/6a833de131f461ffff0171ab0b8a2a5490362943/ros2.repos
BUILD args: --packages-above-and-dependencies rosbag2_performance_benchmarking --cmake-args -DBUILD_ROSBAG2_BENCHMARKS=1
TEST args: --packages-above rosbag2_performance_benchmarking
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/11512

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

@MichaelOrlov MichaelOrlov merged commit 6160bb3 into ros2:rolling Feb 28, 2023
@ros-discourse
Copy link

This pull request has been mentioned on ROS Discourse. There might be relevant details there:

https://discourse.ros.org/t/ros-2-tsc-meeting-minutes-2023-03-16/30432/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants