linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ted Ts'o <tytso@mit.edu>
To: Robin Dong <hao.bigrat@gmail.com>
Cc: linux-ext4@vger.kernel.org, Robin Dong <sanbai@taobao.com>
Subject: Re: [PATCH v2] ext4: directly leave out of ext4_find_delalloc_range() if filesystem mount with "nodelalloc"
Date: Mon, 19 Dec 2011 10:39:07 -0500	[thread overview]
Message-ID: <20111219153907.GA27501@thunk.org> (raw)
In-Reply-To: <1323327594-4914-1-git-send-email-hao.bigrat@gmail.com>

On Thu, Dec 08, 2011 at 02:59:54PM +0800, Robin Dong wrote:
> From: Robin Dong <sanbai@taobao.com>
> 
> We found performance regression when using bigalloc with "nodelalloc"  (1MB cluster size):
> 
> 1. mke2fs -C 1048576 -O ^has_journal,bigalloc /dev/sda
> 2. mount -o nodelalloc /dev/sda /test/
> 3. time dd if=/dev/zero of=/test/io bs=1048576 count=1024
> 
> The "dd" will cost about 2 seconds to finish, but if we mke2fs without "bigalloc",
> "dd" will only cost lesss than 1 second.
> 
> The reason is:  when using ext4 with "nodelalloc", it will call ext4_find_delalloc_cluster() nearly
> everytime it call ext4_ext_map_blocks(), and ext4_find_delalloc_range() will also scan all pages
> in cluster because no buffer is "delayed".
> A cluster has 256 pages (1MB cluster), so it will scan 256 * 256k pags when creating a 1G file. That
> severely hurts the performance.
> 
> Therefore, we return out from ext4_find_delalloc_range() when using "nodelalloc".
> 
> Signed-off-by: Robin Dong <sanbai@taobao.com>

Thanks, applied.

					- Ted

      parent reply	other threads:[~2011-12-19 15:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-07  6:04 [PATCH] ext4: check flags's EXT4_GET_BLOCKS_DELALLOC_RESERVE before call ext4_find_delalloc_cluster() Robin Dong
2011-12-07 11:02 ` Yongqiang Yang
2011-12-08  6:59 ` [PATCH v2] ext4: directly leave out of ext4_find_delalloc_range() if filesystem mount with "nodelalloc" Robin Dong
2011-12-08  8:36   ` Yongqiang Yang
2011-12-19 15:39   ` Ted Ts'o [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=20111219153907.GA27501@thunk.org \
    --to=tytso@mit.edu \
    --cc=hao.bigrat@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sanbai@taobao.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).