Search Unity

Editor take 100% cpu usage and over 8GB of memory usage for almost 20-25 minutes. Why ?

Discussion in 'Editor & General Support' started by DubiDuboni, Sep 17, 2019.

  1. DubiDuboni

    DubiDuboni

    Joined:
    Feb 5, 2019
    Posts:
    131
    I have two scenes but the game is not running.
    And it keep in the task bar keep loading or running stuff nonstop I see the green bar in the Task Bar in the unity box keep loading nonstop like running/loading stuff.

    I don't understand it.



    And this is the Task Manager : The unity editor take 95% of the cpu usage sometimes more : And I see now that it's taking over 8GB of memory usage ?



    And it keep doing it also now nonsotp. I have 32GB memory.

    I found that when I'm unloading one of the scenes the cpu usage is back to normal. Also the memory usage.
    But I can't figure out what cause in the scene to make the cpu and memory usage to be so high.

    Screenshot of the profiler while both scenes loaded :
    I don't understand what and how to read in the profiler that can tell me where and what is the problem/s :

     
    Last edited: Sep 17, 2019
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,780
    I suspect you have some third party asset, which is active in edit mode. And there is some form of info it loop, which creates lots of data.

    What if you disable one, or other scene?
     
    DubiDuboni likes this.
  3. DubiDuboni

    DubiDuboni

    Joined:
    Feb 5, 2019
    Posts:
    131
    If I remove/unload one of the scenes the memory usage down from 12-13GB usage to 5Gb and the cpu usage down from 100% to 12-14%.

    So I know what scene make the problem but not what in the scene and there are many objects in the scene.
    I tried to turn on/off the parents one by one but it didn't help.

    I do have in the editor folder in the assets some editor scripts. Maybe I should try to copy them delete them for testing and see if one of them is making the problem ?
     
  4. DubiDuboni

    DubiDuboni

    Joined:
    Feb 5, 2019
    Posts:
    131
    Solved : I disabled in the Lightning settings the auto generating.

    Sub question : Is it logic that the editor take in idle 5-6GB of memory usage ? When the problem was on before it took 12GB of memory usage now 5-6.
     
    Joe-Censored likes this.
  5. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,780
    I don't know which asset, or script you are using. So anything beyond is just guess.
    But there could some bug, which either infinitely looped, or, you had so many objects in a scene, that the scrip was generating lights for all of them, or whatever something else. Maybe there was baking involved as well. I don't know.

    Disabling / removing scripts would be recommended way, to find, which exactly is causing issue.
    Btw, in profiler, you may be able to see actually, what takes most of CPU / RAM?
    You can change Timeline to Hierarchy.
     
  6. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Yep, I was going to suggest that GI burning so much CPU sounds like lightmap baking. When that occurs you should see the progress bar in the bottom right corner of the editor. I wish this was the default, but I understand that without auto-generate enabled then baked lightmaps wouldn't "just work" for novices new to Unity who haven't had a chance yet to learn about this functionality.
     
  7. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,205
    Yes. We recommend developers have at least 16GB RAM for a reason. Game development is not a task that is light on the resources of your computer.

    And lightmapping is one of the heaviest tasks of all. Having a powerful processor (or graphics card for the GPU-based lightmapper) in addition to all of that memory is highly recommended if you're going to depend on baked lighting.
     
    Joe-Censored likes this.
  8. SkepticDude

    SkepticDude

    Joined:
    Jul 13, 2020
    Posts:
    7
    In my case, it is reverse, I am using MX linux 19.2 and Ram usage stays almost 100% and CPU stays near 30%.
    I am using Ryzen 3500U Mobile processor with inbuilt GPU Vega 8 and 8gb dual channel ram with 3gb swap.
    also swapiness=15.
    And facing Unity FPS drop.
    Any suggestions please?