linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: safe/necessary to balance system chunks?
Date: Sat, 26 Apr 2014 04:55:39 +0000 (UTC)	[thread overview]
Message-ID: <pan$e0a75$522b09ff$7d8fffd0$f0b99281@cox.net> (raw)
In-Reply-To: alpine.DEB.2.10.1404252035150.4873@cubia.leung

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


  parent reply	other threads:[~2014-04-26  4:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-25 14:57 safe/necessary to balance system chunks? Steve Leung
2014-04-25 17:24 ` Chris Murphy
2014-04-25 18:12   ` Austin S Hemmelgarn
2014-04-25 18:43     ` Steve Leung
2014-04-25 19:07       ` Austin S Hemmelgarn
2014-04-26  4:01         ` Duncan
2014-04-26  1:11       ` Duncan
2014-04-26  1:24       ` Chris Murphy
2014-04-26  2:56         ` Steve Leung
2014-04-26  4:05           ` Chris Murphy
2014-04-26  4:55           ` Duncan [this message]
2014-04-25 19:14     ` Hugo Mills
2014-06-19 11:32       ` Alex Lyakas
2014-04-25 23:03     ` Duncan
2014-04-26  1:41       ` Chris Murphy
2014-04-26  4:23         ` Duncan
2014-04-25 18:36   ` Steve Leung

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='pan$e0a75$522b09ff$7d8fffd0$f0b99281@cox.net' \
    --to=1i5t5.duncan@cox.net \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).