All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: Curt Wohlgemuth <curtw@google.com>
Cc: Xiang Wang <xiangw@google.com>, linux-ext4@vger.kernel.org
Subject: Re: Using O_DIRECT in ext4
Date: Tue, 21 Jul 2009 11:38:11 -0500	[thread overview]
Message-ID: <4A65EEF3.9090507@redhat.com> (raw)
In-Reply-To: <6601abe90907210745k3730f74dq62f1fe6539722b4d@mail.gmail.com>

Curt Wohlgemuth wrote:
> On Mon, Jul 20, 2009 at 8:41 PM, Eric Sandeen<sandeen@redhat.com> wrote:
>> Xiang Wang wrote:

>>> For comparison, I did the same experiment on an ext2 partition,
>>> resulting in each file having only 1 extent.
>> Interestinng, not sure I would have expected that.
> 
> Same with us; we're looking into more variables to understand it.

To be more clear, I would not have expected ext2 to deal well with it
either, is more what I meant ;)  I'm not terribly surprised that ext4
gets fragmented.

For the numbers posted, how big were the files (how many 1m chunks were
written?)

Just FWIW; I did something like:

# for I in `seq 1 16`; do dd if=/dev/zero of=testfile$I bs=1M count=16
oflag=direct & done

on a rhel5.4 beta kernel and got:

~5 extents per file on ext4 (per filefrag output)
between 41 and 234 extents on ext2.
~6 extents per file on ext3.
~16 extents per file on xfs

if I created a subdir for each file:

# for I in `seq 1 16`; do mkdir dir$I; dd if=/dev/zero
of=dir$I/testfile$I bs=1M count=16 oflag=direct & done

~5 extents per file on ext4
1 or 2 extents per file on ext2
1 or 2 extents per file on ext3
~16 extents per file on xfs.

-Eric

  reply	other threads:[~2009-07-21 16:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-21  1:41 Using O_DIRECT in ext4 Xiang Wang
2009-07-21  3:41 ` Eric Sandeen
2009-07-21 14:45   ` Curt Wohlgemuth
2009-07-21 16:38     ` Eric Sandeen [this message]
2009-07-21 20:46       ` Xiang Wang
2009-07-21 21:08       ` Frank Mayhar
2009-07-21 23:46         ` Mingming Cao

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=4A65EEF3.9090507@redhat.com \
    --to=sandeen@redhat.com \
    --cc=curtw@google.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=xiangw@google.com \
    /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.