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

Improvements to memory measurements and reporting #2069

Merged
merged 9 commits into from
May 10, 2023

Conversation

teh-cmc
Copy link
Member

@teh-cmc teh-cmc commented May 9, 2023

Fixes #2041

AccountingAllocator available:
image

Fallback to RSS:
image

Fallback to placeholder:
image

@teh-cmc teh-cmc added ui concerns graphical user interface 🧑‍💻 dev experience developer experience (excluding CI) labels May 9, 2023
crates/re_viewer/src/app.rs Outdated Show resolved Hide resolved
@@ -1366,6 +1366,37 @@ fn memory_use_label_ui(ui: &mut egui::Ui, gpu_resource_stats: &WgpuResourcePoolS
format_number(gpu_resource_stats.num_textures),
format_number(gpu_resource_stats.num_buffers),
));
} else {
Copy link
Member

Choose a reason for hiding this comment

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

We should also consider adding a fallback on the RSS, as found by bytes_resident() in crates/re_memory/src/memory_use.rs. Then we would never need to suggest the AccountingAllocator

Copy link
Member

Choose a reason for hiding this comment

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

Btw, Arc-blroth/memory-stats#2 is fixed, so we should be able to get the RSS on Linux too (please check!)

Copy link
Member Author

@teh-cmc teh-cmc May 9, 2023

Choose a reason for hiding this comment

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

We now have fallbacks for all cases; but I still recommend setting up an AccountingAllocator because RSS is, as always, completely off the mark

@teh-cmc teh-cmc changed the title Guide users towards AccountingAllocator Improvements to memory measurements and reporting May 9, 2023
crates/re_viewer/src/app.rs Outdated Show resolved Hide resolved
crates/re_viewer/src/app.rs Outdated Show resolved Hide resolved
crates/re_viewer/src/app.rs Outdated Show resolved Hide resolved
@teh-cmc teh-cmc merged commit 6fffd19 into main May 10, 2023
@teh-cmc teh-cmc deleted the cmc/memory_debug_when_in_debug branch May 10, 2023 07:50
jprochazk pushed a commit that referenced this pull request May 11, 2023
* guide users towards AccountingAllocator

* web support

* Update crates/re_viewer/src/app.rs

Co-authored-by: Emil Ernerfeldt <[email protected]>

* update memory-stats to 1.1 and always use statm

* improvements, fallbacks and all sorts of fun

* Update crates/re_viewer/src/app.rs

Co-authored-by: Emil Ernerfeldt <[email protected]>

* Update crates/re_viewer/src/app.rs

Co-authored-by: Emil Ernerfeldt <[email protected]>

* Update crates/re_viewer/src/app.rs

Co-authored-by: Emil Ernerfeldt <[email protected]>

* typo in suggestion

---------

Co-authored-by: Emil Ernerfeldt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧑‍💻 dev experience developer experience (excluding CI) ui concerns graphical user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Memory debug metrics are missing when starting viewer via Rust SDK
2 participants