linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: linux-fsdevel@vger.kernel.org
Cc: Andreas Dilger <adilger@clusterfs.com>
Subject: Re: Ext2/3 block remapping tool
Date: Mon, 30 Apr 2007 12:12:30 +0200	[thread overview]
Message-ID: <20070430101230.GE28367@duck.suse.cz> (raw)
In-Reply-To: <20070427180942.GB5967@schatzie.adilger.int>

On Fri 27-04-07 12:09:42, Andreas Dilger wrote:
> On Apr 26, 2007  21:29 +0200, Jan Kara wrote:
> >   I've been lately playing with remapping ext2/ext3 blocks (especially how
> > much it can give us in terms of speed of things like KDE start). For that
> > I've written two simple tools (you can get them from
> > ftp.suse.com/pub/people/jack/ext3remapper.tar.gz):
> >   e2block2file to transform (preparsed) output from blktrace into a list
> > of accessed files and offsets accessed
> >   e2remapblocks to use output from e2block2file and remap blocks into big
> > chunks in the order in which they were accessed.
> 
> Does it map the whole file contiguously, or does it interleave blocks of the
> file in the order they are accessed?  I would hope that it maps the whole
> file contiguously, and let readahead work properly to fetch the whole file.
> Also, keeping the file contiguous avoids fragmentation later if that file is
> updated, deleted, etc, and conflicts with allocator/defrag/etc.
  No, it does interleave blocks of different files. Reading the whole file
is exactly what you often don't want. During startup KDE (which was my
benchmark) accesses basically two things: shared libraries and config files / icons.
Config files and icons usually fit into a single block so just mapping them
in the right order close together is fine. On the other hand, shared
libraries are large and you usually need just a few blocks scattered all
over them. So here we just remap those few blocks we need...
  I see the downsides of this approach. If the file is rewritten, you
loose the tight packing, but this is not going to happen often. I'm more
seriously concerned about the possibility, that this optimizatiom of
startup time may hurt running performace or more probably performance of
other apps...

> >   (see README in the tools archive for more details)
> > 
> >   So far the tools (especially e2remapblocks ;) work on unmounted
> > filesystem. The ultimate goal is to be able to do similar things for
> > mounted filesystems but I wanted to see whether block remapping is worth it
> > and what kernel interfaces would be useful for achieving the goal.
> 
> I'd prefer that such functionality be integrated with Takashi's online
> defrag tool, since it needs virtually the same functionality.  For that
  Yes, definitely these two have quite similar needs and I'd like to have
just one tool in the end.

> matter, this is also very similar to the block-mapped -> extents tool
> from Aneesh.  It doesn't make sense to have so many separate tools for
> users, especially if they start interfering with each other (i.e. defrag
> undoes the remapping done by your tool).
  Agreed.

								Honza
-- 
Jan Kara <jack@suse.cz>
SuSE CR Labs

  reply	other threads:[~2007-04-30 10:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-26 19:29 Ext2/3 block remapping tool Jan Kara
2007-04-27 18:09 ` Andreas Dilger
2007-04-30 10:12   ` Jan Kara [this message]
2007-04-30 12:09   ` Theodore Tso
2007-04-30 12:29     ` Jan Kara
2007-05-01  6:01     ` Andreas Dilger
2007-05-01 15:28       ` Theodore Tso
2007-05-01 18:52         ` Andreas Dilger
2007-05-01 22:18           ` Theodore Tso

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=20070430101230.GE28367@duck.suse.cz \
    --to=jack@suse.cz \
    --cc=adilger@clusterfs.com \
    --cc=linux-fsdevel@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).