linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Tso <tytso@mit.edu>
To: Curt Wohlgemuth <curtw@google.com>
Cc: Andreas Dilger <adilger@sun.com>,
	ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: Question on block group allocation
Date: Wed, 29 Apr 2009 15:37:44 -0400	[thread overview]
Message-ID: <20090429193744.GA17797@mit.edu> (raw)
In-Reply-To: <20090429191646.GF14264@mit.edu> <6601abe90904291138r6e24c04dj4b2efcdba22bf84@mail.gmail.com>

On Wed, Apr 29, 2009 at 03:16:47PM -0400, Theodore Tso wrote:
> 
> When you have a chance, can you send out the details from your test run?
> 

Oops, sorry, our two e-mails overlapped.  Sorry, I didn't see your new
e-mail when I sent my ping-o-gram.

On Wed, Apr 29, 2009 at 11:38:49AM -0700, Curt Wohlgemuth wrote:
> 
> Okay, my phrasing was not as precise as it could have been.  What I
> meant by "total fragmentation" was simply that the range of physical
> blocks for the 10GB file was much lower with Andreas' patch:
> 
> Before patch:  8282112 - 103266303
> After patch: 271360 - 5074943
> 
> The number of extents is much larger.  See the attached debugfs output.

Ah, OK.  You didn't attach the "e2fsck -E fragcheck" output, but I'm
going to guess that the blocks for 10g, 4g, and 4g-2 ended up getting
interleaved, possibly because they were written in parallel, and not
one after each other?  Each of the extents in the "after" debugfs were
proximately 2k blocks (8 megabytes) in length, and are separated by a
largish cnumber of blocks.  

Now, if my theory that the files were written in an interleaved
fashion is correct, if it is also true that they will be read in an
interleaved pattern, the layout on disk might actually be the best
one.  If however they are going to be read sequentially, and you
really want them to be allocated contiguously, then if you know what
the final size of these files will be, then the probably the best
thing to do is to use the fallocate system call.

Does that make sense?

					- Ted

  reply	other threads:[~2009-04-29 19:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-23 16:41 Question on block group allocation Curt Wohlgemuth
2009-04-23 19:08 ` Andreas Dilger
2009-04-23 22:02   ` Curt Wohlgemuth
2009-04-27  2:14     ` Theodore Tso
2009-04-27  5:29       ` Curt Wohlgemuth
2009-04-27 10:42         ` Theodore Tso
2009-04-27 22:40         ` Theodore Tso
2009-04-29 18:38           ` Curt Wohlgemuth
2009-04-29 19:37             ` Theodore Tso [this message]
2009-04-29 20:21               ` Curt Wohlgemuth
2009-04-29 21:20                 ` Theodore Tso
2009-04-29 21:50                   ` Theodore Tso
2009-04-29 22:29                     ` Curt Wohlgemuth
2009-05-01  4:39                       ` Theodore Tso
2009-05-04 15:52                   ` Curt Wohlgemuth
2009-04-29 19:16         ` Theodore Tso
2009-04-27 23:12   ` Andreas Dilger

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=20090429193744.GA17797@mit.edu \
    --to=tytso@mit.edu \
    --cc=adilger@sun.com \
    --cc=curtw@google.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;
as well as URLs for NNTP newsgroup(s).