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

Updating performance writer #570

Merged
merged 6 commits into from
Dec 16, 2020
Merged

Conversation

adamdbrw
Copy link
Collaborator

@adamdbrw adamdbrw commented Nov 24, 2020

This is still the "clunky" script. While the refactoring of performance writer is scheduled, this PR contains several important updates that make the performance benchmarking packages usable with recent changes:

  • uses --storage-config-file option with two examples (optimized and non-optimized). This enables testing of other pragma settings easily at will.
  • message lost statistic is now read from metadata yaml file. This is more correct and also makes performance benchmarking ready for cache double-buffers PR 546.
  • removed performance-affecting outputs (writing '.' and 'X' on writes and misses affected performance, especially with multiple instances & lots of small messages).
  • supports bag splitting in benchmarking by exposing max_bagfile_size parameter to the script.

This PR does not replace the necessary work to be done in performance packages (replacing the script with launch files, expanding parametrization), but still serves as a strict upgrade over the current state. Some of these changes should have been a part of earlier PRs.

- utilizes --storage-config-file with two examples
- message reading from metadata yaml file (ready for cache double-buffers PR 546)
- removed performance-affecting outputs
- supports bag splitting in benchmarking

Signed-off-by: Adam Dabrowski <[email protected]>
@adamdbrw adamdbrw requested a review from a team as a code owner November 24, 2020 15:17
@adamdbrw adamdbrw requested review from emersonknapp and Karsten1987 and removed request for a team November 24, 2020 15:17
@adamdbrw
Copy link
Collaborator Author

@mjeronimo this PR has some updates to benchmarking, could you take a look?

Copy link

@mjeronimo mjeronimo left a comment

Choose a reason for hiding this comment

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

Looks good to me. One minor grammatical mistake/typo.

@adamdbrw
Copy link
Collaborator Author

@mjeronimo shall we run CI and merge this if all turns out OK?

@mjeronimo
Copy link

mjeronimo commented Nov 30, 2020

Yes. Launched the CI:

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

@mjeronimo
Copy link

Restart the MacOS build: Build Status

@pijaro
Copy link
Collaborator

pijaro commented Dec 1, 2020

I've changed how yaml is included in writer_benchmark.cpp for Windows. We can rerun windows CI now and see if everything is compiling fine.

@mjeronimo
Copy link

mjeronimo commented Dec 1, 2020

Restarted the Windows build: Build Status

All warnings are present in the nightly build for Windows.

@mjeronimo
Copy link

Background information on the pragmas added:

The class YAML::Node is exported in a DLL, but includes std C++ objects in its interface, such as:
const std::string& Scalar() const;

@mjeronimo
Copy link

Re-ran the CI since there was a code change:

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

The Windows build has the expected unrelated warnings.

@mjeronimo
Copy link

@emersonknapp Any comments before merging?

@adamdbrw
Copy link
Collaborator Author

adamdbrw commented Dec 7, 2020

@emersonknapp should we proceed to merge? (after resolving the conflict)

Copy link
Collaborator

@emersonknapp emersonknapp left a comment

Choose a reason for hiding this comment

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

Yes, this LGTM after conflict resolution and green CI (the windows warnings are fixed now)

@adamdbrw adamdbrw force-pushed the performance_writer_benchmarking_update branch from 82d4f1b to 95f1351 Compare December 14, 2020 12:17
@adamdbrw
Copy link
Collaborator Author

The conflicting commit, Compress bag files in separate threads, actually introduced some errors in rosbag2_performance_writer_benchmarking:

  1. The benchmarking script was broken for empty (default) value of compression_format
  2. The writer_ variable was incorrectly overwritten, see here

I have corrected these errors, however this also means that compression was likely not tested with the performance packages. @emersonknapp, @pjreed.

This fact is not blocking this PR AFAIK.

@pjreed
Copy link
Contributor

pjreed commented Dec 14, 2020

Good catch. I think that issue with the variable being overwritten was probably introduced as a result of merging to fix conflicts, as I'm pretty sure when I was doing performance testing that I observed compression running. Anyway, this change looks good to me.

@mjeronimo
Copy link

mjeronimo commented Dec 14, 2020

Re-runing CI after latest change

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

A couple items to fix: A new warning to fix in MacOS and an issue with the Windows build

@adamdbrw
Copy link
Collaborator Author

adamdbrw commented Dec 15, 2020

The warning on MacOS is concerned with an unused private member that was added in #506 - and should have been causing warnings before - I don't know why this happens only now, perhaps a compiler update or some settings changed? Anyway, an easy fix (see this line).

The windows fail is the usual Yaml stuff - should have known by now. Please note that the benchmarking package is not yet that usable on windows - the main utility script is not portable.

@mjeronimo could we restart the CI and merge if it passes without issues?

@mjeronimo
Copy link

mjeronimo commented Dec 15, 2020

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

Restart the macOS build
Build Status

@mjeronimo mjeronimo merged commit 0bb6ab8 into master Dec 16, 2020
@delete-merged-branch delete-merged-branch bot deleted the performance_writer_benchmarking_update branch December 16, 2020 00:04
emersonknapp pushed a commit that referenced this pull request Feb 2, 2021
* Updating performance writer
- utilizes --storage-config-file with two examples
- message reading from metadata yaml file (ready for cache double-buffers PR 546)
- removed performance-affecting outputs
- supports bag splitting in benchmarking

Signed-off-by: Adam Dabrowski <[email protected]>

* typo fix

Signed-off-by: Adam Dabrowski <[email protected]>

* corrected compression so that it doesn't break the command line in case it is empty (the default)

Signed-off-by: Adam Dabrowski <[email protected]>

* address CI warns/fails on MacOS and Windows

Signed-off-by: Adam Dabrowski <[email protected]>
emersonknapp pushed a commit that referenced this pull request Feb 17, 2021
* Updating performance writer
- utilizes --storage-config-file with two examples
- message reading from metadata yaml file (ready for cache double-buffers PR 546)
- removed performance-affecting outputs
- supports bag splitting in benchmarking

Signed-off-by: Adam Dabrowski <[email protected]>

* typo fix

Signed-off-by: Adam Dabrowski <[email protected]>

* corrected compression so that it doesn't break the command line in case it is empty (the default)

Signed-off-by: Adam Dabrowski <[email protected]>

* address CI warns/fails on MacOS and Windows

Signed-off-by: Adam Dabrowski <[email protected]>
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.

5 participants