BTRFS; How is it like to?

Tolkem

Well-Known Member
Credits
5,457
Hi everyone! Hope you're all having a nice life! :)

I've been recently running and playing with this FS in a couple of VMs with Fedora and OpenSuse. I've read a few blogs and posts and from what I've seen in those VMs it performs pretty well and been considering to make the move from ext4 to brtfs, so thought would ask you my fellow Linuxers, those already using this FS your opinion. Here are a couple of links I find the most interesting:

An excerpt:
Key Btrfs features

Perhaps the most important feature is the checksumming of all data. Checksumming, along with copy-on-write, provides the key method of ensuring file system integrity after unexpected power loss. More uniquely, checksumming can detect errors in the data itself. Silent data corruption, sometimes referred to as bitrot, is more common that most people realize. Without active validation, corruption can end up propagating to all available backups. This leaves the user with no valid copies. By transparently checksumming all data, Btrfs is able to immediately detect any such corruption. Enabling the right dup or raid option allows the file system to transparently fix the corruption as well.
An excerpt:
By default, openSUSE is set up using Btrfs and snapshots for the root partition. Snapshots allow you to easily roll back your system if needed after applying updates, or to back up files.
If I understand what I've read so far, BRTFS will create backups of the system regularly without user intervention by taking snapshots, so they don't have/need to install some 3rd party app like Timeshift, luckybackup and the likes to take care of that, is that correct? Or am I missing something there? Again, if I'm understanding that correctly, it is something like WSCS(Windows Shadow Copy Service)which takes care of basically the same thing; taking snapshots of the OS regularly and saving those, so users can restore it to a previous working point when needed, am I getting this right? Thanks in advance to those taking the time to read and answer this. All your input and opinions are much appreciated! :)
 
Last edited:


KGIII

Super Moderator
Staff member
Gold Supporter
Credits
16,022
You may be interested in 'tuning' it. I have no experience doing so, but I've seen tons of articles about it over the past few years. So, the data is out there.

You may also be interested in this:


(Pay attention to the top of the images, often *more* is better and sometimes *less* is better.)

I guess the choice is really if the potential benefits outweigh the performance hits. I don't think that's a decision anyone can make but you.

I'm also not sure how much benefit you'll really see in a VM. It's a virtualized drive still hosted on whatever format the underlying drive has. I have absolutely no idea how that's gonna work in the end. So, I'd be curious about your findings.
 

f33dm3bits

Gold Member
Gold Supporter
Credits
16,431
I don't see the advantage for myself running it on my desktop, since I store all my data on my nas and make daily backup of the important stuff. With a rolling release distribution if something breaks 9/10 times there will be another update the same day to fix the issue, so no need to roll back and if it's a specific package I can just downgrade to the previous version for the time being until the next updated fixes it.
 

Tolkem

Well-Known Member
Credits
5,457
You may also be interested in this:
I did see a similar one here Btrfs Mount Option Benchmarks With The Linux 4.9 Kernel - Phoronix but couldn't really understand much of it, besides, the system those benchmarks were made are way higher than those of my relative low specs machine, so I don't know if they are of much help to me.

I'm also not sure how much benefit you'll really see in a VM. It's a virtualized drive still hosted on whatever format the underlying drive has.
Yeah, I know.
With a rolling release distribution if something breaks 9/10 times there will be another update the same day to fix the issue, so no need to roll back and if it's a specific package I can just downgrade to the previous version for the time being until the next updated fixes it.
Good point. Didn't think about it, however, as stated here https://btrfs.wiki.kernel.org/index.php/Getting_started
btrfs is a fast-moving target. There are typically a great many bug fixes and enhancements between one kernel release and the next. Therefore:
If you have btrfs filesystems, use a Linux distribution which supports btrfs or run the latest kernel.
So I'm not entirely sure a rolling-release + brtfs isn't just the right combination.
 

Tolkem

Well-Known Member
Credits
5,457
So I installed openSUSE Leap 15.2, use brtfs as the FS, and it's working great :). It's been only 2 days so I can't yet give any mayor info regarding performance vs ext4, but I'll be testing and comparing things like file transfer speed and stuff like that. On a side note, Google did fulfill its promise; No sync in chromium. I just installed it and tried to sync but I couldn't, there's not even the option to do so. Fortunately, I have my chromium profile saved in my USB drive from my Debian backup, so I just copied that and problem solved. I'll update once I have some results to show. :)
 

KGIII

Super Moderator
Staff member
Gold Supporter
Credits
16,022
Sync hasn't worked (here) in Chromium for like years. It has opened and said some APIs were missing so some functionality is missing at the top and then not let me sync or even login. This is the Chromium packaged in the PPA and used in the Ubuntu family. (The saiarcot895 PPA.)

The importing the profile manually is how I do it. Sometimes it'll ask you about importing the profile at the first start but that has never failed me. (Which is good. I use different browsers for different tasks.)
 

Tolkem

Well-Known Member
Credits
5,457
Sync hasn't worked (here) in Chromium for like years.
It used to worked for me until now. Oh well, I've starting using Firefox too since the day I found out about the changes Google was about to make, that being said, I still prefer chromium. Guess I'll have to "treasure" that profile from now on if I want to keep my data.
 

Tolkem

Well-Known Member
Credits
5,457
While in this btrfs journey, I've been reading a lot of stuff, here are a couple of good reads on the topic, quite informative:
 

Tolkem

Well-Known Member
Credits
5,457
It's been two weeks since I installed openSUSE with BTRFS. So far, so good. Apart from running atop to check disk activity, I haven't really done much testing or benchmarking which was my initial intent.
Both FS, EXT4 and BTRFS showed similar results with atop
openSUSE

atop-opensuse.png


Debian Testing/Bullseye

atop-bullseye.png


The relevant info is highlighted in red. I ran this while both systems were pretty much in idle, only konsole, dolphin, conky and ksnip were running. As can be seen in the pics, disk activity is pretty much the same, with BRTFS being a little more busy. Although, I took other and BTRFS was really busy, then I learned that two maintenance processes btrfs-transacti and btrfs-cleaner were running, what they do is all explained here https://btrfs.wiki.kernel.org/index.php/Gotchas these two processes seem to run once a week, at least here, and when they do the system becomes very busy and can't do pretty much anything for about 2-3 minutes, maybe 5 ... so it's a "gotcha" but other than that it runs quite well when they're not running and in fact, the system feels very snappy and responsive. I plan to install phoronix test suite http://www.phoronix-test-suite.com/ and run a couple of tests; I'm more interested in applications startup time and read/write rate speed. I don't know exactly how much can influence the results the OSes; different libraries, different kernel, different desktop versions ... speaking of which, I upgraded KDE in Bullseye using Norbert Preining's OBS repos https://www.preining.info/blog/2021/02/debian-kde-plasma-status-2021-02-18/ and now it's 5.21.3. openSUSE's is 5.18.6. Check it out

Bullseye

bullseye-kde.png


openSUSE Leap 15.2

opensuse-kde.png


I'm not a fan of the new "windows10-like" menu in 5.21, however, the extra space for favorites is kind of nice, but kickoff is a lot easier to navigate ... maybe I just need to play a bit more with it ;)

Well, this is all for now. Will update this once I have those results from phoronix test suite. :)
 

Tolkem

Well-Known Member
Credits
5,457
I haven't installed PTS so no benchmarks yet, what I did do was use the restore from a snapshot feature, and it works like a charm. I used it to solve an issue and it worked. The most interesting about this feature is not only the fact that it works, but also that you can boot into the desired snapshot in read-mode only, so you can check whether it solves whatever it is you want to solve, if it doesn't, you can reboot, select another one and repeat the process, I tried 3 before getting to the right one, then I launched konsole and ran as root
Code:
snapper rollback
, rebooted and everything worked as expected. I don't know if this is an openSUSE only feature, probably not but, grub shows the option to boot into snapshots, it's the last option, that's how I did it. You can also use snapper either via CLI or GUI using the yast module and restore specific files only selecting them by hand without having to boot to a snapshot, but I wasn't sure which files to restore, so I just went with a full snapshot. I think this gives BTFRS an edge over ext4, sure, you can install tools like timeshift and make snapshots, but you can't just boot them and see whether they work or not, most of the time they do but I've read they may fail as well leaving the users with no option but to reinstall their entire systems again. Not even Windows restore feature can do this. I also installed sysprof, http://www.sysprof.com/ both in openSUSE - though I'll have to re-install now - and in Bullseye. I learned about it while trying Gnome 40, in openSUSE Tumbleweed, it's also available in fedora and Gnome nightly, but I downloaded that one, it's a smaller .iso :)

gnome40-TW.png


In my next update to this I will post some snapshots screenshots of sysprof results so you guys can take a look at them. It's a nice tool.
 
Last edited:

f33dm3bits

Gold Member
Gold Supporter
Credits
16,431
I might try it at some point probably, will see how far the progression is by the time I buy my next system which will be at least a couple of years.
 

dos2unix

Well-Known Member
Credits
3,599
I've been btrfs of a number of systems for about 6 months now.
It's the default filesystem on Fedora 33 workstation (but not server)
Fedora 34 now has a "transparent compression" built into btrfs.
This uses less room, and less bytes to read and write to disk (supposedly equals longer disk life)

If I understand what I've read so far, BRTFS will create backups of the system regularly without user intervention by taking snapshots, so they don't have/need to install some 3rd party app like Timeshift, luckybackup and the likes to take care of that, is that correct?
Well none of mine do, unless it's hidden or documented somewhere. Besides where would you backup 1 2TB filesystem on a 2TB drive. However it does use a b-tree checksum integrity algorithm.
So perhaps that's what it means by making a backup (at the bit level).

It's not as fast as JFS or XFS, but it's favorable to EXT4.
 

Tolkem

Well-Known Member
Credits
5,457
So perhaps that's what it means by making a backup (at the bit level).
Yeah well, I was confused about the whole "backup" concept, what it does is create snapshopts of the system, though I'm not sure exactly about how it is used in Fedora when compared to openSUSE, the latter ships with snapper which handles the whole snapshot process. You might want to read here https://fedoraproject.org/wiki/Changes/BtrfsByDefault and here https://dev.to/franute/fedora-33-btrfs-snapshots-37ig If you install snapper or if it's already installed, check whether grub2-snapper-plugin is installed too, if it's not, install it. This pkg will allow you to select from available snapshots and boot it in read-only mode from grub, so you can test whether it can solve a problem.
It's not as fast as JFS or XFS, but it's favorable to EXT4.
I haven't used any of those but yeah, I too think it has an edge over ext4. I'm still figuring out a few things, but overall it's been a nice experience so far.
 
Last edited:

dos2unix

Well-Known Member
Credits
3,599
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Members online


Top