Search Unity

Resolved Excessive overhead on Quest, or am I just profiling incorrectly?

Discussion in 'VR' started by carcasanchez, Dec 14, 2020.

  1. carcasanchez

    carcasanchez

    Joined:
    Jul 15, 2018
    Posts:
    177
    Hello, friends.
    In my recent works with the Oculus Quest, I have found a particular issue that is driving me a little bit crazy.
    I have been working with a simulation for some months that runs fairly smooth. Hovewer, a week or so ago, the app started crashing. I found after a quick debug that is was a RAM thing. Quest has about 4 gigas.
    It was fairly strange, since we didn't add something that were not already in the project. I spent the week adding and substracting parts of the project to see what of them spent the most ram.
    My atonishment went up were I saw the numbers.
    I debug directly in the Quest, using a development build tied to Unity profiler. With everything on scene (except the part that made the app crash), I had like 3.5 gb or so, very near to the crash limit. Every time I extracted a part of the project (which I estimate is like 40% of the scene), the ram usage got reduced by something between 0.25 and 0.5 gigas. I then added the part that made the project crash, and were something like 3.5 again.
    Then, I tried an empty scene. The empty scene were like 2.5 gigas.
    The numbers in the profiler also have similar data. It says that there are less than a gb used, but below theres a Total System Memory usage of 3.5 gb.
    upload_2020-12-14_16-19-12.png
    It is really Unity using 2.5 gb of RAM, of the 4 I have, just for existing? Is this normal? Searching on the web, I have found that overhead is usually lower.
    Again, I am not profiling in the editor, is a development build, so I expect the overhead to be lower.
    Is there any better way to see how much RAM everything uses?
     
  2. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,461
    Unity's Memory Profiler has no insight into memory allocated in native plugins yet. You might want to try profiling your Quest with Android Studio to explore the discrepancy between the 0.9GB known to Unity's Memory Manager (Used Total) and the 3.47 the memory Profiler got via an operation system query (Total System Memory Usage).

    For more details on the 0.9GB, you can use the Memory Profiler Package.