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?
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?
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.
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.
a CPU tends to have slower cores as you get more of them
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?