public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric <erpo41@gmail.com>
To: linux-ext4 <linux-ext4@vger.kernel.org>
Subject: Re: Online defragmentation and ext4migrate
Date: Fri, 18 May 2007 13:19:54 -0700	[thread overview]
Message-ID: <1179519594.6109.40.camel@eric-laptop> (raw)
In-Reply-To: <464DA4ED.9040408@linux.vnet.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 2299 bytes --]

On Fri, 2007-05-18 at 18:36 +0530, Aneesh Kumar K.V wrote:
> The reason why i am asking this is to understand the
> usefulness of doing a ext4migrate followed by defrag. 
> [...]
> Also looking at the version 0.4 I see that defrag ioctl only work if we 
> have EXT4_EXTENTS_FL flag set. 

ext4migrate is necessary because the current ext4 defrag routines will
only defragment files stored as extents. AFAIK, converting a file to
extents does not allow the defrag routine to defragment it "better" than
an indirect block map inode, but converting any file to extents has
performance benefits regardless of whether it is later defragmented.

> What are the plans for making defrag work 
> with indirect block map inode ?

I think there is a second set of patches to defragment non-extent
files. 

When I started investigating this topic, I would have preferred a defrag
routine for indirect block map inodes since it would work with the
filesystems that I and others are using right now. However, as I read
more code and documentation, I'm beginning to warm up to extents.

A defragmentation routine makes files contiguous on disk. A better
defragmentation routine intelligently locates data structures on the
disk so that files and directories are placed to minimize latency and
maximize throughput now, AND so that this will continue to happen in the
future. Typically this means not only making files contiguous, but also
consolidating free space at the end of the volume so that the block
allocator can pick contiguous blocks for new files. An even better
defragmentation routine knows how to balance the time lost to
defragmentation with the performance gained from a defragmented
filesystem. IMHO, this requires detailed knowledge of the layout of a
file's blocks on the disk. Right now, we get this information by looping
over the FIBMAP ioctl, which I understand can take quite a long time.
But on an extent file there is a logical, high-performance mapping
between the on-disk structures that keep track of which blocks belong to
which files and the data returned by the as-yet-to-be-implemented FIEMAP
ioctl, which could make defragging faster and more fun.

http://www.mail-archive.com/linux-ext4@vger.kernel.org/msg01434.html

Cheers,

Eric


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2007-05-18 20:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-18 13:06 Online defragmentation and ext4migrate Aneesh Kumar K.V
2007-05-18 20:19 ` Eric [this message]
2007-05-18 21:05   ` Andreas Dilger
2007-05-21  8:33   ` Aneesh Kumar
2007-05-21 10:42     ` Jan Kara
2007-05-21 10:25 ` Takashi Sato
2007-05-21 10:37   ` Aneesh Kumar K.V
2007-05-22  8:35     ` Takashi Sato
2007-05-21 10:38   ` Jan Kara
2007-05-21 13:36     ` Eric
2007-05-22 11:28       ` Jan Kara

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=1179519594.6109.40.camel@eric-laptop \
    --to=erpo41@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox