linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Moyer <jmoyer@redhat.com>
To: Jan Kara <jack@suse.cz>
Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org,
	jens.axboe@oracle.com, esandeen@redhat.com
Subject: Re: [patch/rft] jbd2: tag journal writes as metadata I/O
Date: Mon, 05 Apr 2010 11:24:13 -0400	[thread overview]
Message-ID: <x49tyrpkjmq.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <20100401194822.GA8401@atrey.karlin.mff.cuni.cz> (Jan Kara's message of "Thu, 1 Apr 2010 21:48:23 +0200")

Jan Kara <jack@suse.cz> writes:

>   Hi,
>
>> In running iozone for writes to small files, we noticed a pretty big
>> discrepency between the performance of the deadline and cfq I/O
>> schedulers.  Investigation showed that I/O was being issued from 2
>> different contexts: the iozone process itself, and the jbd2/sdh-8 thread
>> (as expected).  Because of the way cfq performs slice idling, the delays
>> introduced between the metadata and data I/Os were significant.  For
>> example, cfq would see about 7MB/s versus deadline's 35 for the same
>> workload.  I also tested fs_mark with writing and fsyncing 1000 64k
>> files, and a similar 5x performance difference was observed.  Eric
>> Sandeen suggested that I flag the journal writes as metadata, and once I
>> did that, the performance difference went away completely (cfq has
>> special logic to prioritize metadata I/O).
>> 
>> So, I'm submitting this patch for comments and testing.  I have a
>> similar patch for jbd that I will submit if folks agree that this is a
>> good idea.
>   This looks like a good idea to me. I'd just be careful about data=journal
> mode where even data is written via journal and thus you'd incorrectly
> prioritize all the IO. I suppose that could have negative impact on performace
> of other filesystems on the same disk. So for data=journal mode, I'd leave
> write_op to be just WRITE / WRITE_SYNC_PLUG.

Hi, Jan, thanks for the review!  I'm trying to figure out the best way
to relay the journal mode from ext3 or ext4 to jbd or jbd2.  Would a new
journal flag, set in journal_init_inode, be appropriate?  This wouldn't
cover the case of data journalling set per inode, though.  It also puts
some ext3-specific code into the purportedly fs-agnostic jbd code
(specifically, testing the superblock for the data journal mount flag).
Do you have any suggestions?

Thanks!
Jeff

  reply	other threads:[~2010-04-05 15:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-01 19:04 [patch/rft] jbd2: tag journal writes as metadata I/O Jeff Moyer
2010-04-01 19:48 ` Jan Kara
2010-04-05 15:24   ` Jeff Moyer [this message]
2010-04-05 17:46     ` tytso
2010-04-06 15:20       ` Jan Kara
2010-04-06 18:25       ` Vivek Goyal
2010-04-06 18:45         ` tytso
2010-04-06 19:04           ` Jeff Moyer
2010-04-02  7:00 ` Jens Axboe
2010-04-05 17:52 ` tytso
2010-04-05 18:36   ` Jeff Moyer
2010-04-05 19:48     ` tytso
2010-04-05 20:34       ` Jeff Moyer
2010-04-05 20:41         ` Jeff Moyer
2010-04-05 21:01           ` tytso

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=x49tyrpkjmq.fsf@segfault.boston.devel.redhat.com \
    --to=jmoyer@redhat.com \
    --cc=esandeen@redhat.com \
    --cc=jack@suse.cz \
    --cc=jens.axboe@oracle.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@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).