Download

How to increase number of Shader Compile Workers spawned by Unreal?

I’m building Showdown VR demo on PS4. Everytime I took a new build it always take me half an hour to rebuild all shaders. My CPU is i7 4 cores, it seems Unreal only spawned 4 instances of Shader Compile Worker(which should be 8 for maxium efficiency). Is there a way to make Unreal spawn more compile workers? Thank you.

There’s also another question here:

https://answers.unrealengine.com/questions/159434/increasing-the-number-of-shader-compiler-workers.html

BTW, any solution including modify source code is welcomed :slight_smile:

I would like to know this as well. I see 4 or 5 shader compiler workers on my 72 core rig. Most of unreal seems to be using up to 8 threads. My machine rarely uses more than 20% CPU with this engine regardless of what I’m working on. There must be a way to increase the cores utilized.

I found the solution.

In:

Engine\Config\BaseEngine.ini

Search for “NumUnusedShaderCompilingThreads=3”

and modify the integer.

I set it to 36. This is the number of physical cores. For some reason ATM if I set it higher it will default back to 3.

Glad I found this thread, I had this problem with a six core processor. The solution you found does the job. Except I set the “NumUnusedShaderCompilingThreads” to just 1, which gets me 5 compiler workers and leaving 1 core for everything else. Keeping the cpu busy at 98%.

So it seems odd that you raised the number to 36 to get more compiler workers. You may want to try disabling hyperthreading for more focus on physical cores to make it less idle.