Build machines with different behavior during the cooking phase

Hi everyone, I continued to analyze and search for a solution to the problem for which I asked for help in this post:

[Content removed]

Running cooking on two different build machines, in one we have the problem of “Maximum number of UObjects exceeded” while in the other build machine the problem does not occur (at the end of cooking the number of elements in the UObjects array is about 16M, much less than the max allowed).

Analyzing the log of the two machines, we noticed that in the first one there are no calls of the garbage collector as it appears in the log of the second machine, such as:

LogCookCommandlet: Display: Full GC before 11830284 available 15498228 after 537768 available 26790744We also noticed that the number of indexes reused by objects (those freed by FUObjectArray::FreeUObjectIndex(…) function ), in the first machine are 275000 while in the second they are 17M.

Assuming that the source code is the same for both machines, what could be the reason for the different behavior?

P.S. the command that is launched for cooking is the same for both but we do not know the environment variables and any settings that may have been set in the first machine.

Thanks in advance,

Giuseppe

Hi Giuseppe,

There are a couple of factors that can influence the frequency of garbage collection while cooking. Some of them can be configure through settings in the inis. You can review the CookSettings in BaseEditor.ini and override those settings in DefaultEditor.ini at the project level.

The main factor that affect the frequency are the total amount of RAM and how much is free when the code decides to run the GC or not. This will be affected by a warm\cold DDC and the availability of a Shared cache when cold. This includes shaders that needs to be compiled or assets that need to be converted to the target platform format.

You can also review the DevOptions.Shaders in BaseEngine.ini. The end of the section contains a couple of commented out settings that controls the amount of Shader Compile Workers to spawn. More workers will put more pressure on the RAM which will result in more GC passes. In general, you will try to allocated 2GB per worker and want to leave room for the actual cooking process.

The settings can be set at the project level or the PC level. I’m guessing that you probably don’t have set PC level settings so I will not provide too much details on this.

Martin