linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Jan Kara <jack@suse.cz>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext4: Speedup WB_SYNC_ALL pass
Date: Tue, 4 Mar 2014 10:54:43 -0500	[thread overview]
Message-ID: <20140304155443.GD23106@thunk.org> (raw)
In-Reply-To: <1393887208-19462-1-git-send-email-jack@suse.cz>

On Mon, Mar 03, 2014 at 11:53:28PM +0100, Jan Kara wrote:
> When doing filesystem wide sync, there's no need to force transaction
> commit (or synchronously write inode buffer) separately for each inode
> because ext4_sync_fs() takes care of forcing commit at the end (VFS
> takes care of flushing buffer cache, respectively). Most of the time
> this slowness doesn't manifest because previous WB_SYNC_NONE writeback
> doesn't leave much to write but when there are processes aggressively
> creating new files and several filesystems to sync, the sync slowness
> can be noticeable. In the following test script sync(1) takes around 6
> minutes when there are two ext4 filesystems mounted on a standard SATA
> drive. After this patch sync takes a couple of seconds so we have about
> two orders of magnitude improvement.
> 
>       function run_writers
>       {
>         for (( i = 0; i < 10; i++ )); do
>           mkdir $1/dir$i
>           for (( j = 0; j < 40000; j++ )); do
>             dd if=/dev/zero of=$1/dir$i/$j bs=4k count=4 &>/dev/null
>           done &
>         done
>       }
> 
>       for dir in "$@"; do
>         run_writers $dir
>       done
> 
>       sleep 40
>       time sync
> 
> Signed-off-by: Jan Kara <jack@suse.cz>

Looks good, thanks for the patch!

						- Ted

  reply	other threads:[~2014-03-04 15:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-03 22:53 [PATCH] ext4: Speedup WB_SYNC_ALL pass Jan Kara
2014-03-04 15:54 ` Theodore Ts'o [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-10-10 14:23 [PATCH 0/2 v2] Fix data corruption when blocksize < pagesize for mmapped data Jan Kara
2014-10-10 14:23 ` [PATCH] ext4: Speedup WB_SYNC_ALL pass Jan Kara

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=20140304155443.GD23106@thunk.org \
    --to=tytso@mit.edu \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    /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).