From: Bruce Guenter <lists-reiserfs-list@bruce-guenter.dyndns.org>
To: reiserfs-list@namesys.com
Subject: Re: Reiserfs concurrent write problems
Date: Thu, 29 Apr 2004 13:04:03 -0600 [thread overview]
Message-ID: <20040429190403.GA4015@em.ca> (raw)
In-Reply-To: <1083196101.30344.222.camel@watt.suse.com>
[-- Attachment #1: Type: text/plain, Size: 2297 bytes --]
On Wed, Apr 28, 2004 at 07:48:22PM -0400, Chris Mason wrote:
> reiserfs doesn't need as large a log as ext3 in order to get good
> numbers for fsync heavy workloads. This is good because reiserfs also
> pins the logged buffers more then ext3 does, so a 132mb log on reiserfs
> is likely to tie up that much ram in pinned metadata. You might want to
> experiment a little with the log size.
Noted. Having extra RAM tied up is likely to only show up in the read
performance.
> I'm a little confused about how an external log slows things down,
> please let me know if you see those results with the new patches.
With 2.6.6-rc2-mm2, having an external log makes it considerably faster, up
to 16-concurrency level, where it is somewhat slower.
I'd post the new results, but ext3 is behaving very weird under this
kernel -- doing a single transaction takes up to 950ms to complete,
which is more than an order of magnitude too big.
> Your sequence is this:
>
> write(tmp file)
> fsync(tmp file)
> rename(tmp file, somedir/new file)
> fsync(somedir)
>
> That last fsync holds the directory semaphore during the log commit,
> which hurts concurrency on that directory badly.
Fortunately, there is relatively little concurrency on a per-directory
level. There are so many directories in play that there is little
chance that two processes (either reading or writing) will be in
contention for the same directory.
> Both reiserfs and ext3
> can get away with:
> rename(tmp file, somedir/new file)
> fsync(tmp file fd)
>
> It should be much faster.
I'll add a deferred-fsync mode to test this.
> In reiserfs data=journal mode, you get strict ordering of all the
> transactions.
What about in data=ordered mode?
> This means you can safely do this:
> write(temp file)
> rename(temp file, somedir/new file)
> fsync(temp file fd)
How is that different from the above?
> This should hold true for ext3 as well, but you should check with the
> ext3 developers before basing any products on it.
I will double check on the ext3 list to see if they order the commits
this way.
--
Bruce Guenter <bruceg@em.ca> http://em.ca/~bruceg/ http://untroubled.org/
OpenPGP key: 699980E8 / D0B7 C8DD 365D A395 29DA 2E2A E96F B2DC 6999 80E8
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2004-04-29 19:04 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-26 17:26 Reiserfs concurrent write problems Bruce Guenter
2004-04-26 17:36 ` Chris Mason
2004-04-26 18:12 ` Bruce Guenter
2004-04-27 16:15 ` Bruce Guenter
2004-04-27 18:00 ` Chris Mason
2004-04-27 20:15 ` Bruce Guenter
2004-04-27 23:48 ` Chris Mason
2004-04-28 23:48 ` Chris Mason
2004-04-29 19:04 ` Bruce Guenter [this message]
2004-04-29 19:19 ` Chris Mason
2004-04-29 20:08 ` Bruce Guenter
2004-04-29 20:16 ` Chris Mason
2004-04-30 19:54 ` Bruce Guenter
2004-04-30 20:24 ` Chris Mason
2004-04-30 21:44 ` Bruce Guenter
2004-05-01 14:52 ` Dieter Nützel
2004-05-01 9:26 ` Paul Wagland
2004-05-01 12:16 ` Chris Mason
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=20040429190403.GA4015@em.ca \
--to=lists-reiserfs-list@bruce-guenter.dyndns.org \
--cc=reiserfs-list@namesys.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.