Welcome to the discussion thread for the UI changes to the Memory Profiler Module (i.e. not the package but the UI in the Profiler Window). You can use this thread to ask for help, share feedback, and have discussions about the Memory Profiler Module.
Introduction
The Memory Profiler module has a Simple and a Detailed view. The Detailed view is unaffected by this change as the Detailed view is in “Maintenance” Mode (*1) as we focus on the Memory Profiler Package. From the work of an upcoming overhaul and UI and Usability improvements for this package, we’ve now brought some of those back into the Memory Module.
Specifically, the previous text version of displaying the high-level memory stats was a cause for confusion in the past, with uncertainties around the question of how these numbers relate to each other, whether there is any overlap or double counting going on, which “Total” number to trust in and how this relates to what the Task Manager or External Profilers report. Additionally, these numbers where not reflected in the Memory Profiler Package, making it harder to draw at a glance connections between what those two tools are showing.
What changed?
While you’ll have to be a bit more patient on the package side of this change, as of 2021.2.0a19 the Memory Profiler Module changes have landed. It takes the previously shown counters in a clearer way with only minor changes:
-
“(Total) System Used Memory” → The “Total” amount of the bar. This number is based on the best fitting number (*2) the specific platforms Operating System can give us, or the sum of all tracked memory where the OS doesn’t (mostly just the case when looking at data of older Unity versions as all platforms should be covered)
-
“Unity” → “Other”
-
There is no clear line as to where Engine internal resources end and User resources begin, so “Unity” was a bit misleading to begin with, which is why newer versions already didn’t track it explicitly
-
This does not map to “Other” in the Details view, it’s just the remainder of what Unity’s Memory Management System is tracking minus all other categories.
-
To get more information on the makeup of this or the other categories, take a snapshot in the Detailed view or with the Memory Profiler package.
-
Total Committed Memory
-
This bar clarifies how much Memory Unity’s Memory Manager is tracking (under high-level counters) and how much it just can’t quantify but the OS told us we’re using.
-
Some examples of untracked memory are: memory allocated through native plugins or some drivers, Mono or IL2CPP Type Metadata or for the executable code and DLLs. The Memory Profiler package might have some more information on some of these untracked amounts, but where it doesn’t, a native platform provider may be able to shed more light on the untracked amount of memory.
-
We are working towards closing that instrumentation gap down
New UI:
Previous UI:
Some other notes:
Not all memory systems use pools or differentiate between used and reserved memory. Those that do, show two numbers, the used and the reserved amount of memory. If the used amount does not share the same Unit (B, MB, GB) as the reserved amount, it will be displayed, otherwise it is omitted.
Texture and Mesh memory does not map 1-to-1 to Graphics & Graphics Driver memory as some of that memory might also fall into the “Other” category of the Total Memory Breakdown bar.
The Normalized Toggle defines whether the bars should be fitted to the memory usage of just this frame, or if they should be shown in comparison to the maximally used memory within the shown frame range. This option is there to help you see how the total or the relative amounts change frame over frame.
Resources
- Memory Profiler Module Documentation (Update Pending)
- Memory Profiler Package
Feedback
Please feel free to post any related feedback or questions in this thread.
How to report bugs
Please report bugs through Unity’s built-in bug reporter tool, located in “Help/Report a Bug…”. Once you have submitted a bug report through the bug reporter, please feel free to start a discussion about it in this thread.
(*1) While fixes and improvements to the data reporting back end of the Memory Profiler also affect the data shown in the Details view, the UI side is in maintenance mode, as our focus lies on replacing all workflows it offers with the Memory Profiler Package (with a possible re-convergence in the same place UI wise down the line)
(*2) There may be a slightly more accurate version available, e.g. on Android, but querying that might come at too steep a cost (e.g. >300ms on Android) to ask for it every frame but for most intents and purposes, this should be accurate enough.