linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Freemyer <greg.freemyer@gmail.com>
To: Kazuya Mio <k-mio@sx.jp.nec.com>
Cc: Andreas Dilger <aedilger@gmail.com>,
	Eric Sandeen <sandeen@redhat.com>, "Ted Ts'o" <tytso@mit.edu>,
	ext4 <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH 01/11 RESEND] libe2p: Add new function get_fragment_score()
Date: Thu, 23 Jun 2011 07:27:13 -0400	[thread overview]
Message-ID: <BANLkTin4G1ERu+mfgf_9KFZNXtDd2kuYFg@mail.gmail.com> (raw)
In-Reply-To: <BANLkTinvConLV08CkaTSBOhM=2HFwF0wnw@mail.gmail.com>

On Thu, Jun 23, 2011 at 7:16 AM, Greg Freemyer <greg.freemyer@gmail.com> wrote:
> On Tue, Jun 21, 2011 at 7:28 AM, Kazuya Mio <k-mio@sx.jp.nec.com> wrote:
>> 2011/06/18 16:19, Andreas Dilger wrote:
>>>
>>> I was thinking about this, and am wondering if it makes sense to have an
>>> absolute score for fragmentation
>>> instead of a relative one?
>>>
>>> By absolute I mean something like fragments per MB or similar. A bad score
>>> might be anything>  1. For
>>> files smaller than 1 MB in size it would scale the ratio to the equivalent
>>> if the file was 1MB in size
>>> (e.g. a 16kB file with 4 fragments would have a score of 256, which is
>>> clearly bad).  Large files can
>>> have a score much less than 1, which is good.
>>
>> I think fragments per MB is easy to understand. I will fix the library
>> function
>> to "double e2p_get_fragscore(int fd)". To return fragments per MB, it will
>> get the number of extents and the total length of extents except the
>> following
>> special cases:
>> - The extent whose initialize status is different from the next extent
>> - There is a hole between the extent and the next extent
>> - The extent is a tail
>
> For a sparse file, can you explain why you treat the head and tail
> extents of a block group differently?
>
> The issue is totally symetric in my mind, so either include both or
> exclude both in my opinion.  The above description only excludes the
> block group tail extents.
>
> Greg

I forgot to say, fragments per MB is not a large enough unit in my mind.

A storage system that can transfer 100MB / sec , but takes 5 msecs to
seek and do a half rotation of the platter would spend 33% of its time
seeking if it had 1MB contiguous sections of data all over the drive.

Fragments per max extent really seems the only logical thng for
e4defrag to use in my mind.

Greg
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2011-06-23 11:27 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 [this message]
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
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=BANLkTin4G1ERu+mfgf_9KFZNXtDd2kuYFg@mail.gmail.com \
    --to=greg.freemyer@gmail.com \
    --cc=aedilger@gmail.com \
    --cc=k-mio@sx.jp.nec.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sandeen@redhat.com \
    --cc=tytso@mit.edu \
    /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).