From: Paul Richards <paul.richards@gmail.com>
To: dsterba@suse.cz, Paul Richards <paul.richards@gmail.com>,
linux-btrfs@vger.kernel.org
Subject: Re: Does balance implicitly defrag?
Date: Mon, 8 Jul 2013 22:30:38 +0100 [thread overview]
Message-ID: <CAMosweiZA75aN6--GdZqbTmg3HeaFGY8K+QUfJQZzopQhb_qfg@mail.gmail.com> (raw)
In-Reply-To: <20130708211208.GF18204@twin.jikos.cz>
On 8 July 2013 22:12, David Sterba <dsterba@suse.cz> wrote:
> On Tue, Jul 02, 2013 at 02:28:25PM +0100, Paul Richards wrote:
>> When I run "btrfs filesystem balance", does this implicitly
>> defragment the filesystem? (Assuming there is plenty free space)
>
> In some sense it defragments the filesystem. The blockgroups are moved
> around based on the balance filter. Here a blockgroup consists of
> various and unrelated file extents. Extents representing a single file
> are not made contiguous, this is done by 'btrfs file defrag'.
>
> I think that the final layout of the 1G-chunks is not necessarily
> contiguous, ie. it depends on the chunk-allocator, the time of the
> allocation request and there's nothing like "preallocate 30G for whole
> balance and put all data together because the space is available".
>
Okay, I think I understand. It sounds like balance will fix external
fragmentation (within the block groups, up to the 1G-chunk
granularity), and will not fix any internal fragmentation.
Thanks. :)
--
Paul Richards
@pauldoo
prev parent reply other threads:[~2013-07-08 21:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-02 13:28 Does balance implicitly defrag? Paul Richards
2013-07-08 21:12 ` David Sterba
2013-07-08 21:30 ` Paul Richards [this message]
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=CAMosweiZA75aN6--GdZqbTmg3HeaFGY8K+QUfJQZzopQhb_qfg@mail.gmail.com \
--to=paul.richards@gmail.com \
--cc=dsterba@suse.cz \
--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).