archlinux / archinstall

Arch Linux installer - guided, templates etc.
GNU General Public License v3.0
5.82k stars 509 forks source link

Use `block group tree` for btrfs volumes on HDDs larger than 2TB #2455

Open C0rn3j opened 2 months ago

C0rn3j commented 2 months ago

Enable a dedicated b-tree for block group items, this greatly reduces mount time for large filesystems due to better data locality that avoids seeking. On rotational devices the large size is considered starting from the 2-4TiB. Can be used on other types of devices (SSD, NVMe, …) as well.

With Linux 6.1(2022-12), btrfs gained a block-group-tree feature, which greatly reduces mount times on large HDDs.
It shrinked my mount times from 30s+ to less than a second.

I would consider asking users creating btrfs volumes on HDDs larger than 2TB if they want to enable this, or just outright do it for them because the difference is that large.

I presume btrfs will enable this by default at some point in the future, but until then it would be nice if archinstall took care of it.