[Garbage Collection Urgent] GC Causes unacceptable hitches in 4.11 3rd person template project (and my actual project)

Dear Epic,

In 4.11 I was noticing hitches every 60 seconds in my project, and I ran UE4 Profiler and had flat line except oooone spot, and that one spot was a very high hitch of 38ms, and it was garbage collection!

I then created a sample 3rd person project, from the UE4 template, that is BP only.

I changed GC to run every 3 seconds.

I then ran UE4 profiler.

And, in fact, got hitches every 3 seconds.

These hitches cause a visible jump that is obvious in the 3rd person BP template project, and is even more obvious in my physics-based game.

Is there anything that can be done to avoid these hitches from GC?

I dont recall noticing this in prior engine versions, but it is certainly too acute to be ignored.

#Sample Project and Stat file

I’ve included my sample project.

  1. If you launch game stat will start
  2. press the END key to end stat collection, then end PIE

or you can simply open unreal front end and open my existing stat file which is included in my download link.

Here is the 4.11.0 launcher release version project:

#Download Link

(38mb)

www.lightningfitness.org/misc/video/GCHitch.zip

If you click the .uproject the intermediate folder will be recreated and project should open just fine.

#Please

I really need GC to not cause hitches on whatever interval I choose to run it on…

Any thoughts?

Surely this is affecting everyone if I can repro this in a template project?

I am running a computer that has very high specs, I am certain it is not my computer specs, and the proof is in the UE4 profiler log.

#Thanks!

Rama

Hello Rama,

I’ve tested the project you’ve provided (thank you for doing so), but I didn’t notice any hitch on my end. Could you provide a video of the hitch occurring in your project please so we can see what you’re referring to?

Hi there!

Sorry I forgot to include the picture that I took, the hitch being shown in a video is not the only proof, if you just look at the UE4 profiler you can visually see that GC process is actively consuming game thread and slowing down the entire game thread when it runs, as shown here:

If you show this picture in a new tab/new window you will see the hitches that are occurring every 3 seconds, it is very easy to reproduce in the project I sent you.

I sent you the project so you could run UE4 profiler yourself and see the mathematically accurate results, regardless of the visual hitch.

The issue is not just one of a visual hitch, but the fact that GC is clogging the game thread every time it activates.

All you need to do is run the game, and press the END key on keyboard when you are ready to stop profiling.

Then you can open unreal frontend and view the hitch visually in UE4 profiler, I provided link to UE4 profiler info in my original post.

The hitch is not coming up very well in my video software, I can show it happening in my own personal project if you can send me epic’ blind upload ftp server info for project. But this really is not necessary.

Please understand that this picture of this hitch on game thread is from the third person template project, you can reproduce this graph easily by doing what I asked above regarding unreal front end + UE4 profiler.

You have the best proof of all available to you, the UE4 profiler.

I am stating that even if there were no visual hitch, which gave me the clue, the fact is measured that the GC process is consuming the game thread and stalling the game thread for a moment each time it runs, as shown in my graph, please use this picture in your report to Epic engineers on the matter.

#Further

I would report this issue in exactly the same way even if there was no visual hitch, because there is still an actual game thread hitch going on, so please understand the visual proof in video form is not even relevant to my ultimate point.

#My Ultimate Point

My ultimate point is that the game thread is being stalled out and consumed by the GC process every time it runs, and this is unacceptable game performance wise, and visually obvious to me in my game.

My request is that Epic engineers look at the GC collection process and try to get it to a place where it is not causing game-thread hitches.

Please convey this request and the picture I sent you to Epic engineers so that can see the mathematical and graphed proof of this existence of this issue via UE4 profiler.

Again please note the graph is from third person template project, not my person project, it is easy to repro.

Thanks!

Rama

Hello Rama,

I have entered a bug report for this issue (UE-29304). Thank you for your report. I will provide updates on this issue as they become available.

Have a great day

Thanks for letting me know Sean!

Rama

any updates?

Here’s a link so you can take a look at its status: Unreal Engine Issues and Bug Tracker (UE-29304)