From: tytso@mit.edu
To: Eric Sandeen <sandeen@redhat.com>
Cc: Daniel Taylor <Daniel.Taylor@wdc.com>, linux-ext4@vger.kernel.org
Subject: Re: inconsistent file placement
Date: Tue, 6 Jul 2010 18:01:01 -0400 [thread overview]
Message-ID: <20100706220101.GA6603@thunk.org> (raw)
In-Reply-To: <4C337D16.9000200@redhat.com>
On Tue, Jul 06, 2010 at 01:59:34PM -0500, Eric Sandeen wrote:
> However, from the test description it looks like it is writing
> a file to the root dir, so there should be no parent-dir random spreading,
> right?
Hmm, yes, I missed that part of Daniel's e-mail. He's just writing a
single file. In that case, Amir is right, the only thing which would
be causing this is the colour offset, at least for ext2 and ext3.
This is avoid fragmented files caused by two or more processes running
on different CPU's all writing into the same block group.
In the case of ext4, we don't use a pid-determined colour algorithm if
delayed allocation is used, and the randomness is caused by the
writeback system deciding to write out different chunks of pages
first. The way to fix this when writing large files is to use
fallocate(2) when writing a large file, so it can be allocated
contiguously.
In any case, Daniel, if you want the best results for your benchmark,
use ext4, and tweak the script slightly:
touch /DataVolume/hex.txt
fallocate -l 5G /DataVolume/hex.txt
for i in 0 1 2 3 4
do
dd if=/hex.txt of=/DataVolume/hex.txt bs=64k conv=notrunc \
oflag=direct,append
done
Best regards,
- Ted
next prev parent reply other threads:[~2010-07-06 22:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-06 1:49 inconsistent file placement Daniel Taylor
2010-07-06 2:38 ` Eric Sandeen
2010-07-06 6:52 ` Amir G.
2010-07-06 18:55 ` tytso
2010-07-06 18:59 ` Eric Sandeen
2010-07-06 22:01 ` tytso [this message]
2010-07-06 22:15 ` Daniel Taylor
2010-07-06 23:14 ` tytso
2010-07-06 23:39 ` Eric Sandeen
2010-07-07 1:08 ` Daniel Taylor
2010-07-07 2:29 ` Eric Sandeen
2010-07-06 23:34 ` Eric Sandeen
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=20100706220101.GA6603@thunk.org \
--to=tytso@mit.edu \
--cc=Daniel.Taylor@wdc.com \
--cc=linux-ext4@vger.kernel.org \
--cc=sandeen@redhat.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).