All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <josef@toxicpanda.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>,
	linux-btrfs@vger.kernel.org, kernel-team@fb.com,
	chris@colorremedies.com
Subject: Re: [RFC][PATCH] btrfs: add an autodefrag property
Date: Fri, 17 Jul 2020 19:58:11 -0400	[thread overview]
Message-ID: <99682fa7-4ba6-48df-60a7-a8eaa453419a@toxicpanda.com> (raw)
In-Reply-To: <c9b9d2f6-8e2c-01c2-193f-8f589134d39f@gmx.com>

On 7/17/20 7:46 PM, Qu Wenruo wrote:
> 
> 
> On 2020/7/18 上午4:42, Josef Bacik wrote:
>> Autodefrag is very useful for somethings, like the 9000 sqllite files
>> that Firefox uses, but is way less useful for virt images.
>> Unfortunately this is only available currently as a whole mount option.
>> Fix this by adding an "autodefrag" property, that users can set on a per
>> file or per directory basis.  Thus allowing them to control where
>> exactly the extra write activity is going to occur.
>>
>> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
>> ---
>> - This is an RFC because I want to make sure we're ok with this before I go and
>>    add btrfs-progs support for this.  I'm not married to the name or the value,
>>    but I think the core goal is valuable.
> 
> The idea looks pretty good to me.
> 
> Although it would be much more convincing to bring some real-world micro
> bench to show the benefit.
> 

The same benefit as what existed originally for autodefrag, firefox isn't 
unusably slow on spinning rust.

> 
> However I still have a concern related to defrag.
> Since it's on-disk flag, thus can be inherited by snapshot, then what
> would happen if an auto-defrag inode get snapshotted.
> 
> Would any write to the auto-defrag inode in new snapshot break the space
> saving?
Sure but that's the case for all defrag, and this is in fact better than mount 
-o autodefrag because you can limit the damage.  Thanks,

Josef

  reply	other threads:[~2020-07-17 23:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-17 20:42 [RFC][PATCH] btrfs: add an autodefrag property Josef Bacik
2020-07-17 23:46 ` Qu Wenruo
2020-07-17 23:58   ` Josef Bacik [this message]
2020-07-18  0:03     ` Qu Wenruo
2020-07-18  7:46 ` Nikolay Borisov
2020-07-19 14:54 ` Igor Raits

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=99682fa7-4ba6-48df-60a7-a8eaa453419a@toxicpanda.com \
    --to=josef@toxicpanda.com \
    --cc=chris@colorremedies.com \
    --cc=kernel-team@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.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.