All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ted Ts'o <tytso@mit.edu>
To: Kazuya Mio <k-mio@sx.jp.nec.com>
Cc: ext4 <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH 01/11 RESEND] libe2p: Add new function get_fragment_score()
Date: Tue, 21 Jun 2011 09:56:08 -0400	[thread overview]
Message-ID: <20110621135608.GG32133@thunk.org> (raw)
In-Reply-To: <4E007FE1.8000704@sx.jp.nec.com>

On Tue, Jun 21, 2011 at 08:26:25PM +0900, Kazuya Mio wrote:
> 
> I decided to implement a fragmentation score for the two purposes:
> one is for filefrag that outputs the score to decide which files should be
> defragmented, and the other is for e4defrag that compares two files'
> fragmentation to prevent the worse fragmentation.

I'm really nervous about having filefrag print a "fragmentation
score".  The problem is that the problem is invariably far more
complex than can be boiled into a single number, and so users look at
it and start worrying when they shouldn't.

And the statement, "so that e4defrag can compare two files'
fragmentation to prevent the worse fragmentation" begs the question of
what is "worse".  The real issue here is that it's a multidimensional
problem.

> Certainly, the same fragmentation score doesn't always mean the same
> fragmentation. Just as Andreas said, "fragments per MB" is a good idea. It's
> easy to understand, and other filesystem also would be able to use it without
> change. Moreover, there is no worry about what threshold we use to
> the application.

"fragments per megabyte" is definitely better, especially if you
disregard the tail.  It's worth consider how it works for files
smaller than a megabyte.  Do you round the file size up to the nearest
megabyte?  Is it an integer score, or does it need to be floating
point?  An integer score where the size is rounded up to the nearest
megabyte sounds like a best plan, but I'm sure we could still find
some interesting non-linearities that lead to surprising results.

	      	    	    	      	   - Ted

  reply	other threads:[~2011-06-21 13:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-15  6:33 [PATCH 01/11 RESEND] libe2p: Add new function get_fragment_score() Kazuya Mio
2011-06-16  3:06 ` Andreas Dilger
2011-06-17  3:01   ` Kazuya Mio
2011-06-17  3:18 ` Ted Ts'o
2011-06-17 14:20   ` Eric Sandeen
2011-06-18  7:19     ` Andreas Dilger
2011-06-18 17:00       ` Greg Freemyer
2011-06-18 17:15         ` Andreas Dilger
2011-06-21 11:28       ` Kazuya Mio
2011-06-23 11:16         ` Greg Freemyer
2011-06-23 11:27           ` Greg Freemyer
2011-06-24  8:28           ` Kazuya Mio
2011-06-26  2:16             ` Greg Freemyer
2011-06-28 10:21               ` Kazuya Mio
2011-06-28 13:53                 ` Greg Freemyer
2011-07-01  8:34                   ` Kazuya Mio
2011-07-07 10:40                   ` Kazuya Mio
2011-06-21 11:26   ` Kazuya Mio
2011-06-21 13:56     ` Ted Ts'o [this message]
2011-06-23  8:00       ` Kazuya Mio
2011-06-19 19:55 ` Greg Freemyer

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=20110621135608.GG32133@thunk.org \
    --to=tytso@mit.edu \
    --cc=k-mio@sx.jp.nec.com \
    --cc=linux-ext4@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 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.