From: Mingming Cao <cmm@us.ibm.com>
To: Frank Mayhar <fmayhar@google.com>
Cc: Eric Sandeen <sandeen@redhat.com>,
Curt Wohlgemuth <curtw@google.com>,
Xiang Wang <xiangw@google.com>,
linux-ext4@vger.kernel.org
Subject: Re: Using O_DIRECT in ext4
Date: Tue, 21 Jul 2009 16:46:16 -0700 [thread overview]
Message-ID: <4A665348.7000802@us.ibm.com> (raw)
In-Reply-To: <1248210485.18500.2.camel@bobble.smo.corp.google.com>
Frank Mayhar wrote:
> On Tue, 2009-07-21 at 11:38 -0500, Eric Sandeen wrote:
>
>> 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.
>>
>
> Ext2 deals with it via the block reservation code added some time ago.
> It turns out it works pretty well for this case. Ext4, of course,
> doesn't use the block reservation code.
>
ext4 mballoc code use per cpu preallocation, so all threads running on
the same cpu which needs new blocks will be assign blocks next to each
other. This will makes files created by those threads interleave each
other as a result, causing fragmentation. Preallocation will help, but
that a persistant preallocation.
Mingming
prev parent reply other threads:[~2009-07-21 23:51 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
2009-07-21 20:46 ` Xiang Wang
2009-07-21 21:08 ` Frank Mayhar
2009-07-21 23:46 ` Mingming Cao [this message]
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=4A665348.7000802@us.ibm.com \
--to=cmm@us.ibm.com \
--cc=curtw@google.com \
--cc=fmayhar@google.com \
--cc=linux-ext4@vger.kernel.org \
--cc=sandeen@redhat.com \
--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 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).