From: Al Boldi <a1426z@gawab.com>
To: Andreas Dilger <adilger@sun.com>
Cc: Jan Kara <jack@suse.cz>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Hisashi Hifumi <hifumi.hisashi@oss.ntt.co.jp>
Subject: Re: [RFC] ext3: per-process soft-syncing data=ordered mode
Date: Sun, 10 Feb 2008 17:54:24 +0300 [thread overview]
Message-ID: <200802101754.25059.a1426z@gawab.com> (raw)
In-Reply-To: <20080207000020.GB3149@webber.adilger.int>
Andreas Dilger wrote:
> On Jan 26, 2008 08:27 +0300, Al Boldi wrote:
> > Jan Kara wrote:
> > > > data=ordered mode has proven reliable over the years, and it does
> > > > this by ordering filedata flushes before metadata flushes. But this
> > > > sometimes causes contention in the order of a 10x slowdown for
> > > > certain apps, either due to the misuse of fsync or due to inherent
> > > > behaviour like db's, as well as inherent starvation issues exposed
> > > > by the data=ordered mode.
> > > >
> > > > data=writeback mode alleviates data=order mode slowdowns, but only
> > > > works per-mount and is too dangerous to run as a default mode.
> > > >
> > > > This RFC proposes to introduce a tunable which allows to disable
> > > > fsync and changes ordered into writeback writeout on a per-process
> > > > basis like this:
> > > >
> > > > echo 1 > /proc/`pidof process`/softsync
> > >
> > > I guess disabling fsync() was already commented on enough. Regarding
> > > switching to writeback mode on per-process basis - not easily possible
> > > because sometimes data is not written out by the process which stored
> > > them (think of mmaped file).
> >
> > Do you mean there is a locking problem?
> >
> > > And in case of DB, they use direct-io
> > > anyway most of the time so they don't care about journaling mode
> > > anyway.
> >
> > Testing with sqlite3 and mysql4 shows that performance drastically
> > improves with writeback writeout.
> >
> > > But as Diego wrote, there is definitely some room for improvement in
> > > current data=ordered mode so the difference shouldn't be as big in the
> > > end.
> >
> > Yes, it would be nice to get to the bottom of this starvation problem,
> > but even then, the proposed tunable remains useful for misbehaving apps.
>
> Al, can you try a patch posted to linux-fsdevel and linux-ext4 from
> Hisashi Hifumi <hifumi.hisashi@oss.ntt.co.jp> to see if this improves
> your situation? Dated Mon, 04 Feb 2008 19:15:25 +0900.
>
> [PATCH] ext3,4:fdatasync should skip metadata writeout when
> overwriting
>
> It may be that we already have a solution in that patch for database
> workloads where the pages are already allocated by avoiding the need
> for ordered mode journal flushing in that case.
Well, it seems that it does have a positive effect for the 'konqueror hangs'
case, but doesn't improve the db case.
This shouldn't be surprising, as the db redundant writeout problem is
localized not in fsync but rather in ext3_ordered_write_end.
Maybe some form of a staged merged commit could help.
Thanks!
--
Al
prev parent reply other threads:[~2008-02-10 14:55 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-24 20:36 Al Boldi
2008-01-24 21:50 ` Diego Calleja
2008-01-26 5:27 ` Al Boldi
2008-01-28 17:34 ` Jan Kara
2008-01-24 21:58 ` Valdis.Kletnieks
2008-01-26 5:27 ` Al Boldi
2008-01-25 1:19 ` Chris Snook
2008-01-26 5:28 ` Al Boldi
2008-01-29 17:22 ` Jan Kara
2008-01-30 6:04 ` Al Boldi
2008-01-30 14:29 ` Chris Mason
2008-01-30 18:39 ` Al Boldi
2008-01-31 0:32 ` Andreas Dilger
2008-01-31 6:20 ` Al Boldi
2008-01-31 16:56 ` Chris Mason
2008-01-31 17:10 ` Jan Kara
2008-01-31 17:14 ` Chris Mason
2008-02-01 21:26 ` Al Boldi
2008-02-04 17:54 ` Jan Kara
2008-02-05 7:07 ` Al Boldi
2008-02-05 15:07 ` Jan Kara
2008-02-05 19:20 ` Al Boldi
2008-01-25 6:47 ` Andreas Dilger
2008-01-25 21:57 ` david
2008-01-25 15:36 ` Jan Kara
2008-01-26 5:27 ` Al Boldi
2008-01-28 17:27 ` Jan Kara
2008-01-28 20:17 ` Al Boldi
2008-02-07 0:00 ` Andreas Dilger
2008-02-10 14:54 ` Al Boldi [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=200802101754.25059.a1426z@gawab.com \
--to=a1426z@gawab.com \
--cc=adilger@sun.com \
--cc=hifumi.hisashi@oss.ntt.co.jp \
--cc=jack@suse.cz \
--cc=linux-fsdevel@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
all inboxes | Powered by JetHome®