Why is garbage collection is doing this? (see logs) Build times are much slower.

What GC Logs.log (21.2 MB)
I’m confused by the repeating pattern in this output log when packaging. It didn’t do this before, but is now happening on every project (even new projects). I’m packaging for Windows with UE5.1.
Packaging times are much slower than before and the log is repeating the same set of lines over and over again. I’m confused by this and don’t know how to make sense of it.
Do I have a memory problem? What is garbage collection trying to do?
IDK. Any help appreciated, thanks.

1 Like

Thank God I found someone else with the same problem, hopefully someone will read this post and help us.

Hey there @Sputnik_3! Welcome back to the community! The GC report is supposed to happen during the process to keep memory down, however it does seem you had less then 2gbs mem free at the time so the shaders kept getting dumped which likely caused significantly worse build time. What are your PC specs like?

Hello @SaToCv1! Welcome to the community! Same question as above, may I know your specs?

Hi @SupportiveEntity

The strange thing is that this is totally new, and there doesn’t seem to be any reason for it. I’ve packaged the same project before on the same machine.
Not sure if it has anything to do with move from 5.0 to 5.1?

I have 8Gb RAM and GTX 1050i. I realise this is limited but it’s a failry simple project and had no problems before.
I’ve tried adjusting the paging file to provide more virtual memory (as much as 32GB).

At the same time, I’ve been having problems with baked lightmass not appearing in packaged projects. I can’t see how these problems are connected, unless I’ve made a change to my project settings when trying to fix issues.

I have made a fresh project with a very simple scene.
It’s the same problem with repeating GC.
Checked task manager while packaging. - 95% memory use, 2% GPU use, 35% CPU use, very little use of disk (so I’m wondering if VM pagefile is not being used).

Ahhh yes those margins are definitely a bit tight for 5.1. The packaging process can use anywhere between 1gb and 7gbs of mem at once between memory drops, so it can be a bit rough. Honestly even with 16gbs of my side rig sometimes I feel the draw pretty hard.

I think you could be correct where the virtual memory isn’t being taken into account, but I’m not that well versed in the source especially in the packaging area to be able to verify that.

Thanks for your reply.

I realise I have limited memory. It’s just strange how this has gone from no problem to a big problem overnight. A project that would previously package in 10-20 minutes seems to have gone nowehere after 3-4 hours and won’t package.

It seems like I will need to go back to using 4.27 becasue this always ran smoothly. But it’s wasted a lot of time because there’s no way to back-migrate the work I’ve done in UE5.

1 Like

Sorry to hear that! Though it’s probably best in this case due to the rise in resources necessary.