Course contentsShow
← Unreal Engine Game Development
Lesson 801 of 88011. Performance Profiling and OptimizationFree lesson

Debugging GPU Stalls with Insights

Use the Unreal Insights GPU trace to pinpoint specific render passes that cause stalls and frame time spikes in your scene.

In this lesson, you will learn how to use Unreal Insights to pinpoint the exact render passes responsible for GPU stalls and frame time spikes.

While the CPU Profiler tells you what the game thread is doing, the GPU trace in Unreal Insights reveals what your graphics card is struggling to finish before the next VSync interval. A GPU "stall" occurs when the GPU is forced to wait for data, or when a specific rendering pass takes longer than the allotted frame budget, creating a visible "hitch."

Capturing the GPU Trace

To start, you must launch your project with the command-line argument -trace=gpu,render. Once in the editor or a standalone build, trigger the recording by pressing Ctrl + Shift + I (or using the Trace.Start console command). After reproducing the frame spike, stop the trace and open the file in the Unreal Insights application.

Identifying the Bottleneck

Inside the Insights UI, navigate to the Timing tab. Look specifically for the GPU Track. Unlike the CPU threads, this track displays blocks representing individual rendering operations like BasePass, ShadowDepth, or PostProcessing.

  1. Locate the Spike: Use the time markers to find the exact frame where the frame time exceeds your target (e.g., > 16.6ms for 60 FPS).
  2. Drill Down: Click on the blocks within that frame. You will often see nested hierarchical timings. If you see a massive block labeled RenderShadowDepth or Translucency, that is your culprit.
  3. Cross-Reference: If you find that the BasePass is taking significantly longer than usual, your scene complexity (perhaps too many draw calls or overdraw) is likely to blame.

By identifying the specific pass—for example, noticing that ShadowDepths accounts for 40% of the frame time—you can effectively prioritize your optimization efforts. Instead of guessing, you now know definitively whether you should focus on simplifying geometry, adjusting shadow distance settings, or optimizing material complexity.

Key Takeaway: The GPU trace in Unreal Insights converts opaque rendering spikes into actionable data, allowing you to isolate and target the specific render pass causing your frame-time hitches.