OK, these are rather techy and filesystem related, but they do affect your desktop experience. IMHO, they should be enabled by default, but I think they still aren’t. (Please correct me if I’m wrong! )
You can use Fedora as a desktop user for a while before hitting these problems, but they’re there, lurking, if you use encryption (first section) or have large and/or relatively slow storage devices (second section).
Thankfully, some things like btrfs compression and zram are already enabled, as of a few Fedora releases ago. Both help with performance. (Compression takes a little bit of CPU, but it is optimized and speeds up writes to and reads from storage and is a great tradeoff. Zram generally “doubles” RAM by having a compressed swapfile in memory on-demand… It not only gives you the appearance of more available RAM, it also avoids hitting a much-slower swapfile on disk or having apps give up and crash.)
Discard/trim on SSD on LUKS (encryption)
One thing that made a gigantic difference for me was enabling trim. Without it, all writes would bog down the system, and the UI would feel super slow. But I had been using Silverblue for a while already before finding this out (the hard way).
I’m not sure if it’s still the case, but Silverblue (and perhaps Fedora Workstation too) doesn’t set up trim on SSDs by default when you use LUKS. There are a few ways to work around this; I used the following:
sudo cryptsetup --allow-discards --persistent refresh /dev/mapper/luks*
The alternative method I’m aware of is @ Speed up a LUKS-encrypted Fedora Silverblue by enabling TRIM | Notes where they use a kernel boot command attribute. (Which, in Silverblue, is modified using rpm-ostree kargs
by-the-way… no messing around with grub config files and commands, thankfully.)
If you’re not sure if you have the ability to use discard on SSD, you can run this and it’ll try to run trim and it’ll omit anything that doesn’t support it:
sudo fstrim -va
Additionally, Fedora has a fstrim timer. You can make sure it’s enabled with systemctl status fstrim.timer
. If it’s active, then that’s great. If not, then run sudo systemctl enable fstrim.timer
— but it’ll only actually trim devices that it can. (So you’d need to fix above if there’s an issue.) Having the timer enabled means you don’t have to run anything manually. I think having the timer on is default on Fedora, but it’ll basically do nothing without trim/discard support enabled for your SSD.
Block group tree for btrfs
The Linux kernel has had an block group tree for btrfs since 6.1. This lets btrfs devices mount more quickly. It probably matters the most with spinning disks and raid, but is likely beneficial for everything. While it’s a mkfs setting (and Anaconda should — but probably doesn’t yet — support it), you can convert existing btrfs partitions with a command like this (adjusted to the actual device instead of /dev/sdX
):
btrfstune --convert-to-block-group-tree /dev/sdX
(This can take a minute or two. It’s not a super long conversion, but it’s not instant.)
For my use with 2 spinning disks in btrfs raid1, it changed the mount time from about half a minute to just a second or two. It probably won’t be that dramatic for most storage for most people, however.