ValveSoftware / Fossilize

A serialization format for various persistent Vulkan object types.
MIT License
583 stars 47 forks source link

Fossilize eating ram after latest steam update #200

Closed ItsCryptic closed 2 years ago

ItsCryptic commented 2 years ago

image As you can see this is eating much more ram than it should and is actually being killed by my oom killer after a few minutes. Please fix this.

ItsCryptic commented 2 years ago

Steam could be doing nothing and it will still eat my ram like no tomorrow

kisak-valve commented 2 years ago

Hello @ItsCryptic, please attach ~/.steam/steam/logs/shader_log.txt as a file. Also, please copy your system information from Steam (Steam -> Help -> System Information) and put it in a gist, then include a link to the gist in this issue report.

The specific details I think are needed for a dev to ponder this issue is what game's shader cache is Fossilize processing at that time, and general system info like total CPU cores, RAM, and what video drivers are being used/installed.

ItsCryptic commented 2 years ago

shader_log.txt https://gist.github.com/ItsCryptic/e3625104821ea2aa7994e0cd569e38ca

kisak-valve commented 2 years ago

Thanks, it looks like the shaders being replayed is for Red Dead Redemption 2 on a 6 core / 12 thread system with about 15GB of system ram.

Looking at the system information, what jumps out at me in particular is that Steam is running on the APU (https://gist.github.com/ItsCryptic/e3625104821ea2aa7994e0cd569e38ca#file-system_info-txt-L48) and lavapipe is the first enumerated vulkan driver (https://gist.github.com/ItsCryptic/e3625104821ea2aa7994e0cd569e38ca#file-system_info-txt-L170 and https://gist.github.com/ItsCryptic/e3625104821ea2aa7994e0cd569e38ca#file-system_info-txt-L346). I suspect this is in response from DRI_PRIME getting set somewhere (https://gist.github.com/ItsCryptic/e3625104821ea2aa7994e0cd569e38ca#file-system_info-txt-L148).

Blind guess, but if you completely close Steam, then run steam from a terminal, does that have any effect on this issue and the highlighted lines in the system information from Steam?

ItsCryptic commented 2 years ago

It seems to fix the issue, however that isn't idle considering I'd have to run it from the terminal everytime

ItsCryptic commented 2 years ago

https://gist.github.com/ItsCryptic/8f7e26ecfec5de43d2914b5641b44b0c Heres the updated system information

ItsCryptic commented 2 years ago

This didnt happen before steam updated.

HansKristian-Work commented 2 years ago

So when Fossilize is replayed against lavapipe specifically we reach the OOM situation?

ItsCryptic commented 2 years ago

That sounds correct, yes

kisak-valve commented 2 years ago

Thanks for testing. Since running from a terminal works as expected, then the PrefersNonDefaultGPU=true setting in Steam's desktop shortcut is most likely a contributing factor. The desktop environment is seeing that and making a suboptimal decision when it sets DRI_PRIME to the APU.

ItsCryptic commented 2 years ago

Alright, should I set that to false? or just remove it altogether?

DachyVashakmadze commented 1 year ago

I have same problem write now, when i was opening game in (Fedora 36/Nobara 36) "processing vulkan shad...." would crush system 100%. Now at (Fedora 37/Nobara 37) it takes all system processing power 99% from all cores + max cooling 9gb Ram, but it will not crash steam. If i skip this now game will start lagging, i got ban today :(

I have ok system for dota 2. All AMD so, i do not get what is problem for me :(. there is my system down.

https://gist.github.com/DachyVashakmadze/7d347491c6f44a01abaeab52cd59f2a0