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

rosbag2_storage: set MCAP as default plugin #1160

Merged
merged 2 commits into from
Dec 22, 2022

Conversation

james-rms
Copy link
Contributor

@james-rms james-rms commented Nov 14, 2022

switches the default storage plugin from sqlite3 to mcap.

Reason for change

Benchmarks suggest that MCAP can support higher write throughput than the sqlite3 plugin in its default configuration, while also bringing the following other benefits:

  • Append-only write behavior ensures that only the last few messages written can be corrupted in the case of a power outage or recorder crash. This is similar to the corruption guarantees offered by SQLite3 in WAL mode, which is what is used in the resilient SQLite storage plugin preset.
  • Ability to enable chunk compression, which should be more space-efficient than message compression for bags with many small messages. This also enables reader to use the message index, unlike file-level compression.
  • Record message schemas to the bag by default, enabling applications outside the ROS 2 workspace to read message content.

Benchmarks

Read the benchmarking analysis that lead to this conclusion here.

rosbag2_performance_benchmarking

There is a set of pre-existing benchmarks in the rosbag2 repo here: https://github.com/ros2/rosbag2/tree/rolling/rosbag2_performance/rosbag2_performance_benchmarking

We've run these in an attempt to compare the performance of MCAP against SQLite on these metrics, but at this point the results appear to be pure noise. A full analysis of why will be published to mcap.dev shortly, but for now the news is that we have not succeeded in producing a statistically significant difference in results between MCAP and SQLite.

TODO

@emersonknapp emersonknapp self-assigned this Nov 22, 2022
@ros-discourse
Copy link

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

https://discourse.ros.org/t/psa-default-ros-2-bag-storage-format-is-changing-to-mcap-in-iron/28489/1

@james-rms james-rms force-pushed the mcap-default-plugin branch 6 times, most recently from f7d369b to de0f8ae Compare November 30, 2022 21:45
@james-rms james-rms marked this pull request as ready for review December 13, 2022 04:05
@james-rms james-rms requested a review from a team as a code owner December 13, 2022 04:05
@james-rms james-rms requested review from gbiggs and jhdcs and removed request for a team December 13, 2022 04:05
@james-rms james-rms changed the title [DRAFT] 🚧 rosbag2_storage: set MCAP as default plugin rosbag2_storage: set MCAP as default plugin Dec 13, 2022
@MichaelOrlov
Copy link
Contributor

@james-rms Am I understand correctly that we have not yet finished with adding MCAP to the rosbag2_tests parametrization?
i.e. not ready yet to switch to the MCAP by default.

@james-rms
Copy link
Contributor Author

Yes - will convert to draft until that lands.

@james-rms james-rms marked this pull request as draft December 16, 2022 03:47
@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-2022-12-15/28840/1

Signed-off-by: James Smith <james@foxglove.dev>
Signed-off-by: James Smith <james@foxglove.dev>
@james-rms james-rms marked this pull request as ready for review December 21, 2022 21:03
@james-rms
Copy link
Contributor Author

Gist: https://gist.githubusercontent.com/james-rms/c4e9cba9397445f51066232f1068771d/raw/9eddb125272e274d3128068668a045b681f124fc/ros2.repos
BUILD args: --packages-above-and-dependencies ros2bag rosbag2_cpp rosbag2_py rosbag2_storage rosbag2_storage_default_plugins rosbag2_tests rosbag2_transport
TEST args: --packages-above ros2bag rosbag2_cpp rosbag2_py rosbag2_storage rosbag2_storage_default_plugins rosbag2_tests rosbag2_transport
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/11309

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

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.

Blessing. 🤞

@james-rms james-rms merged commit c488567 into ros2:rolling Dec 22, 2022
@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-01-19/29423/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.

6 participants