Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    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:
    2,456
    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 :)
     
    steril and Tetsuya_OYA like this.
  3. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,456
    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:
    2,456
    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:
    2,456
    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:
    2,456
    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:
    114
    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:
    2,456
    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:
    114
    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.
  12. steril

    steril

    Joined:
    Nov 30, 2014
    Posts:
    8
    For me, it was RenderTexture s that were causing this.
     
  13. GrahamHuws

    GrahamHuws

    Unity Technologies

    Joined:
    Mar 14, 2022
    Posts:
    20
    Just to add on this note - RenderTextures should be properly tracked as of 2023.1.0b6 and 2023.2.0a3, with the exception of Vulkan MSAA RTs (landed in 2023.2.0a6 and coming to 23.1 soon) :)
     
    nat-soragge and MartinTilo like this.
  14. krubbles

    krubbles

    Joined:
    Sep 20, 2020
    Posts:
    14
    What isn't properly tracked about render textures in older versions of unity? I'm having an issue where >3GB of memory is showing up as untracked in the Memory profiler and I'm trying to figure out how that's possible, I'm on unity 2022.2.15 w/ Mono though, but there is a section for render textures in the UI that shows their memory usage so I'm not sure what is/isn't included in that.
    Edit: I am also not using any Native Plugins
     
  15. GrahamHuws

    GrahamHuws

    Unity Technologies

    Joined:
    Mar 14, 2022
    Posts:
    20
    It'll vary depending on platform, API etc... but, hopefully you shouldn't have to worry about it: We backported the RT fixes to 2022.2.16f1, which, given how close a version you're on, should be an easy upgrade! Or at the very least, worth trying just to see how memory compares.
     
    MartinTilo likes this.
  16. dan_soqqle

    dan_soqqle

    Joined:
    Feb 2, 2022
    Posts:
    114
    i must say that my memory issues were solved from 2022 onwards. Particularly the crazy lit memory overdose.
    Currently am on 2022.1.23f1
     
    MartinTilo likes this.
  17. krubbles

    krubbles

    Joined:
    Sep 20, 2020
    Posts:
    14
    Awesome! I will try updating
     
    MartinTilo likes this.