Steve Leung posted on Fri, 25 Apr 2014 20:56:06 -0600 as excerpted:

> Incidentally, is there a way for someone to tell what the node size
> currently is for a btrfs filesystem?  I never noticed that info printed
> anywhere from any of the btrfs utilities.

btrfs-show-super <device> displays that, among other relatively obscure 
information.  Look for node-size and leaf-size.  (Today they are labeled 
synonyms in the mkfs.btrfs manpage and should be set the same.  But if 
I'm remembering correctly, originally they could be set separately in 
mkfs.btrfs, and apparently had slightly different technical meaning.  Tho 
I don't believe actually setting them to different sizes was ever 
supported.)  

Sectorsize is also printed.  The only value actually supported for it, 
however, has always been the architecture's kernel page size, 4096 bytes 
for x86 in both 32- and 64-bit variants, and I'm told in arm as well.  
But there are other archs (including sparc, mips and s390) where it's 
different, and as the mkfs.btrfs manpage says, don't set it unless you 
plan on actually using the filesystem on a different arch.  There is, 
however, work to allow btrfs to use different sector-sizes, 2048 bytes to 
I believe 64 KiB, thus allowing a btrfs created on an arch with a 
different page size to at least work on other archs, even if it's never 
going to be horribly efficient.

The former default for all three settings was page size, 4096 bytes on 
x86, but node/leafsize were apparently merged at the same time their 
default was changed to 16 KiB, since that's more efficient for nearly all 
users.

What I've wondered, however, is if a 16K nodesize is more efficient than 
4K for nearly everyone, under what conditions might the even larger 32 KiB 
or even 64 KiB (the max) be even MORE efficient.

That I don't know, and anyway, I strongly suspect that being less tested, 
it might trigger more bugs anyway, and while I'm testing a still not 
entirely stable btrfs, I've not been /that/ interested in trying the more 
unusual stuff or in triggering more bugs than I might normally come 
across.

But someday curiosity might get the better of me and I might try it...

> In case anyone's wondering, I did balance the system chunks on my
> filesystem and "btrfs fi df" now looks normal.  So thanks to all for the
> hints and advice.

Heh, good to read. =:^)

Anyway, you provokes quite a discussion, and I think most of us learned 
something from it or at least thought about angles we'd not thought of 
before, so I'm glad you posted the questions. Challenged me, anyway! =:^)

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to