HansKristian-Work / vkd3d-proton

Fork of VKD3D. Development branches for Proton's Direct3D 12 implementation.
GNU Lesser General Public License v2.1
1.94k stars 202 forks source link

FPS drops after VRAM amount exceeded on nvidia #1476

Open majkrzak opened 1 year ago

majkrzak commented 1 year ago

Nvidia driver seems to suffer to a problem with handling the VRAM allocation properly: https://forums.developer.nvidia.com/t/vram-allocation-issues/239678 When VRAM is full. fps permanently drops significantly. Although this is not a problem of vkd3d it most likely can be workarounded here. In case of dxvk, setting dxgi.maxDeviceMemory to value lower than real memory seems to prevent drop of happening. Something similar can be implemented to temporally "fix" it.

Software information

In my case Ground Branch seems to be affected significantly, fps drop is about 120 -> 20 which makes game unplayable. Problem seems not to be visible when playing Insurgency sandstorm.

System information

K0bin commented 1 year ago

This is a known issue. WDDM on Windows will do a lot of work to mitigate performance problems once you exceed the amount of available VRAM. Linux drivers generally don't do this or don't do it very well.

mbriar commented 1 year ago

Same thing happens on AMD as well. I don't think any game technically has to care about what you report with dxgi.maxDeviceMemory and can allocate more than that anyways.

majkrzak commented 1 year ago

Game seems not to care if it is set to 1024 or 3072 and ocupates 4GB, but when it is set there is no fps drop when reaching the limit

eXt73 commented 1 year ago

That's exactly how it is - the best 'tester' is Deathloop with everything on the max - under the RTX 4070 Ti after about 15 minutes of playing there is a hiccup as for the RTX 3050 ... 100% with 12 GB VRAM. The same e.g. Cyberpunk 2077 on a mobile RTX 3060 with 6 GB VRAM - it doesn't matter DLSS on Performace = 100% 6 GB already occupied in a moment on the highest settings and drop from e.g. 50 fps to 10 ... under 520 drivers turning on DLSS on Performacne freeing a lot of VRAM - but on 525 there is a tragedy - it keeps VRAM busy all the time.

an9949an commented 1 year ago

Seems like fixed by nvidia in both: driver (535.43.02 beta) and vkd3d. So, great news and thanks a lot to nvidia devs :)

Blisto91 commented 1 year ago

@majkrzak could I get you to reevaluate this with newest vkd3d-proton and Nvidia driver? 🙂

majkrzak commented 1 year ago

Sadly it is not possible. I've changed my setup.

gmbeard commented 5 months ago

I'm experiencing this issue with Deathloop; VRAM increases to maximum usage and the frame rate drop from 120 (vsync'd) down to 25-30 fps. I observe the VRAM usage using MangoHud.

I'm on X11 and using an RTX 3080ti, with the current proton experimental version of vkd3d, and nvidia driver 550.90.07.

Is there anything else I can provide to help debug this?