D4 memory leak? Using waaay more RAM after XPAC?

Hello,

TOPIC FOR TLDR.

After XPAC the game started eating waaay much more RAM, which is weird since the graphics didn’t seem to improve much (or am I missing something?), the engine should be more or less the same?

It feels like RAM used after xpac is 2x or something. If previously D4 was using maybe 8gb or so, now it can go 16+ and maybe even more. While the game stops at around 16GB, and I mean 16gb used only for the game, not the total, ~16gb ram seems unholy high for D4.

What’s the deal here? Is it bad optimization, memory leak, some errors in the engine?

I also notice that the game in general has more stutters, a somewhat worse performance in general, less stable maybe.

PS. I don’t even run out of VRAM or RAM and the game just randomly crashes sometimes with an exclamation mark, this didn’t happen before.

1 Like

i noticed it’s using about 15% more ram now.

Well, in my case it’s definitely more than 15%. Will maybe need to fiddle with setting out of curiosity.

a recent stupidass windows update wiped my VRAM settings (paging file) and caused a few game crashes. check it again.

This has nothing to do with VRAM which is GPU stuff I think, I don’t hit the ceiling in Ram or GPU memory/VRAM. D4 just after expansion eats insane amount of ram compared to before xpac, and occasionally crashes for who knows what reasons.

In any case, not a single other game acts weird or eats weird amounts of resources or crash for no reason.

Blizz just has done a poor job optimizing their product, maybe they have some faults in the code/engine or whatever. Also, very suspiciously, ram usage slowly grows higher and higher it seems which might suggest a memory leak? I already saw posts about it and clear as hell, I’m not the only one having strange D4 performance after xpac.

As to pagefile, there isn’t anything wrong with it, set to automatic and always was like this from day 1…

I went back to old nvidia drivers from August and all my crashes went away. Might be new drivers causing issues.

1 Like

Strangely, in the first days of vessel of hatred trying to launch it with older drivers, error would show up saying something like “your drivers are outdated, please update” or whatever… So you had to have the latest or one of the latest drivers.

Maybe they fixed it now.

This game still runs in the background even after ‘closing’ it takes a long time for it properly close even after it’s already supposed to so I end up using task manager to force close bnet because D4 just simply won’t close like it’s told to. There’s some definite issues with this game since xpac

You can check what caused the crash by looking at the most recent Fenris log in the Diablo 4 folder. Toward the end of that log should reveal the cause of the crash. And yes, it can in fact be related to VRAM if your windows VM page size is less than your GPU’s total VRAM.

Current optimal settings for D4 are as follows:

VM Page Size: Equivalent to your total VRAM. This is a minimum. Depending on total VM allocation you may want to set it slightly higher (see why below).

Total VM Size: VRAM total + minimum of 50% of your system RAM total. If your GPU has 12 GB VRAM and you have 32 GB system RAM, your total VM size should be 28 GB at a minimum. However, see the following note as to why this might also need to be slightly larger.

Note: Page size should optimally be evenly divisible into your total VM size. If your total VM size is set to 28 GB as in the example above, your page size should be a minimum of 14 GB. However, if you want to keep your page size as small as possible (equal to your VRAM total), then your total VM size should be 36 GB as that makes the page file evenly divisible (36/12 = 3 with no fractional remainder).

No, you shouldn’t have to even touch any of this just to play a game without crashing. Sadly, yes, you do need to make this adjustment for Diablo 4 due to how it handles texture swaps/dumps (it dumps them directly to VM which is why your page size must equal at least the total VRAM just in case the game does a full swap/dump). It sucks, but it is what it is currently.

Its bad coding that causes this. Nothing new about memory leak since Alpha. They will not address it. They just copy the code and paste it, then add new code.

Well, I have unticked chromatic aberration and disabled NVIDIA DLSS just to change some options out of curiosity and now something completely strange happens.

RAM usage grows and grows and grows to like 16-18GB+ (and that’s only the game without anything else) and then at some point, the game just releases them or something and game RAM usage becomes like 8GB.

IDK what’s going on but also, the crashes no longer seem to happen. I didn’t have any so far fortunately o_0.

Maybe it’s broken chromatic (new graphics feature) or there are some problems with DLSS rendering and that’s why the game has some problems with memory. Some things like shaders and physics / textures might be need to set to medium too.

The game looks the same? yet those high settings might be another instability, who knows.