ValveSoftware / Proton

Compatibility tool for Steam Play based on Wine and additional components
Other
24.44k stars 1.07k forks source link

Performance regression with latest Proton vs Proton 7 #8075

Open NjlsShade opened 2 months ago

NjlsShade commented 2 months ago

Using versions of Proton newer than the commit used to build GE-Proton-7-47 results in extreme performance loss while playing the non-steam game called Blood Strike (https://www.blood-strike.com/). I was not able to find the exact commit used by GE's 7-47 build, but it's the closest I found where the issue is not present.

Using the latest version of Proton (1723129720 experimental-9.0-20240808) as well as any version after Proton 7.0-6 (more precisely any build after GE-Proton-7-47), I'm seeing only a third of the performance (fps) compared to builds before 8.0-5 (or more precisely GE-Proton-7-48). This issue does not affect upstream wine or wine-staging, so something in the proton patches is causing it.

The game seems to be single threaded and only uses one core, so I did my testing using taskset to limit the process to a single CPU core manually for consistency.

I'm not sure if there is anything relevant I can provide, but I'm happy to help where I can. Obviously this is not a Steam game, and I can use standard wine builds to play, however, given it's such a massive performance hit I thought I'd reach out in case it affects other games now or down the road.

Fedora 40 Kernel 6.10.5-201.fsync.fc40.x86_64 Mesa 24.1.6 RX 6700 (also tested with RX 7900 XTX) Ryzen 9 7950X3D (also tested with 5800X)

Proton logs with FPS screenshot (240FPS is the game's cap, and this is a small area with little performance demand)

Proton Experimental: Proton Experimental_steam-11080902129202757632.log Screenshot_20240906_183758

GE Proton: GE-Proton7-47_steam-11080902129202757632.log Screenshot_20240906_182928

kisak-valve commented 2 months ago

Hello @NjlsShade, can you test how much of the performance loss is covered by the discussion on #7154?

Also, please add PROTON_LOG=1 %command% to the game's launch options and attach the generated $HOME/steam-$APPID.log to this issue report as a file. (Proton logs compress well if needed.)

mhmarf commented 2 months ago

Hello, maybe this is related? Linux 6.11-rc7 To Fix A "Massive Performance Regression" For AMD Graphics I am a 7900X3D user and have not encountered this problem... though I'm on kernel 6.8.12 which is unaffected by the bug above... BTW regarding #7154 , Gamemode (since 1.8.1) automatically already does this (Core Parking/Core Pinning)...

mhmarf commented 2 months ago

I just installed Proton 7.06 and also GE-Proton-7-47 in Steam but could not launch any game but 1 for some reason (a 2D game capped to monitor refresh rate not suitable for benchmarks...) no other game launched! But using Lutris, both of them worked with no problem. I compared Proton 7.06, GE-Proton-7-47 and ProtonGE-Proton-9-13 on 3 games:

Outer Wilds (DX11 game, 960x540 resolution) Gamemode disabled (little to no advantage of X3D cores) Gamemode Core Parking on (taking full advantage of X3D cores)
Proton 7.06 (uses DXVK 1.10.3) ~850 FPS ~1350 FPS
GE-Proton-7-47 (uses DXVK 2.0) ~860 FPS ~1350 FPS
GE-Proton-9-13 (uses DXVK 2.4-41-devel) ~870 FPS ~1350 FPS
Senua's Saga: Hellblade II (DX12 game, 1280x720 resolution FSR 3 Ultra Performance) Gamemode disabled Gamemode Core Parking on
Proton 7.06 (uses VKD3D 2.6.0) ~152 FPS ~155 FPS
GE-Proton-7-47 (uses VKD3D 2.8) Crashes in menu Crashes in menu
GE-Proton-9-13 (uses VKD3D 2.13-devel) ~155 FPS ~155 FPS
The Invincible (DX12 game, 1280x720 resolution FSR 2.2 Ultra Performance) Gamemode disabled Gamemode Core Parking on
Proton 7.06 (uses VKD3D 2.6.0) ~180 FPS ~188 FPS
GE-Proton-7-47 (uses VKD3D 2.8) ~180 FPS ~188 FPS
GE-Proton-9-13 (uses VKD3D 2.13-devel) ~188 FPS ~188 FPS

So I think this might be a game specific issue unless you have seen it on other games as well... also could be kernel related bug... one last thing that comes to mind is that when you use a non-steam games on steam, some components such as Steam Linux Runetime Soldier for example, are not installed and used AFAIK... maybe try installing them yourself (Steam Linux Runetime Soldier and Steam Linux Runetime Sniper) and see what happens!

NjlsShade commented 2 months ago

I've updated my post with logs, as well as screenshots showing the FPS achieved in a very low demand single player area in the game.

Even upstream wine and GE 7-47 don't come close to the performance seen on Windows when playing the game outside this single player area, however, it shows a clear regression beyond that when the proton patches are applied to wine (the game outside this "shooting range" single player area is unplayable on Proton versions beyond GE 7-47 as the fps is far too low). In my testing, I've used the same version of DXVK for all Proton/wine versions to rule out newer DXVK being the problem (but I also used the bundled DXVK versions originally when I first was experiencing and looking into the issue).

I also do not see any link to the Linux 6.11-rc7 fix (mentioned in mhmarf's comment) as the issue does not occur with wine, nor when using the 5800X (It also affects my 5800X, however, due to the game's 240FPS cap I did not notice. 5800X just gets much better performance than the 7950X3D for some reason using latest proton, but gets way better performance even still when using GE 7-47). Let me know if there is anything else I can do, I too was not able to notice any issues with other games, even when limiting them to a single core (as it seems Blood Strike is a single core game), so I know this looks to be specific to this game, however, given it only occurs with proton and not wine it just makes me feel something is not quite working as well as it could be, even if most games dont tap into said thing.

NjlsShade commented 1 month ago

Updated the main comment, as well as my latest one. The issue does exist on my 5800X as well, it is not specific to the 7950X3D. I didn't notice because the 5800X performs much better than the 7950X3D overall in this game, but substantially even better still when using GE 7-47 (5800X outperforms the 7950X3D regardless of the proton version in my testing, but they both act the same in that versions of proton newer than GE 7-47 have a large negative impact on FPS).

Just as stated before, all testing is done on the same single core for consistency (though observations were done while allowing the game access to any cores and performance was identical). The 7950X3D should have faster single core performance (and it does in other games I tested single core), so it's both a regression in that the different proton versions affect performance with both CPUs, and in that proton allows the 5800X to outperform the 7950X3D in this single threaded game.

Once again, I know this is out of scope, as the game is not on Steam, and making sure Steam games are working as best as can be is a priority for Proton, however, as upstream wine is not affected by this issue, and whatever this game is doing may affect other titles on Steam down the road, I wanted to share my findings.