Search Unity

Unity using too much cpu on 2990wx

Discussion in 'General Discussion' started by jh10001, Apr 19, 2019.

Thread Status:
Not open for further replies.
  1. jh10001

    jh10001

    Joined:
    Jun 1, 2018
    Posts:
    7
    I sent this post a while ago.
    https://forum.unity.com/threads/unity-cpu-usage-too-high-on-2990wx.653374/

    Recently I have been trying to solve this problem. I found that Unity always creates 64 Job Worker threads, 16 Background Job threads and 32 EnlightenWorker threads, which is obviously too much. But I haven't found a way to control the number of these threads except Enlighten threads.

    Is there any way to control the number of these threads?
     
  2. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,203
    You bought an AMD Threadripper and now you don't want one of the most demanding game development tasks to take full advantage of it? :p

    Edit: I added a post to the other thread you mentioned pointing out that this processor is not ideal for most of the tasks you want. That said it's very much ideal for this one. Lightmap baking should be using every core you have.
     
    Last edited: Apr 19, 2019
    Murgilod and Joe-Censored like this.
  3. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    In what way is that number of threads "obviously too much" for a 32 core CPU to handle? It isn't obvious to me.

    I'm not aware of a means of manually controlling the number of these other threads.
     
    Last edited: Apr 19, 2019
  4. Zuntatos

    Zuntatos

    Joined:
    Nov 18, 2012
    Posts:
    612
    I assume the problem here is
    1) thread scaling isn't perfectly linear with cores. There's often some thread contention in dequeueing/enqueuing tasks/results from a central place or some shared resource that requires locking.
    2) a CPU tends to have slower cores as you get more of them
    3) some work is not spread over threads

    In combination with 1) and 2) this may mean negative scaling when adding more than N threads, where N varies between games and processors.

    I assume it's not really viable to make a method that automatically scales unity thread counts for every unity game to the perfect thread count as thread load, core count, core performance all vary wildly.

    Is the FPS actually a problem though? Or is it the difference between say 100 and 200 fps?
     
    Joe-Censored likes this.
  5. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    9,052
    Dupe. Use other thread, it is in the proper forum.
     
Thread Status:
Not open for further replies.