btrfs icon indicating copy to clipboard operation
btrfs copied to clipboard

HDD access issues with certain games.

Open jfmherokiller opened this issue 11 months ago • 8 comments

I don't know the true reason why this is occurring, but when playing games like idle colony, the game will have moments of lag.

This is tested using an NTFS partition on the same HDD, where the lag doesn't seem to occur.

The lag seems to occur when the game seems to change music tracks and the game will have a semiregular solid few second long freeze before it can continue.

This is the disk layout where the NTFS partition is the 7TB one and the btrfs parition is behind it. image

jfmherokiller avatar Dec 28 '24 00:12 jfmherokiller

I am having the same issue. Lots of stuttering and some (most) games are just straight up unplayable.

Moving them over to my SSD works fine and causes no lag. Playing games on Linux on the HDD seems to work fine as well. Issues started cropping up recently, I've had this drive on BTRFS for a year or so now and I'd really only say it's been a problem for the past couple of months.

I am going to try booting into Linux and defragmenting the drive soon to see if that will help (since there's no support for it on WinBtrfs) but considering how games work fine on Linux I have my doubts it will do much.

Baconing avatar Jan 11 '25 03:01 Baconing

Hey, I will say that defragmenting the partition on Linux using the btrfs command helped a LOT.

I'm not sure what games you're planning to run off an HDD but Portal and CS2 worked infinitely better. Not only am I getting less stutters but I am also getting much better loading times.

If you can, you should 100% try to defragment your partition on Linux. If you plan on booting into Linux often, you can also enable autodefrag in the filesystem options on Linux (e.g the fstab), but you should definitely try a full defrag for a couple of hours and see if it makes a difference.

I will say it's a bit strange that, for me personally, I didn't seem to have the stuttering issues on Linux and it only occured on Windows. My best guess is that the btrfs driver on linux does some magic that helps make random access on fragmented data more efficient.

tldr: defragment your drive

Baconing avatar Jan 11 '25 22:01 Baconing

tbh I did that after posting this and it worked good.

jfmherokiller avatar Jan 14 '25 02:01 jfmherokiller

I have encounteed another issue and its with pcem 13.

For some reason the executable files remain open long after the process has closed.

this is the error message

Image

jfmherokiller avatar Jan 28 '25 00:01 jfmherokiller

I have the same issue in certain games but even on an m2 ssd. Helldivers 2 is an example where it stutters for 1s every 1min while elden ring works fine.

ReisMiner avatar Feb 16 '25 16:02 ReisMiner

I have encounteed another issue and its with pcem 13.

For some reason the executable files remain open long after the process has closed.

this is the error message

Image

I don't have this issue. Sometimes I do have an issue with the HDD being fully locked by processes and I need to reboot. (e.g. I try to open it and it says the folder is in use by another process and its unreadable)

Baconing avatar Feb 17 '25 19:02 Baconing

well you are encountering a massive version of the issue I encountered. For me thankfully it was just a single process. The big issue is that there is no way to free the handle without rebooting which means that this is a cornercase in the driver not freeing the inode.

jfmherokiller avatar Feb 17 '25 22:02 jfmherokiller

Yeah, I also need to reboot my entire computer. I try using something like File Locksmith to no avail. It says that explorer has the handle but restarting explorer it still holds.

Baconing avatar Mar 25 '25 23:03 Baconing