All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Mitch Harder <mitch.harder@sabayonlinux.org>
Cc: linux-btrfs@vger.kernel.org, zab@redhat.com
Subject: Re: [RFC] Btrfs: Allow the compressed extent size limit to be modified v2
Date: Fri, 8 Feb 2013 15:53:07 +0100	[thread overview]
Message-ID: <20130208145307.GF12339@twin.jikos.cz> (raw)
In-Reply-To: <CAKcLGm_z+bMYtBZYvQYRXrPVHxEfrnfaVNPo8=qeKb3JSUOgiw@mail.gmail.com>

On Thu, Feb 07, 2013 at 11:17:46PM -0600, Mitch Harder wrote:
> On Thu, Feb 7, 2013 at 6:28 PM, David Sterba <dave@jikos.cz> wrote:
> > On Thu, Feb 07, 2013 at 03:38:34PM -0600, Mitch Harder wrote:
> >> --- a/fs/btrfs/relocation.c
> >> +++ b/fs/btrfs/relocation.c
> >> @@ -144,7 +144,7 @@ struct tree_block {
> >>       unsigned int key_ready:1;
> >>  };
> >>
> >> -#define MAX_EXTENTS 128
> >> +#define MAX_EXTENTS 512
> >
> > Is this really related to compression? IIRC I've seen it only in context
> > of batch work in reloc, but not anywhere near compression. (I may be
> > wrong of course, just checking).
> >
> 
> When you defragment compressed extents, it will run through relocation.
>
> If autodefrag is enabled, I found most everything I touched was
> running through relocation.

AFAIK defragmentation runs through the writeback loop, blocks are marked
dirty, delalloc tries to make them contiguous and then synced back to
disk. Autodefrag uses the same loop, just affects newly written data.

> It has been a while since I looked at the issue, but I think balancing
> your data will also run through relocation.

Balance does go through reloc for sure.

>From the commit that introduces MAX_EXTENTS it's imo quite clear that
it's only a balance speedup:

(0257bb82d21bedff26541bcf12f1461c23f9ed61)
Btrfs: relocate file extents in clusters

The extent relocation code copy file extents one by one when
relocating data block group. This is inefficient if file
extents are small. This patch makes the relocation code copy
file extents in clusters. So we can can make better use of
read-ahead.
---

david

  reply	other threads:[~2013-02-08 14:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-07 21:38 [RFC] Btrfs: Allow the compressed extent size limit to be modified v2 Mitch Harder
2013-02-07 22:18 ` Zach Brown
2013-02-08  0:28 ` David Sterba
2013-02-08  5:17   ` Mitch Harder
2013-02-08 14:53     ` David Sterba [this message]
2013-02-08 15:13       ` Mitch Harder
2013-02-20 12:59 ` David Sterba
2013-02-20 14:20 ` Liu Bo
2013-02-26 18:12 ` David Sterba

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=20130208145307.GF12339@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=mitch.harder@sabayonlinux.org \
    --cc=zab@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.