Problem
Fedora uses BTRFS by default. This is a more complex filesystem than EXT4 or F2FS.
Supposedly, the performance decreases a lot if maintenance actions like scrub
and balance
are not ran for a long time.
Most users will never run these actions are there is nothing indicating the need. People dont read docs or “set calendar events to do a filesystem balance”.
Goal
BTRFS is the “click default install and go” option. Users should just install it and it should work.
This means that these technical actions should not need to be exposed to the users, but ran automatically.
Idea
I would like to create a change proposal, to run common BTRFS maintenance tasks on all Fedora variants using BTRFS.
These tasks take way less time and resources if they are ran every month.
Also, using scrub and balance is important to maintain performance.
Using systemd timers, priority setting etc, these can be fine tuned to run every month, with low priority.
The BTRFS task balance
runs in the background automatically, so it just needs to be initiated.
sudo btrfs balance start / --full-balance &
sudo btrfs scrub start / &
These actions should not be ran at once but with some offset.
defragment
may speed up performance on magnetical media (HDD, tape), but cause significant wear on flash drives (SDD, NVME, eMMC, SD). OR it may be beneficial, I am not sure what the correct info here is.
Prerequisites
The commands should run on /
fine, on Atomic and Traditional variants.
They should only run if BTRFS is used, if it is not used, the timers should be disabled.
Topics
Who would like to join making this possible for implementation in F41?
Updates
- BTRFS is better than EXT4 as it shows errors, misinterpreted as “having more errors”. It can automatically solve them, which this topic tries to do
- the
balance
andscrub
tasks work on Fedora Atomic Desktops, while others may not btrfsmaintenance
(link) is used on OpenSUSE, implements a lot of tasks and has configurable options- a majority of voters is:
- pro automatic instead of with a message
- pro monthly interval, instead of more frequently
- contra including
btrfs filesystem defragment
but probtrfs scrub
andbtrfs balance