From: Andrew Morton <akpm@osdl.org>
To: bert hubert <ahu@ds9a.nl>
Cc: albertogli@telpin.com.ar, linux-kernel@vger.kernel.org
Subject: Re: Syncing a file's metadata in a portable way
Date: Sun, 11 Jul 2004 03:35:27 -0700 [thread overview]
Message-ID: <20040711033527.4017170d.akpm@osdl.org> (raw)
In-Reply-To: <20040711102743.GB16199@outpost.ds9a.nl>
bert hubert <ahu@ds9a.nl> wrote:
>
> On Sat, Jul 10, 2004 at 01:14:59PM -0700, Andrew Morton wrote:
>
> > If only the one file has been written to, an fsync on ext3 shouldn't
> > produce any more writeout than an fsync on ext2.
> (...)
> > Either that, or SQLite is broken.
>
> I'll show strace and vmstat tomorrow - I found very little writes, no mmap,
> some fsync and massive writeouts. On ext2, performance was two orders of
> magnitude better.
>
One scenario which could cause this is if the application is writing a
large amount of data to a file and is repeatedly *overwriting* that data.
And the application is repeatedly adding new blocks to, and fsyncing a
separate file.
strace might tell us that, if the traces are skilfully captured and studied.
You should try data=writeback. Given that the app is using fsync() for its
own data integrity purposes anyway, you don't need data=ordered.
It's strange though. databases often preallocate the file space, so a
regular write won't add new blocks to the file and won't allocate any new
metadata. In this situation, an fsync() will only force a commit once per
second, when the inode mtime changes.
next prev parent reply other threads:[~2004-07-11 10:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-09 3:06 Syncing a file's metadata in a portable way Alberto Bertogli
2004-07-09 9:39 ` Andrew Morton
2004-07-10 11:54 ` bert hubert
2004-07-10 20:14 ` Andrew Morton
2004-07-11 10:27 ` bert hubert
2004-07-11 10:35 ` Andrew Morton [this message]
2004-07-11 14:19 ` Alberto Bertogli
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=20040711033527.4017170d.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=ahu@ds9a.nl \
--cc=albertogli@telpin.com.ar \
--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 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.