linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kai Krakow <hurikhan77@gmail.com>
To: linux-btrfs@vger.kernel.org
Subject: Re: btrfs seed question
Date: Fri, 3 Nov 2017 09:03:55 +0100	[thread overview]
Message-ID: <20171103090355.6c510e51@jupiter.sol.kaishome.de> (raw)
In-Reply-To: 20171012115020.070248a7@olive.ig.local

Am Thu, 12 Oct 2017 11:50:20 -0400
schrieb Joseph Dunn <jdunn14@gmail.com>:

> On Thu, 12 Oct 2017 16:30:36 +0100
> Chris Murphy <lists@colorremedies.com> wrote:
> 
> > On Thu, Oct 12, 2017 at 3:44 PM, Joseph Dunn <jdunn14@gmail.com>
> > wrote:  
> > > On Thu, 12 Oct 2017 15:32:24 +0100
> > > Chris Murphy <lists@colorremedies.com> wrote:
> > >    
>  [...]  
>  [...]  
>  [...]  
>  [...]  
>  [...]  
>  [...]  
>  [...]  
> > > Interesting thought.  I haven't tried working with multiple seeds
> > > but I'll see what that can do.  I will say that this approach
> > > would require more pre-planning meaning that the choice of fast
> > > files could not be made based on current access patterns to tasks
> > > at hand.  This might make sense for a core set of files, but it
> > > doesn't quite solve the whole problem.    
> > 
> > 
> > I think the use case really dictates a dynamic solution that's
> > smarter than either of the proposed ideas (mine or yours).
> > Basically you want something that recognizes slow vs fast storage,
> > and intelligently populates fast storage with frequently used files.
> > 
> > Ostensibly this is the realm of dmcache. But I can't tell you
> > whether dmcache or via LVM tools, if it's possible to set the
> > proper policy to make it work for your use case. And also I have no
> > idea how to set it up after the fact, on an already created file
> > system, rather than block devices.
> > 
> > The hot vs cold files thing, is something I thought the VFS folks
> > were looking into.
> >   
> As a consumer of the file system data I tend to see things at a file
> level rather than as blocks, but from a block level this does feel
> dmcache-ish and I'll look into it.
> 
> I did try the multiple seeds approach and correct me if I'm wrong, but
> once the files are deleted in the second seed they are no longer
> accessible in anything sprouted from that.  The fully dynamic solution
> would be nice, but I'm perfectly happy to pick the files for the ssd
> at run time, just not at file system preparation time.  In any case,
> I may fall back on inotify and overwriting file contents if I don't
> end up with a better solution using dmcache or LVM tricks.

Would "btrfs filesystem defrag" not rewrite files to local storage?

Using inotify, you could work with two queues "defrag" and "done". Add
files via inotify to the defrag queue unless it's already in one of the
queues. Then move it to the done queue while running defrag on each
files of the other queue.

You can then use the done queue as a seed for defrag queue on newly
provisioned systems.


-- 
Regards,
Kai

Replies to list-only preferred.


  reply	other threads:[~2017-11-03  8:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-12  0:47 btrfs seed question Joseph Dunn
2017-10-12  4:18 ` Anand Jain
2017-10-12 13:20   ` Joseph Dunn
2017-10-12 14:32     ` Chris Murphy
2017-10-12 14:44       ` Joseph Dunn
2017-10-12 15:30         ` Chris Murphy
2017-10-12 15:50           ` Joseph Dunn
2017-11-03  8:03             ` Kai Krakow [this message]
2017-10-12 15:55           ` Austin S. Hemmelgarn
2017-10-13  2:52         ` Anand Jain
2017-11-03  7:56     ` Kai Krakow

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=20171103090355.6c510e51@jupiter.sol.kaishome.de \
    --to=hurikhan77@gmail.com \
    --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).