protonscr

[d3d9] evictManagedOnUnlock higher memory usage in 1.9

dxvkclosed d3d9
doitsujin/dxvk#2106 · opened 2021-06-16 by BlueAmulet · updated 2021-08-28 · 8 comments · github
BBlueAmulet 2021-06-16 github

After updating DXVK to 1.9, I've noticed the memory usage in Soulstorm is higher than it was in 1.8.1. I've made sure to test multiple times, and to set up the skirmish with the same settings each time.
In DXVK 1.8.1, memory usages sits at around 2.57GiB
In DXVK 1.9, memory usage is now at 2.78GiB

Related to #1318

Software information

Dawn of War: Soulstorm (Steam)
EXE's are marked as LAA
d3d9.evictManagedOnUnlock=True

System information

  • GPU: NVIDIA GeForce GTX 1050 Ti
  • Driver: 465.89
  • Windows version: Windows 10 64bit 2004 (19041.928)
  • DXVK version: 1.9

Apitrace file(s)

https://drive.google.com/file/d/1cVC3IYGgcbFqd1fXKJ_clfi0AS_VDRGt/view?usp=sharing

Log files

soulstorm_d3d9_19.log
soulstorm_d3d9_181.log

Ddoitsujin maintainer 2021-06-16 github

where's the problem exactly if we're even below native D3D9?

BBlueAmulet 2021-06-16 github

That memory usage has gone up compared to 1.8.1, and that memory usage in 32bit processes is limited so the loss of 215MiB matters, some match settings in Soulstorm can start out at higher than 3GiB, and the game tends to crash around 3.6GiB. DXVK was useful for reducing game memory usage even on Windows, but noticed 1.9 doesn't save as much memory as 1.8.1

Ddoitsujin maintainer 2021-06-16 github

But it doesn't matter because we still have one full gigabyte to work with before address space is exhausted. This issue is purely academic.

If you provide a trace, we can take a quick look, but a) if anything, DXVK is expected to eat more memory than native D3D9 so this is an outlier to begin with, and b) one game using more memory doesn't mean that games where memory pressure is actually an issue use more memory.

Mmisyltoad 2021-06-16 github

This is probably just our staging upload changes

BBlueAmulet 2021-06-16 github

After performing a bisect, I got 4261ff6ec1aa7efdc6d7bf6a5b9434c2eb6cc184 as the commit that increased memory. And this isn't really an academic issue, I'm simply picking the first 7 races from the list for testing consistency and simplicity sake, but for example, picking "Emperor's Children" as one of the races, it's now the difference between the match starting at 3.25GiB (in 1.8.1) and the game crashing before being able to start the match. Some of the other various races are also fairly memory hungry too.

I will provide an apitrace tomorrow.

Ddoitsujin maintainer 2021-06-16 github

it's now the difference between the match starting at 3.25GiB (in 1.8.1) and the game crashing before being able to start the match

Well that rather important bit of information clearly wasn't in the original report.

BBlueAmulet 2021-06-16 github

Got an apitrace https://drive.google.com/file/d/1cVC3IYGgcbFqd1fXKJ_clfi0AS_VDRGt/view?usp=sharing
And apologies for the lack of initial information, after testing a few other d3d9 games I'm noticing there's little to no difference between 1.8.1 and 1.9 regarding memory usage, so far I've only seen Soulstorm having an issue.

KK0bin maintainer 2021-08-28 github

Should be fixed in 1.9.1.

Nothing extracted yet.