Skip to contentSkip to conversation

User feedback: raise the default leaf size to 16k

DISCUSSION Holger Hoffstaette 3 participants 3 messages Feb 13, 2013 – Mar 3, 2013 Btrfs file system

lore
Share & tools
lore
#0 lore raw

Hi,

after using btrfs with 3.7.x and default settings without any problems so far (knock on wood!) I had to redo a 1TB filesystem and this time decided to try two small changes:

- raise the leaf size to 16k
- use single metadata profile

After restoring the contents (~300GB, mix of large and small files) the difference in behaviour on a single disk is *very* noticeable. Therefore I want to suggest changing the default values accordingly. IMHO the new behaviour - maybe including the single metadata redundancy - is much more in line with behaviour that people expect out of the box. I believe many cases where users report degrading performance over time can be attributed to this. Whether single metadata is too much of a risk I cannot judge, but please at least raise the default leaf size.

Just my 0.01€ of user feedback :)

thanks
Holger

#1 lore raw
Quoted 6 lines · Holger Hoffstaette

- raise the leaf size to 16k
- use single metadata profile

...

the difference in behaviour on a single disk is *very* noticeable.

Did you try an isolated change of leaf size? I think the devs would be willing to look into the default size if it makes a dramatic difference on its own. Personally I think you are seeing an improvement more as a result of the metadata profile rather than the leafsize.

I don't think changing the default profile for metadata will be easily entertained as this is very important for protecting against corruption due to bitrot.

Signature · 4 lines
__________
Brendan Hide
http://swiftspirit.co.za/
http://www.webafrica.co.za/?AFF1E97
#2 lore raw
Quoted 7 lines · Brendan Hide
Quoted 6 lines · Holger Hoffstaette

- raise the leaf size to 16k
- use single metadata profile

...

the difference in behaviour on a single disk is *very* noticeable.

Quoted 8 lines

Did you try an isolated change of leaf size? I think the devs would be willing to look into the default size if it makes a dramatic difference on its own. Personally I think you are seeing an improvement more as a result of the metadata profile rather than the leafsize.

I don't think changing the default profile for metadata will be easily entertained as this is very important for protecting against corruption due to bitrot.

The long term plan is to set the default size to 16K, since this does cut down on metadata fragmentation. But in some benchmarks, it adds lock contention because we have fewer blocks to spread the locks over.

The 3.9 merge window has fixes for lock contention, so I need to benchmark things again.

-chris