From: Jeffrey Siegal <jbs@quiotix.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Why is fsync so much slower than O_SYNC?
Date: Thu, 18 Mar 2004 07:42:57 -0800 [thread overview]
Message-ID: <4059C381.1000601@quiotix.com> (raw)
In-Reply-To: <20040318003335.6bf3eb41.akpm@osdl.org>
Andrew Morton wrote:
> This is because ext3 is being dumb. It is forcing a journal commit even
> when the inode has not been altered.
>
> Here's a moderately-tested 2.6 fix. A 2.4 fix would be similar.
>
>
> File overwrite:
>
> vmm:/mnt/hda5> ~/fsync-is-sucky
> O_SYNC:
> Creating
> Starting
> iter = 1000, latency = 0.191464ms
>
> O_DSYNC:
> Creating
> Starting
> iter = 1000, latency = 0.181637ms
>
> fsync:
> Creating
> Starting
> iter = 1000, latency = 0.186326ms
>
> fdatasync:
> Creating
> Starting
> iter = 1000, latency = 0.193013ms
Hmm, this doesn't seem right. For an overwrite, it should still be
waiting for just the data page to be written out, and that should take
about 8ms (for a 7200rpm drive), and the append case should take longer,
since it requires writing both the data page and then the journal.
next prev parent reply other threads:[~2004-03-18 15:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-17 16:40 Why is fsync so much slower than O_SYNC? Jeffrey Siegal
2004-03-18 8:33 ` Andrew Morton
2004-03-18 15:42 ` Jeffrey Siegal [this message]
2004-03-18 17:07 ` Andrew Morton
2004-03-18 16:36 ` Jeffrey Siegal
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=4059C381.1000601@quiotix.com \
--to=jbs@quiotix.com \
--cc=akpm@osdl.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