Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. The 2023.1 beta is now available for testing. To find out what's new, have a look at our 2023.1 feature highlights.
    Dismiss Notice

Detailed of "Untracked Memory"

Discussion in 'Profiler Previews' started by Tetsuya_OYA, Jan 27, 2022.

  1. Tetsuya_OYA

    Tetsuya_OYA

    Joined:
    Jul 20, 2013
    Posts:
    13
    Hello.
    As a result of memory profiling, "Untracked Memory" exceeded 60% of the total memory.
    I'd like to know the breakdown of this,
    but I can't find the explanation in the documentation.
    Could you please tell me what is included?
     

    Attached Files:

  2. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,910
    Hello,
    The information is in the list of Known Limitations:
    But the next update is going to bring that information into the window itself, to be shown when the corresponding bar is selected :)
    Also, we are working on closing tracking gaps so the list will get shorter but that will depend on the base Editor version and not the package.

    We will update the package documentation accordingly but that will only affect the latest versions of the documentation so the best source for this information is always going to be the documentation for the latest version of the package :)
     
    Tetsuya_OYA likes this.
  3. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,910
    Also, you have a snapshot there that suffers from a bug in the managed crawler in the package, which is why the Managed Object memory size is Unknown. That should be fixed with the next update.

    That also likely explains why System.Object is claiming to take up 3 GB
    If the next update does not fix this, please report a bug. We only need the snapshot to reproduce this, no project :)
     
    Last edited: Jan 27, 2022
    Tetsuya_OYA likes this.
  4. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,910
    Actually... The bugs I fixed were around string memory parsing causing some overflow. I'm not certain that the issue seen in your screenshot is fixed with that.

    Could you please file a bug report via the Editor's menu bar: Help > Report a Bug?
    I don't need the project, just the snapshot and the Issue ID that you should get from the response email.
    With that I can make sure this is fixed asap, either with the next release or a quick follow up release.
     
    Tetsuya_OYA likes this.
  5. bran76765

    bran76765

    Joined:
    Jul 14, 2018
    Posts:
    26
    Hi, when you say "It's going to be brought into the window itself" do you mean just that that list will let the user know what "Untracked memory" consists of or do you mean that we'll see specifics such as:

    20% Native Plugin Allocations
    20% Size of DLL's
    40% IL2CPP
    etc...

    Like how specific are we talking here? Because I've also begun to run into the OP's problem and if it's super vague in the next update, that's not going to be very helpful.
     
  6. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,910
    The update, 0.5.0-preview.1, which is now released just brings the description to the UI.

    Reducing this category by filling the blank spaces with info will happen gradually and with updates to the base Unity Editor and Player, not via a package update.

    Getting data for IL2CPP Virtual Machine memory is in the works for 2022.2. I'm unsure if that will be backported.

    Allowing Plugins to register their memory via Unity's Memory manager is in the works too. Once that's implemented, it will depend on plug-in creators to actually use that API or their memory will remain untracked.

    Size of DLLs for all platforms is also in the works.

    Until this work is done and shipped, the only thing you can do to see more about these is to use native platform specific profilers.
     
  7. darktemplar216

    darktemplar216

    Joined:
    Dec 30, 2013
    Posts:
    8
    @MartinTilo Hi bro. One more question. How do Unity Catergorize the memory alloc with "kMemTempAlloc". I mean it's temporary of course, but it can results in enlarge the overall memory consumption. So how do unity visualize them in profiler?

    Other Native Memory (In use / Reserved)
    or
    Untracked Memory

    thx
     
  8. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,910
    Every allocation made with Unity's allocators is practically per definition tracked. So this would show up under other. It should be listed in a bit more detail in the All Of Memory tables in the 1.0 version, but for temp memory I think it only shows the Temp Allocator size.
     
  9. dan_soqqle

    dan_soqqle

    Joined:
    Feb 2, 2022
    Posts:
    82
    Hi @MartinTilo .

    Kind of on that note, i'm pretty much facing a memory issue and i'm trying to get to the bottom of what might be triggering it. On my main project i'm having a problem where my lit.shader increases with RAM as soon as a scene is added into addressables. Even if the scene is not loaded.

    I am trying to reproduce it on a new project, and although i am unable to see the similar behavior on the lit shader i am seeing memory that i'm unable to identify as soon as i add a scene into the addressables.

    Here is a screenshot. It says that 278 MB is tracked. But in the breakdown only 104.9 is seen. Am i misunderstanding the tool? Thanks! This is fairly easy to replicate as i already have a reproducible repository. And its only just 1 scene with some fbxes and materials.

    It's on unity 2022.1.23f1. *edit that my memory profiler is only 0.7 because my unity is not 2022.2 yet, let me update asap and update again if there is any difference.

    upload_2022-11-23_16-4-1.png
     
    Last edited: Nov 23, 2022
  10. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,910
    That's the Unity Objects Breakdown which is a filtered view showing only the memory used for types inheriting from UnityEngine.Object.

    You can open the Objects and Allocations page or load that snapshot into the memory Profiler in an empty project using Unity 2022.2 and the 1.0 of the package and explore the All Off Memory page to see all of that memory usage.

    Also there are ongoing efforts to reduce the impact of shader variants and having an explosion of shader variants duplicated into memory when shaders are included in multiple Asset Bundles. There's other threads in the forums with details and updates on that.
     
  11. dan_soqqle

    dan_soqqle

    Joined:
    Feb 2, 2022
    Posts:
    82
    thanks i saw that there are posts on the variable shaders loading and things like that but somehow hasn't been fully working when i tried it. For now.. i'm kind of staying away from URP-Lit which is mostly the crazy one . . . but either way, my models seems to be picking up urp-interactive-autodesk which dosen't seem to go nuts for the moment.. but closely monitoring.
     
    MartinTilo likes this.