Skip to content

RAM usage seems excessive during ".rrd" file export #4197

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
adujardin opened this issue Nov 10, 2023 · 3 comments
Closed

RAM usage seems excessive during ".rrd" file export #4197

adujardin opened this issue Nov 10, 2023 · 3 comments
Labels
🪳 bug Something isn't working 📺 re_viewer affects re_viewer itself user-request This is a pressing issue for one of our users

Comments

@adujardin
Copy link

Describe the bug
This is probably an edge case, when testing the C++ API I used it to log a pretty big amount of ptclouds. The clouds itself are fairly small but logged aggressively in multiple threads. The logging part is handled very well (nice job! 👍) and as expected it consumes a bit of RAM, in the current config of the sample, 15GB.

When trying to save the rrd file in the viewer however, the RAM usage spikes to ~50GB (maybe more but it gets hard to keep going).

Is there options or other format to save the scene that could improve this?

To Reproduce
Steps to reproduce the behavior:

  1. Run the snippet that reproduces the isolated behavior: https://github.com/adujardin/zed-rerun-io/blob/main/rerun_dummy_ptclouds/src/main.cpp
    The size and number of logged data can be reduced, the point is it seems to have a factor of ~3-4 of RAM usage between logging and exporting.
  2. In the viewer, Click on save to 'rrd' file

Expected behavior
Limited additional RAM allocation for rrd file export.

Desktop (please complete the following information):

  • OS: Ubuntu 20

Rerun version
0.10

@adujardin adujardin added 👀 needs triage This issue needs to be triaged by the Rerun team 🪳 bug Something isn't working labels Nov 10, 2023
@teh-cmc
Copy link
Member

teh-cmc commented Nov 10, 2023

That unfortunately doesn't surprise me too much 😞 the "export from viewer" feature really needs some a lot of love ASAP.

A workaround in the mean time would be to use RecordingStream::save to save your data to an .rrd file on disk first, and then load that in the Viewer (you can even split the recording into multiple files if needed).

The drawback of that method is that you will need to wait for the logging process to be done before you can load the full file in the viewer:

Another alternative would be to log simultaneously to the viewer and to a file, but we don't support that yet:

@adujardin
Copy link
Author

Got it! I understand yes. Simultaneously logging in to the viewer and a file would be great 👍

@Wumpf Wumpf added 📺 re_viewer affects re_viewer itself user-request This is a pressing issue for one of our users and removed 👀 needs triage This issue needs to be triaged by the Rerun team labels Nov 10, 2023
@teh-cmc
Copy link
Member

teh-cmc commented Oct 20, 2024

That should be fixed -- Menu > Save barely allocates nor copies these days (0.19).

@teh-cmc teh-cmc closed this as completed Oct 20, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
🪳 bug Something isn't working 📺 re_viewer affects re_viewer itself user-request This is a pressing issue for one of our users
Projects
None yet
Development

No branches or pull requests

3 participants