r/Snapraid • • Oct 17 '26

Snapraid 15.0 with Btrfs support

I've always used ext4 for my snapraid volumes, but now that the new version has Btrfs it seems like I might have a reason the upgrade now.

Is anyone else using Btrfs on low-power low-RAM systems? Would there be any reason to not start adding new drives with Btrfs instead of ext4?

13 Upvotes

13 comments sorted by

2

u/dhanar10 Oct 17 '26

Last time I checked, BTRFS need big RAM if you are storing big files due to copy on write nature. But if your files are many small files, should be no problem.

1

u/divestblank Oct 17 '26

ok, good to know. Is there a way to estimate RAM usage?

2

u/dhanar10 Oct 18 '26

If I remember correctly, if you try to overwrite a single big file, you will need roughly almost the same amount of ram as your file size.

For me, I found out the hard way by using BTRFS on my parity disk. That does not end well as I keep getting out of memory. I thought I am impacted by BTRFS bug but it looks like that is just how copy on write works. So I personally avoid BTRFS for now unless I have special reason to use it.

1

u/jeo123911 Oct 18 '26

Thank you. You just saved me a huge amount of hassle. I was about to convert my stuff from ext4 to btrfs without knowing a 180GB system image file would essentially choke my storage.

3

u/ApprehensiveHippo164 Oct 18 '26

If the files are linux isos that don't get modified, there is no big ram usage. Those issues come with very large files that are modified.

1

u/DynamiteRuckus Oct 18 '26

I believe you must be thinking of ZFS. I’ve got 100TB+ of BTRFS and it’s using very little RAM. Less than 0.5GB of ram mounted I want to say.

1

u/dhanar10 Oct 18 '26

If it is just mounting and reading files, yes, I have no problems with BTRFS too. But it looks like the problem starts when I am somehow modifying a single large file. In my case, it was snapraid parity file.

2

u/mattbuford Oct 18 '26

This is definitely not true. My 32 GB system has no problem with my 3 btrfs Snapraid parity disks with 8 TB files on each of them. RAM usage is very low.

2

u/dhanar10 Oct 18 '26

One possibility is my CPU is too slow to keep up hence it queue in the RAM? It was Intel Atom with 2GB Ram.

2

u/mattbuford Oct 18 '26

My system is a Celeron J4105, which is a little better than Atom, but not by much.

2

u/ApprehensiveHippo164 Oct 18 '26

Usually it doesn't make sense to use btrfs for the parity, since its just the one file on the drive. But if you do, make a subvolume and chattr +C the directory before creating the parity file. Now you have a parity without CoW and RAM usage should remain low.

1

u/DynamiteRuckus Oct 18 '26

Huh. I’ll have to pay attention, but I’ve never run into that. Just checked memory usage for BTRFS and it’s like 135MiB currently.

sudo awk '/btrfs|extent_/ {sum += $3*$4} END {printf "%.1f MiB\n", sum/1048576}' /proc/slabinfo

not perfect but for transparency that’s how I got the ballpark figure.

1

u/dhanar10 Oct 18 '26

Yeah so based on my experience, BTRFS in parity disk is a no no. My parity disk is 2 TB and RAM is 2 GB btw.