From: Jamie Lokier <jamie@shareable.org>
To: Sachin Gaikwad <sachin.kernel@gmail.com>
Cc: Ric Wheeler <ric@emc.com>, Jeff Garzik <jeff@garzik.org>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Chris Wedgwood <cw@f00f.org>
Subject: Re: Proposal for "proper" durable fsync() and fdatasync()
Date: Tue, 25 Nov 2008 10:17:14 +0000 [thread overview]
Message-ID: <20081125101714.GD1054@shareable.org> (raw)
In-Reply-To: <f5524d840811241310m52fe0d30u2bcfaf3981f7368f@mail.gmail.com>
Sachin Gaikwad wrote:
> > No, fsync() doesn't always flush the drive's write cache. It often
> > does, any I think many people are under the impression it always does,
> > but it doesn't.
> >
> > Try this code on ext3:
> >
> > fd = open ("test_file", O_RDWR | O_CREAT | O_TRUNC, 0666);
> > while (1) {
> > char byte;
> > usleep (100000);
> > pwrite (fd, &byte, 1, 0);
> > fsync (fd);
> > }
> >
> > It will do just over 10 write ops per second on an idle system (13 on
> > mine), and 1 flush op per second.
>
> How did you measure write-ops and flush-ops ? Is there any tool which
> can be used ? I tried looking at what CONFIG_BSD_PROCESS_ACCT
> provides, but no luck.
I don't remember; it was such a long time ago!
It probably involved looking at /sys/block/*/stat or something like that.
You might find the "blktrace" tool does what you want.
-- Jamie
prev parent reply other threads:[~2008-11-25 10:17 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-26 7:26 Proposal for "proper" durable fsync() and fdatasync() Jamie Lokier
2008-02-26 7:43 ` Andrew Morton
2008-02-26 7:59 ` Jamie Lokier
2008-02-26 9:16 ` Nick Piggin
2008-02-26 14:09 ` Jörn Engel
2008-02-26 14:09 ` Jörn Engel
2008-02-26 15:07 ` Jamie Lokier
2008-02-26 15:07 ` Jamie Lokier
2008-02-26 16:27 ` Andrew Morton
2008-02-26 15:28 ` Jamie Lokier
2008-02-26 15:28 ` Jamie Lokier
2008-02-26 17:02 ` Jörn Engel
2008-02-26 17:29 ` Jamie Lokier
2008-02-26 17:29 ` Jamie Lokier
2008-02-26 17:38 ` Jörn Engel
2008-02-26 17:38 ` Jörn Engel
2008-02-26 16:43 ` Jeff Garzik
2008-02-26 17:00 ` Jamie Lokier
2008-02-26 17:54 ` Jeff Garzik
2008-02-27 14:16 ` Jamie Lokier
2008-02-26 7:43 ` Jeff Garzik
2008-02-26 7:55 ` Jamie Lokier
2008-02-26 9:25 ` Jamie Lokier
2008-02-26 12:13 ` Ric Wheeler
2008-02-26 15:43 ` Jamie Lokier
2008-11-24 21:10 ` Sachin Gaikwad
2008-11-25 10:17 ` Jamie Lokier [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=20081125101714.GD1054@shareable.org \
--to=jamie@shareable.org \
--cc=cw@f00f.org \
--cc=jeff@garzik.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ric@emc.com \
--cc=sachin.kernel@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.