Steam for Linux

Steam for Linux

Shader Pre-caching is pointless.
The common wisdom is that shader pre-caching is supposed to improve performance; things like reducing stutters and so on. Like most people I accepted that as valid, and have suffered the endless downloads and cache grinding every time I start Steam. Finally I had enough. It could take 10 or more minutes every time before I could play any sort of game, and it was driving me batty. So, I decided to turn the caching off.

I have been a benchmark fan for decades. I have every benchmark known to man, both native to Linux and native to Windows running with wine, and many of my games have built in benchmark tools.

I have run all the benchmarks available within steam, and sampled all my games while monitored frame rates and overall "smoothness" of game play.

After extensive testing, I can firmly attest to the fact that on my rig, there is zero benefit to be had with pre-caching. None. There is a benefit to it being turned off... faster to play a game, no endless downloads, no grinding. It is easier on my system, and easier on my psyche.
< >
Showing 1-9 of 9 comments
Do I understand correctly that Vulkan shaders are why an old game like Skyrim has a huge download every day?
Originally posted by catbox:
not everyone has top of the line latest best faster GPU or whatever.
Including me. I run a Ryzen 2600X with an Nvidia GTX970 with 3.5 gb mem. Pretty much bottom tier. I want more people to test this, as I think its doing nothing at all but wasting resources.
Originally posted by Coolranch:
Do I understand correctly that Vulkan shaders are why an old game like Skyrim has a huge download every day?

Yes. Turn them off and see if you notice any performance change... I will bet not.
The only time I have to wait for shaders is when a new Vulkan version in downloaded when I do my Linux updates and then run the game in Steam. After it's done once, won't see it again until the next Vulkan update.
Originally posted by foxwolfen:
The common wisdom is that shader pre-caching is supposed to improve performance; things like reducing stutters and so on. Like most people I accepted that as valid, and have suffered the endless downloads and cache grinding every time I start Steam. Finally I had enough. It could take 10 or more minutes every time before I could play any sort of game, and it was driving me batty. So, I decided to turn the caching off.

I have been a benchmark fan for decades. I have every benchmark known to man, both native to Linux and native to Windows running with wine, and many of my games have built in benchmark tools.

I have run all the benchmarks available within steam, and sampled all my games while monitored frame rates and overall "smoothness" of game play.

After extensive testing, I can firmly attest to the fact that on my rig, there is zero benefit to be had with pre-caching. None. There is a benefit to it being turned off... faster to play a game, no endless downloads, no grinding. It is easier on my system, and easier on my psyche.
Shader cache improves performance only by skipping shaders compilation, which usually happens during few seconds of you encountering new shaders for the first time. And then your locally compiled shaders are cached anyway, but the locally built cache is way smaller (probably because the downloaded cache is a bundle for all combiantions of shaders for various hardware, drivers, and dxvk/vkd3d versions).

In the past, shaders were compiled synchronously, and could cause serious performance drop during compilation (wasn't a big deal for me anyway), but now they are compiled asynchronously, and downloading cache is effectively obsolete.

You really didn't have to test anyway, you just had to learn what is shader compilation, when and why it occurred, and how it is cached.
Originally posted by bread of wisdom:
You really didn't have to test anyway, you just had to learn what is shader compilation, when and why it occurred, and how it is cached.
I am an empiricist. Nothing has any truth until its tested. Anything asserted without evidence to support it, is just that: only an assertion. An opinion. Not fact. Of course, the other aspect of the equation is "assumption", like you assumed I do not know what it is, when and why it occurs, and how it is cached. That assumption would be false my friend.
Originally posted by foxwolfen:
Originally posted by bread of wisdom:
You really didn't have to test anyway, you just had to learn what is shader compilation, when and why it occurred, and how it is cached.
I am an empiricist. Nothing has any truth until its tested. Anything asserted without evidence to support it, is just that: only an assertion. An opinion. Not fact. Of course, the other aspect of the equation is "assumption", like you assumed I do not know what it is, when and why it occurs, and how it is cached. That assumption would be false my friend.
Ah whatever you say Mr big boy scientist
It's probably most useful if you are cpu bound... doing it on-the-fly will just put more load on your cpu so why add to it's burden?

I've just had a play with Shadow of the Tomb Raider benchmark (nothing 'scientific, of course!) and the final result was the same. I ran it off a hdd first and that gave the highest average fps!

But I wasn't cpu bound. Pre-cached hammered 1 thread 100% and the average over 8 threads averaged about 55%. When I skipped pre-caching all threads were 70-80%. Both runs had an ugly stutter in the woods at the same part of the camera pan.

I think I remember Cyberpunk and RDR2 clogging up my cpu a bit... I'll try with those later.

Native
https://steamcommunity.com/sharedfiles/filedetails/?id=3050081376
https://steamcommunity.com/sharedfiles/filedetails/?id=3050082093
IMHO it's not that shader precaching is useless... it's that Valve should turn it into an optional workaround instead of a general feature (off by default and possible to enable on a per-game basis)

it used to be the case that shader compilation on linux (especially for AMD GPUs) was much slower than on windows and too slow to work on-the-fly inside the timeframe needed to avoid stuttering

then came ACO (a new AMD vulkan shader compiler developed by Valve that became the current default in Mesa instead of LLVM) which was so much faster that stutter caused by shader compilation *almost* vanished for a lot of people when it was introduced for testing... and it has improved a lot since

it's also worth noting that there's local shader precompilation done by "fossilize" and there shader precaching, where matching precompiled shaders are downloaded from Valve servers...

...and that those downloads are not very intrusive if you install a small amount of games at the same time on a single machine, but can amount to very frequent and very large downloads for a larger locally installed library

hence why my initial idea is "enable this if you have stutter in this game"
< >
Showing 1-9 of 9 comments
Per page: 1530 50

Date Posted: Oct 11, 2023 @ 5:15pm
Posts: 9