From: Andrew Morton <akpm@osdl.org>
To: Muthian Sivathanu <muthian_s@yahoo.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: ext3 journal commit performance
Date: Wed, 2 Mar 2005 09:58:52 -0800 [thread overview]
Message-ID: <20050302095852.3d4da20b.akpm@osdl.org> (raw)
In-Reply-To: <20050302165814.70651.qmail@web53704.mail.yahoo.com>
Muthian Sivathanu <muthian_s@yahoo.com> wrote:
>
> Hi,
>
> I have a question on ext3 journal commit code. When a
> transaction is committed in the ordered mode, ext3
> first issues the data writes, waits for them to
> finish, then issues the journal writes, waits for them
> to finish, and then writes out the commit record.
>
> It appears that the first wait (for the data blocks)
> is unnecessary because all that is required is that
> before the commit, both the data and the metadata
> blocks should be on disk. This extra wait can
> potentially reduce performance in cases where the
> journal is on a separate disk, because you lose
> parallelism between data writes and the metadata
> writes.
1) write the data
2) wait on the data write
3) write the journal
4) wait on the journal write
If we were to omit step 2), we wouldn't be ordering data any more: we will
commit the journal while there are still data writes in flight.
However, what you are proposing is, I think,
1) write the data
2) write the journal
3) wait on the data write
4) wait on the journal write
That would work, and could possibly speed things up a little.
But bear in mind that the journal write is just a single seek, and the
journal tends to be at one end of the disk, and we need to seek to it
anyway. There would be some opportunity for the elevator and the disk to
optimise away a seek.
next prev parent reply other threads:[~2005-03-02 18:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-02 16:58 ext3 journal commit performance Muthian Sivathanu
2005-03-02 17:41 ` linux-os
2005-03-02 17:46 ` Muthian Sivathanu
2005-03-02 17:58 ` Andrew Morton [this message]
2005-03-02 21:29 ` Andrew Morton
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=20050302095852.3d4da20b.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=muthian_s@yahoo.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