All of lore.kernel.org
 help / color / mirror / Atom feed
From: Theodore Tso <tytso@mit.edu>
To: wbrana@gmail.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: EXT4 RAID read performance
Date: Sat, 19 Sep 2009 19:18:10 -0400	[thread overview]
Message-ID: <20090919231810.GE7121@mit.edu> (raw)
In-Reply-To: <a769871e0909191112t3adb852cn93d72dc5fd94b9fd@mail.gmail.com>

On Sat, Sep 19, 2009 at 08:12:31PM +0200, wbrana@gmail.com wrote:
> 
> I'm considering replacing Reiser3 filesystem with some newer one.
> I ran compilebench benchmark. Read performance is lower with ext4.
> Is it expected or is it possible to fix it?

You didn't say which version of the kernel you are using, which could
be important when asking these sorts of questions about potential
performance problems.

However, in this case, I suspect the issue is the nature of how
compilebench is structured.  Compilebench does the following which
makes it work particularly well for filesystems like reiserfs and
btrfs, and not so much for ext3 and ext4.  Quoting from the
compilebench web page:

   compilebench starts by putting these lists of file names into an
   order native to the filesystem it is working on. The files are
   created in sorted order based on the filename, and then readdir is
   used to find the order the filesystem uses for storing the
   names. After this initial phase, the filesystem native order is
   used for creates, patches and compile. Deleting, reading and
   stating the trees are done in readdir order.

The key here is that it reads the tree in readdir order.  Normally,
when you compile a kernel, the order in which you read and write files
is controlled by the Makefile; you don't get to read and write the
files in the order which just happens to be the most convenient for
the file system's b-tree hash algorithm.

Now, there are some workloads which compilebench might accurately
model --- for example, tar'ing up a directory.  However, despite the
name of the benchmark, it doesn't accurately model a kernel compile.

If you only care about compilebench numbers, you can try creating the
file system with the dir_index feature disabled.  This is the feature
that speeds up random access to directories; unfortunately, it means
that when you read files in readdir order, it causes extra random
reads to th einode table.  However, if your real-life workload is one
where file reads are always magically in readdir order, dir_index adds
overhead without adding any benefit.   

The bottom line is that I'm not terribly worried about trying to
improve ext4's performance on compilebench, since I don't believe it's
a benchmark that models realistic real-life workloads.

Regards,

						- Ted

  parent reply	other threads:[~2009-09-19 23:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-19 18:12 EXT4 RAID read performance wbrana
2009-09-19 22:54 ` wbrana
2009-09-19 23:18 ` Theodore Tso [this message]
2009-09-26 14:27   ` wbrana
     [not found] <dmcHr-ep-7@gated-at.bofh.it>
     [not found] ` <1cddc13e-c147-43e0-9b40-5e3f07941b27@e34g2000vbm.googlegroups.com>
2009-09-20 10:40   ` wbrana

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=20090919231810.GE7121@mit.edu \
    --to=tytso@mit.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wbrana@gmail.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.