protonscr

Question about VRAM usage in RailWorks

dxvkclosed
doitsujin/dxvk#5682 · opened 2026-06-04 by ExoSkye · updated 2026-06-05 · 14 comments · github
1 matching comments, n / p to jump
EExoSkye 2026-06-04 github

Hi,

I'm running Railworks (Train Simulator Classic, specifically the 64 bit version) with dxvk (including async patches for shader compilation, but I don't believe that's the culprit here), and I noticed the game is consistently using 11.1GB of VRAM
This means that on my 8GB card (RTX 2080 SUPER), it must be swapping memory in and out from system memory, and I'm wondering if this additional overhead is causing some performance issues.
I'm not sure, but is there a way to tell dxvk to reduce this? I don't believe 11.1GB of textures and models are being used by Railworks, being as as much as there's a lot of enhancement packs etc and it's an old game, it's still from 2009

Also of note is the fact that TSC is a DX9 application, and whilst a DX12 version exists, it's a... not great port to say the least. I've found dxvk gives me better performance already, compared to both the DX12 and DX9 versions

Any hints are welcome,
Thanks in advance!

Ddoitsujin maintainer 2026-06-04 github

We only use that much VRAM because the app creates 11GB worth of resources, D3D9 apps can be a bit speshul in that regard. it's possible that it relies on some Windows XP behaviour w.r.t. device loss and and needs an app profile or something, need to investigate.

EExoSkye 2026-06-04 github

I see. I could see that being the case given the game was initially made in 2009 and DTG haven't really updated the code in a major way since then, just adding features and light optimisations

How could I investigate further? I've done graphics programming before so I have tools like nsight and such on my PC, but I'm not sure how to approach this kind of problem

Ddoitsujin maintainer 2026-06-04 github

I'm currently trying to get this to run properly but it just keeps crashing in its own code or showing infinite loading screens, not sure what to do here.

EExoSkye 2026-06-04 github

Honestly doesn't surprise me for Railworks, it's a bit of a buggy mess at times
Although usually it can at the very least launch
I have a very love/hate relationship with this game lmao

EExoSkye 2026-06-04 github

I'll see if I can spot any clues in nsight in a little bit, just got some stuff to do first. Is there anything else I could try to try to give you something more to work with?

Ddoitsujin maintainer 2026-06-04 github

got to drive around a bit but only saw it use a bit over 3GB + another 2GB or so of sysmem allocations. Can you post a screenshot of it with DXVK_HUD=full?

EExoSkye 2026-06-04 github

Sure I can! Will get that in a moment

EExoSkye 2026-06-04 github
Image Ok, this is what I got - it does appear that my Steam overlay (that was where I got the VRAM usage from) seems to be displaying a very high value compared to what it actually is, nonetheless, though, this still feels high to me, at least
EExoSkye 2026-06-04 github

This also wasn't the scenario I was playing previously, in a moment i'll see if that shows anything different in the HUD

EExoSkye 2026-06-04 github
Image Ok yeah that's a little bit higher, but not by much. Unless you see anything weird I'm thinking this may not be a dxvk issue, but more just the game being old lol so.. yeah lmk if you see anything, but I can close this if need be, sorry for wasting your time on a slight wild goose chase lol
Ddoitsujin maintainer 2026-06-04 github

Yeah so that looks fairly normal. The green stuff is system memory that acts as a shadow buffer for actual VRAM resources (D3D9 jank, the way resource management works there dates back to the days when GPUs didn't have texture memory), actual VRAM usage is ~4.4GB, and based on the GPU utilization you seem to be heavily CPU-bound for.... some reason.

Ddoitsujin maintainer 2026-06-04 github

Also, this might explain why D3D12 doesn't do anything for you. :frog:
Image

EExoSkye 2026-06-04 github

Yeahhh it's well known in the community that the DX12 version doesn't really do much performance wise and just makes the game more unstable lol

EExoSkye 2026-06-04 github

Yeah so that looks fairly normal. The green stuff is system memory that acts as a shadow buffer for actual VRAM resources (D3D9 jank, the way resource management works there dates back to the days when GPUs didn't have texture memory), actual VRAM usage is ~4.4GB, and based on the GPU utilization you seem to be heavily CPU-bound for.... some reason.

Yeah this game is annoyingly very single threaded, it's not great
There's not very much we can do about that, but even then, none of my CPU cores reach 100% utilisation, so that's why I was wondering if the bottleneck was elsewhere - my Ryzen 5 5600G isn't the best but it ain't bad

Launch options