Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Memory usage increases when more scenes included in a build

Discussion in 'Graphics Experimental Previews' started by Team6Developers, Mar 22, 2019.

  1. Team6Developers

    Team6Developers

    Joined:
    Nov 19, 2018
    Posts:
    12
    Hi,

    Currently I'm running into an issue where my games memory usage increases when more scenes are included in a build. For instance, a build with 4 scenes uses 900mb by default while having over 20 scenes uses almost 2GB.

    There are no objects that have references to scenes to references to other objects in other scenes.

    I've tested this by loading an empty scene while having various amounts of scenes included in the build (Not loaded, just included in the build settings).

    When debugging on PS4 (I've tested this and happens on PC, Switch & Xbox One too) I see a major memory difference in:

    Code (csharp):
    1.  
    2. GfxDeviceWorker::RunGfxDeviceWorker(void* data)
    3. GfxDeviceWorker::RunExt(ThreadedStreamBuffer& stream)
    4.   GfxDeviceWorker::RunCommand(ThreadedStreamBuffer& stream)
    5.    GfxDevice::SyncAsyncResourceUpload(AsyncFence fence, const AsyncUploadManagerSettings& settings)
    6.    ThreadedStreamBuffer::HandleOutOfBufferToReadFrom(ThreadedStreamBuffer::DataOffsets offsets)
    7.     GfxDeviceWorker::ProcessGpuProgramsDequeue(ThreadedStreamBuffer* buffer)
    Any suggestions that cause this and how it could be possibly prevented will be greatly appreciated.

    Thanks!

    EDIT:

    Im using 2018.3.6 with HDRP 4.10
     
  2. hellstorm

    hellstorm

    Joined:
    Jun 29, 2015
    Posts:
    41
    Greetings... any luck with this? we are seeing the exact same thing on PS4