this post was submitted on 06 Nov 2023
22 points (100.0% liked)

Linux

1259 readers
87 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I have 500gb SSD and need to basically uninstall Elden Ring and Dark Souls 3 to install Baldur's Gate 3. I want to buy new SSD, but my money is a bit tight right now as I'm saving for my degree's tuition fee.

I'm thinking of buying 3x500GB spinning HDD that will cost me around $20. I know it wont be as fast as SSD, but I read/watched about RAID, and saw amazing result. Around 400-500MBPs, which should be more than enough for gaming, imo. If I were to buy the same amount of storage but SSD, it will cost me $100.

I dont really need redundancy, as all of my personal documents are backed up in my server and I have separate disk just for my data archieve. It will only be used to game and game only.

Do you think that my idea makes sense? Is it does..., I want to ask another questions.

I knew I wanted to use RAID 0, but after I read arch wiki, it says that RAID 5 is superior. Should I use BTRFS, EXT4, ZFS, or F2FS? What kernel or module should I use?

you are viewing a single comment's thread
view the rest of the comments
[–] d3Xt3r@lemmy.nz 8 points 1 year ago* (last edited 1 year ago) (2 children)

As others have mentioned, the sequential speeds in RAID 0/5 won't really help you in gaming. What you might see at best is faster loading times, but that's really about it.

One option which no one else has mentioned is using setting up tiered storage using bcachefs - where your SSD acts like a cache drive, which would contain frequently read aka "hot" data, and the rest of the data would be on your spinning disks. This way, you'd be making the most of your limited SSD space, whilst still taking advantage of the large storage provided by the spinning disks.

The advantage of bcachefs is that all your drives can be part of the same pool and it'll all be transparent to your OS/programs, and all your data is striped like a RAID 10 array, so you can replace your drives in the future without any issues, or any major config changes. Like if you get a faster NVMe drive in the future, you can set that as your "hot" (promote) drive, your SSD as the foreground drive and your spinning disk pool as the background ones and your data will automagically migrate.

Have a quick read of the manual, you'll see that it's actually fairly easy to set up and operate: https://bcachefs.org/bcachefs-principles-of-operation.pdf

The main drawback right now (for you) is that it's not yet part of the kernel. The good news is that it's gonna be in the next kernel (6.7), so you can either wait for it, or use a third-party kernel with bcachefs already compiled in it (I believe linux-tkg is one of them).

[–] Uluganda@lemmy.ml 3 points 1 year ago (1 children)

Now THIS is what I need.

I think I need to change my plan abit. What do you think: if I buy 2x1TB, use my sata ssd as foreground, and use 128gb nvme drive as promote drive. I still do not understand the difference between background, foreground, ans promote tho. I went back and forth both reading the guide.pdf and archwiki. Still have no idea how they actually work. It's bleeding edge, as no one beside the developer talking about it on youtube.

However, I think I'm gonna use both linux-tkg linux-git as they are available on the aur. Tkg is the Garuda used, no? It is on chaotic-aur, so I assumed so.

[–] d3Xt3r@lemmy.nz 2 points 1 year ago* (last edited 1 year ago)

Foreground targets are where writes initially go. Data is moved from foreground to background targets while idle or as needed. Data which is read from the background targets is moved to promote targets.

If you set your NVMe as a promote target, SSD as foreground and your HDDs as background targets, all writes would first go to your SSD, then get copied to your HDD during idle, and finally the copy of the data on your SSD will then be marked as a cached copy. In case your SSD becomes full, then it'll store the data on other drives. As for the promote targets, any time you read data from either the SSD or HDD that wasn't on the NVMe, it would get cached to it, so the next read will be faster.

The main point of the foreground vs promote is to prioritize write vs read speeds. If you value faster writes, then set your NVMe as foreground. If you value faster reads, then set your NVMe as promote. Of course, you can also set your NVMe as both foreground and promote to benefit from both faster reads and writes.

But since you plan to introduce an SSD in the mix, you can create a single group for your NVMe + SSD, and a second group for the HDDs, and set your SSD group to foreground + promote, which will simplify things.

The Arch wiki illustrates this well:

A recommended configuration is to use an ssd group for the foreground and promote, and an hdd group for the background (a writeback cache).

Modified example to your scenario:

# bcachefs format \
    --label=ssd.nvme1 /dev/nvme0n1 \
    --label=ssd.ssd1 /dev/sda \
    --label=hdd.hdd1 /dev/sdb \
    --label=hdd.hdd2 /dev/sdc \
    --replicas=2 \
    --foreground_target=ssd \
    --promote_target=ssd \
    --background_target=hdd 

If you're concerned about chucking both the SSD and NVMe in the same group, no need to worry cause bcachefs will automatically prioritize reads from drives with lower latency as mentioned in the wiki.

If they are different speeds, reads for replicated data will be sent to the ones with the lowest IO latency.

But regardless of which setup you go for, main thing to remember is to use the NVMe (or the group containing the NVMe) as the promote target, as that will be your primary cache drive.