this post was submitted on 06 May 2024
66 points (97.1% liked)

Linux Gaming

15355 readers
226 users here now

Discussions and news about gaming on the GNU/Linux family of operating systems (including the Steam Deck). Potentially a $HOME away from home for disgruntled /r/linux_gaming denizens of the redditarian demesne.

This page can be subscribed to via RSS.

Original /r/linux_gaming pengwing by uoou.

Resources

WWW:

Discord:

IRC:

Matrix:

Telegram:

founded 1 year ago
MODERATORS
66
submitted 6 months ago* (last edited 6 months ago) by iso@lemy.lol to c/linux_gaming@lemmy.world
 

I'm using EndeavourOS with ext4 file system for daily usage and a dual bootable Windows for gaming. What I want to have right now is getting rid of Windows completely.

When I tried it before, I had to try multiple tweaks for a game and find which one worked on Linux. Therefore, I want to take a snapshot with BTRFS and try it until I find the right configuration.

While I have quite a bit of experience with Linux, I've never used BTRFS. Do you think it's worth it?

I thought about keeping the games on the ext4 system, but I hate splitting the disk. I'm thinking of keeping the games in a non-snapshot volume.

UPDATE: I just re-installed EndeavourOS with BTRFS + snapper + BTRFS Assistant :)

all 39 comments
sorted by: hot top controversial new old
[–] Keegen@lemmy.zip 40 points 6 months ago (4 children)

I use Fedora which defaults to BTRFS and never once had an issue with any game because of it. Your file system shouldn't matter for gaming at all so long as you stay on Linux native ones and avoid NTFS Windows drives.

[–] governorkeagan@lemdro.id 5 points 6 months ago

This. I’ve not had any issues across my laptop or desktop.

[–] iso@lemy.lol 4 points 6 months ago* (last edited 6 months ago) (1 children)

I was worried about the possible high overhead of CoW in BTRFS. I guess it won't cause much of a problem. Thank you 🙏

[–] Keegen@lemmy.zip 14 points 6 months ago

Unless you're making hundreds of snapshots with massive changes between each it won't matter. It might matter if you plan to use spinning rust as your main drive, but I imagine you'll be using an SSD.

[–] Trail@lemmy.world 4 points 6 months ago (1 children)

My Linux stream library is on Ntfs, for theoretical compatibility purposes with Windows which I never boot any more anyway, but generally I have had zero problems apart from an issue with Dota 2 a few years ago where I had to symlink some folder. But I don't think think it is needed anymore.

[–] Keegen@lemmy.zip 2 points 6 months ago

Good to know the situation with cross compatibility has improved! I just saw enough posts of people having issues with a shared Windows/Linux NTFS drive over the years to advice against that setup.

[–] Petter1@lemm.ee 1 points 6 months ago (2 children)

Isn’t arch-chroot a bit different in btrfs?

[–] Rolive@discuss.tchncs.de 3 points 6 months ago (1 children)

I think you mean having to mount the subvolumes instead of the partition itself.

This can be done by mount -o subvol=whatever /btrfspartition /mountpoint

After having done that it's the same.

[–] Petter1@lemm.ee 1 points 6 months ago

Yea that 😂 was too lazy doing that / remember that

[–] Keegen@lemmy.zip 0 points 6 months ago (1 children)

I don't know? It's been a long time since I used Arch, and besides OP is using EndeavourOS so it won't matter.

[–] stepan@lemmy.cafe 4 points 6 months ago (1 children)

EndeavourOS is Arch-based and I'm pretty sure it also uses arch-chroot.

[–] Keegen@lemmy.zip 6 points 6 months ago (2 children)

Yeah but when is that gonna matter? It uses a graphical installer so you won't need to touch the arch-chroot command at all. And if for some reason you do, the Arch wiki is there for you.

[–] Petter1@lemm.ee 0 points 6 months ago (1 children)

Sure, I had chosen ext4 because it was unnecessary complicated with btrfs and I don’t do snapshots (all my data is in my private cloud, so I don’t loose data if I reinstall my linux)

[–] Keegen@lemmy.zip 2 points 6 months ago (1 children)

Great, good for you. But what's your point? OP explicitly said they have a specific use case for BTRFS and just wanted to know if there are any specific issues related to gaming with it. arch-chroot being slightly different with that filesystem is not an issue for 99% of EndeavourOS users.

[–] Petter1@lemm.ee 0 points 6 months ago* (last edited 6 months ago)

Lol, OK, just wanted to point out the difference I approached, no need to feel attacked, damn..

[–] pHr34kY@lemmy.world 30 points 6 months ago (3 children)

Btrfs is amazing for a steam library. The single best feature is the compression. Games tend to have lot of unoptimized assets which compress really well. Because decompression is typically faster than your disk, it can potentially make games load faster too.

I put a second dedicated nvme drive in my PC just for steam. It's only 512GB but it holds a surprisingly large library.

[–] dingdongitsabear@lemmy.ml 17 points 6 months ago

and ~~my axe~~ deduping. all those dlls and wine prefixes that contain them occupy space only once.

[–] apt_install_coffee@lemmy.ml 10 points 6 months ago (2 children)

I actually found the opposite with my steam library; on ZFS with ZSTD I only saw a ratio of 1.1 for steamapps, not that there's really any meaningful performance penalty for compressing it.

[–] sparr@lemmy.world 10 points 6 months ago

It depends on what sort of games you play. Some games / genres / publishers are much worse about this than others.

[–] pHr34kY@lemmy.world 4 points 6 months ago* (last edited 6 months ago) (1 children)

OK I just measured mine. I have 459GiB of games on the drive, consuming 368GiB of space. That's about 25% compression. I'm using compress=zstd:9.

I should try deduplication. I have 4 steam users and I've created an ACL hell to prevent the same game being downloaded and installed twice.

[–] apt_install_coffee@lemmy.ml 1 points 6 months ago (1 children)

If you're messing with ACLs I'm not sure deduplication will help you much; I believe (not much experience with reflinks) the dedup checksum will include the metadata, so changing ACLs might ruin any benefit. Even if you don't change the ACLs, as soon as somebody updates a game, it's checksum will change and won't converge back when everyone else updates.

Even hardlinks preserve the ACL... Maybe symlinks to the folder containing the game's data, then the symlinks could have different ACLs?

[–] pHr34kY@lemmy.world 2 points 6 months ago* (last edited 6 months ago)

I wrote a blog about it last year with my method of deduplicating. I really need to update that bit because steam keeps writing files that don't uphold the group permissions, and others get permission errors that need to be fixed by admin. Steam also failed to determine free space on a drive when symlinks were involved.

I even found recently that steam would write files in /tmp/ as one user, and fail when you logged in as another user and tried to write the same file. Multi-user breaks even without messing around.

My current solution doesn't use symlinks. I just add two libraries for each user. One in their respective home directory, and another shared in /mnt/steam. It means that any user can update a game in /mnt/steam, and it cleanly updates for all users at once.

[–] victorz@lemmy.world 5 points 6 months ago (1 children)

Is the compression opt-in or is it enabled by default?

[–] cmnybo@discuss.tchncs.de 7 points 6 months ago (1 children)

You have to enable compression in fstab.

[–] victorz@lemmy.world 1 points 6 months ago (1 children)

Ah okay, cool. It's that easy? Does it compress all existing data after that or is it only for new data?

What would I have to do to compress existing data?

[–] manifesto7473@lemmy.ml 6 points 6 months ago (2 children)

It is only for new data.

For example, you would have to defragment your filesystem again with btrfs filesystem defragment -r -v -czstd /. Where zstd is an algorithm and /, a root path. With this command, the default compression level will be used, which is level 3.

Be careful, defragmenting the btrfs file system will/can duplicate the data.

As for a mount point, if you decided to use zstd algorithm with level 1 compression, just add the compress=zstd:1 or compress-force=zstd:1 to the mount options (fstab or while mounting manually)

[–] MonkderDritte@feddit.de 2 points 6 months ago* (last edited 6 months ago) (1 children)

Reading the manpage (btrfs-filesystem), duplication can happen on some odd kernel versions, so no danger.

Edit: that was my interpretation of breaking up reflinks of cow data anyway. Seems there's more.

[–] manifesto7473@lemmy.ml 1 points 6 months ago (1 children)

If I know correctly, defrag will always duplicate the reflink files.

https://btrfs.readthedocs.io/en/latest/Defragmentation.html

Defragmentation does not preserve extent sharing, e.g. files created by cp --reflink or existing on multiple snapshots. Due to that the data space consumption may increase.

[–] MonkderDritte@feddit.de 1 points 6 months ago

Well, compression doubled my available space. ;-)

[–] ThePancakeExperiment@feddit.de 1 points 6 months ago (1 children)

So I set up my system with btrfs in the last days and I converted two external drives (from ext4) (mainly game) and run defrag and balance, because it was mentioned in a guide to compress the existing files. Was that a bad idea? Didn't read anything about duplicates.

[–] manifesto7473@lemmy.ml 1 points 6 months ago* (last edited 6 months ago)

It is fine. You can use the duperemove tool (or bees) to find and remove duplicates.

https://btrfs.readthedocs.io/en/latest/Deduplication.html

So it is out-of-band deduplication and has to be done manually.

Also, by default cp and most file managers use a reflink copy (data blocks are copied only when modified)

[–] stebator@lemmy.world 13 points 6 months ago* (last edited 6 months ago)

BTRFS is worth it. It's a bit faster than ext4. And with BTRFS assistant or snapper, you can configure automatic snapshots of your OS partition. And grub-btrfs will allow to integrate them to the boot menu. Once you are booted via snapshot, there is a way to replace / file system with that snapshot permanently, or you can boot to another one.

And remember, snapshots in BTRFS is just a formal thing, use them only if you specifically need their features, like read only sub volumes. If you just need to backup some directory, for example with steam games, no need to do the actual snapshot. You can easily backup large amount of data with just cp -dr dir dir_backup no matter how large is it, it will be done immidetelly and without taking additional space.

[–] n3cr0@lemmy.world 10 points 6 months ago

BTRFS works great across all my drives under Nobara. Same applues when I access these drives from Ubuntu.

Steam also has no issues in my case. Even wine works line Intended.

[–] Rolive@discuss.tchncs.de 8 points 6 months ago* (last edited 6 months ago)

I've always used BTRFS with rolling release distros like Arch or Tumbleweed and never had an issue with the filesystem.

I've been happy with btrfs. No issues with gaming. There's even a pretty good Windows driver, which I've used successfully to transfer data between Linux & Windows. Though I haven't installed Windows itself to btrfs, which is apparently possible!

[–] wonderfulvoltaire@lemmy.world 3 points 6 months ago (1 children)

Butter is amazing especially on ostree like fedora atomic for example

[–] Lem453@lemmy.ca 1 points 6 months ago

What makes butter better than btrfs for ostree systems?

[–] Dudewitbow@lemmy.zip 2 points 6 months ago

iirc Garuda Linux defaults to it, and is gaming focused distro of arch. Whether its worth it is up to you, but there are already users who daily drive it that way.