You are not logged in.

#1 2020-11-02 15:16:57

860lacov
Member
Registered: 2020-05-02
Posts: 497

Can I and should I change btrfs nodesize?

I like btrfs. My last posts were all about it.
Today I encounter interesting something interesting on Arch Wiki

The Btrfs default nodesize for metadata is 16KB, while the default sectorsize for data is equal to page size and autodetected. To use a larger nodesize for metadata (must be a multiple of sectorsize, up to 64KB is allowed), specify a value for the nodesize via the -n switch as shown in this example using 32KB blocks:

# mkfs.btrfs -L mylabel -n 32k /dev/partition

Note: According to mkfs.btrfs(8) §OPTIONS, "[a] smaller node size increases fragmentation but leads to taller b-trees which in turn leads to lower locking contention. Higher node sizes give better packing and less fragmentation at the cost of more expensive memory operations while updating the metadata blocks".

During system installation I formatted the disk with default btrfs settings. I used the latest Arch iso, so I assume that I'm in category:
mkfs.btrfs(8):

Note versions up to 3.11 set the nodesize to 4k.

So my default probably is 4k and not 16KB as Arch Wiki says




I have quite clean system. Fresh after pacstrap and ready to DE installation.

For general home use - usually photo editing, movies, maybe some games.
Should I reformat the disk with another nodesize?
How can I check what is my current nodesize on my disk?
Is possible to change it with the system on the disk?

Offline

Board footer

Powered by FluxBB