maharmstone / btrfs

WinBtrfs - an open-source btrfs driver for Windows
GNU Lesser General Public License v3.0
5.86k stars 226 forks source link

File system inconsistently lags in games. (Baulder's Gate 3 specifically) #685

Open NakotaDinzeo opened 2 months ago

NakotaDinzeo commented 2 months ago

Hello dev!

I keep my main Steam library on a BTRFS partition, so both Windows and Linux can share the same library.

For most games this is perfectly fine, but for some reason in BG3 it can't feed the game fast enough, and it causes the game problems (Crash in DX, long hang times in Vulcan) as well as failing to load animations and even the initial startup video sometimes.

The game wasn't doing that in EndevorOS Linux, but it was under Windows 11. Once I moved it out of the BTRFS partition onto the NTFS partition, it started working as expected again.

I figured the game may be doing something that is either hitting a bottleneck in the driver, or using some transfer mode that is bugged or unsupported.

The SSD the BTRFS partition is on is a Crucial P3 Plus 4TB in a Gen 4 NVMe socket on the motherboard.

I've attached a Windows system information thing in a zip file, just in case it's helpful.

Thanks, your driver is a feat of software engineering and I hope this is useful to you. Thanks again.

Nakota's system.zip

maharmstone commented 2 months ago

Thanks. I've investigate game-loading speed in general several times now, and never seemed to get anywhere... whatever the issues are, they're not anything obvious.

Possibly we might be able to get away with not doing a memcpy on FILE_NO_INTERMEDIATE_BUFFERING I/O, or something like that.

hcantzler commented 2 months ago

Same situation and issue also here. Looks like the issue is not an odd isolated case.

Starting Steam BG3 from an BTRFS partition results in a crash during game loading (regardless of selecting DX or Vulkan). Moving the game to a NTFS partition solved it. I use Windows 10 and btrfs 1.8.2 on a 1TB Kingston A2000 SSD NVMe.

weskerty commented 2 months ago

It didn't happen to me in this game but in OW2, at loading times, the game would randomly freeze and the disk usage would be 6000ms or more. Disable CoW and the same thing happens. Apparently if the program starts writing many small files the speed reduces too much.