Shader Complilation on PC: About to become a bigger bottleneck?

Krteq

Newcomer
This is working with Steam on Linux. They are also using incremental updates for pre-compiled shader caches
 

BRiT

(>• •)>⌐■-■ (⌐■-■)
Moderator
Legend
Supporter
Well it certainly doesn't help when it's the drivers causing PC Spikes after exiting a game, which could lead to issues on the next game loaded. So you need to reboot after every single gaming session until the fix is released.


Nvidia acknowledges CPU usage spikes in GeForce driver 531.18​

Rebooting the PC or rolling back the driver can mitigate the issue until Nvidia releases its hotfix​


Some users reported noticing CPU usage increased by up to 15 percent after closing out of a game. Checking the Process tab revealed that the Nvidia Container was the culprit. To be more precise, the latest version of the Nvidia Game Session Telemetry Plugin seems to be the source of the issue.
 

Remij

Veteran
Epic are implementing an updated PSO precaching system for UE5.2 with improved performance, reducing the number of PSOs by excluding unnecessary ones, catching more corner cases, as well as the ability to skip drawing the object if their PSOs aren't ready by draw time.

A new PSO precaching mechanism was introduced as Experimental in 5.1 to improve PSO hitching in DX12 titles. Improvements to this system in 5.2 include:
  • We've improved the performance and stability of the system. There were various corner cases that needed to be addressed.
  • We now skip drawing objects if their PSOs aren't ready yet. The system aims to have the PSO ready in time for drawing, but it will never be able to guarantee this. When it's late, it is now possible to skip drawing the object instead of waiting for compilation to finish (and hitching).
  • The number of PSOs to precache has been reduced due to improved logic that omits ones that will never be used.
  • We've improved the old (manual) PSO cache system so that it can be used alongside precaching.



Good stuff.
 
Last edited:

Remij

Veteran
So instead of hitching we'll have missing objects like an LOD pop in?
Pretty much. I think that's how I'd prefer it to be.

In my mind ideally devs would create as full of a PSO cache as possible and precompile up front, and then hopefully the precaching system will catch any potential ones that they missed. Those could be precached in the background while we play, and ideally those corner cases would be compiled in time, but in the event they're not, the object/effect just pops in instead.
 

pjbliverpool

B3D Scallywag
Legend
Pretty much. I think that's how I'd prefer it to be.

In my mind ideally devs would create as full of a PSO cache as possible and precompile up front, and then hopefully

Yeah I think that's a better compromise. The effect causing the stutternis likely just one small part of the screen and thus it not loading, or loading slower it likely to be preferable to the whole.image stuttering and potentially impacting gameplay.
 

Remij

Veteran
Yeah I think that's a better compromise. The effect causing the stutternis likely just one small part of the screen and thus it not loading, or loading slower it likely to be preferable to the whole.image stuttering and potentially impacting gameplay.
Yep. I'd rather have an object in the scene pop in some milliseconds late rather than have the entire thing stutter for that amount of time.


Another interesting thing I noticed when looking at the roadmap was that with UE5.2 they have improved Garbage Collection performance and memory use.

Developer Tools
DANIEL TUTINO-GALLETTI
Posted on March 2
General updates and quality-of-life improvements for developer iteration in UE 5.2 include:

  • Visual Studio 2022 is now default
  • All enabled warnings for the Clang Static Analyzer have been addressed
  • C UnrealHeaderTool is deprecated and replaced with C# UnrealHeaderTool
  • Optimizations to Garbage Collection performance and memory use
  • UI and usability improvements to Unreal Insights components

I know that garbage collection/memory management is an often cited reason for hitching in PC games alongside compilation stuttering.. so I wonder about this point. Would be nice if it helps reduce traversal stuttering while loading in new areas/assets.

Anyone have any good links that can help me understand more about this? I understand that the memory setup between PC and console is very different.. but I find it odd that many PC games have these traversal stutters where consoles don't, considering we have faster CPUs and far more memory. I suppose the game is just coded in a more general way which favors the console design.. but I've always wondered why PC games can't just load things in with a more fine grained approach and get more of that data into RAM further ahead of time?

I actually wonder if it has more to do with the decompression happening on the CPU than anything else. DirectStorage would also help alleviate this particular issue.
 

Scott_Arm

Legend
Yep. I'd rather have an object in the scene pop in some milliseconds late rather than have the entire thing stutter for that amount of time.


Another interesting thing I noticed when looking at the roadmap was that with UE5.2 they have improved Garbage Collection performance and memory use.



I know that garbage collection/memory management is an often cited reason for hitching in PC games alongside compilation stuttering.. so I wonder about this point. Would be nice if it helps reduce traversal stuttering while loading in new areas/assets.

Anyone have any good links that can help me understand more about this? I understand that the memory setup between PC and console is very different.. but I find it odd that many PC games have these traversal stutters where consoles don't, considering we have faster CPUs and far more memory. I suppose the game is just coded in a more general way which favors the console design.. but I've always wondered why PC games can't just load things in with a more fine grained approach and get more of that data into RAM further ahead of time?

I actually wonder if it has more to do with the decompression happening on the CPU than anything else. DirectStorage would also help alleviate this particular issue.

I’m guessing garbage collection is related to the engine tools and not the real-time engine? I’d be very surprised if there were any gc, unless there’s a scripting language or blueprints that use gc.
 

Remij

Veteran
I’m guessing garbage collection is related to the engine tools and not the real-time engine? I’d be very surprised if there were any gc, unless there’s a scripting language or blueprints that use gc.
Yea, that update is seemingly for the engine tools.. but if that doesn't apply to retail games, then why do some developers blame stuttering in games on garbage collection?
 

Scott_Arm

Legend
Yea, that update is seemingly for the engine tools.. but if that doesn't apply to retail games, then why do some developers blame stuttering in games on garbage collection?

I know they do for Unity because Unity has gc, at least if they're not using the new ECS. As far as I know UE games don't have any gc, but maybe I'm wrong and some of the scripting does.
 

Remij

Veteran
Oh, what is this?

FsAIaNmXwAEbFMV



Things are happening!
 
Top