linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ric Wheeler <ricwheeler@gmail.com>
To: Theodore Tso <tytso@mit.edu>,
	Chris Mason <chris.mason@oracle.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Eric Sandeen <sandeen@redhat.com>,
	linux-ext4@vger.kernel.org, linux-ker
Subject: Re: [PATCH 0/4] (RESEND) ext3[34] barrier changes
Date: Sun, 18 May 2008 10:49:49 -0400	[thread overview]
Message-ID: <4830420D.4080608@gmail.com> (raw)
In-Reply-To: <20080518013641.GH16496@mit.edu>

Theodore Tso wrote:
> On Sat, May 17, 2008 at 08:48:33PM -0400, Chris Mason wrote:
>   
>> Well, the barriers happen like so (even if we actually only do one
>> barrier in submit_bh, it turns into two)
>>
>> write log blocks
>> flush #1
>> write commit block
>> flush #2
>> write metadata blocks
>>
>> I'd agree with Ted, there's a fairly small chance of things get reordered 
>> around flush #1.  flush #2 is likely to have lots of reordering though.  It 
>> should be easy to create situations where the metadata for a transaction is 
>> written before the log blocks ever see the disk.
>>     
>
> True, but even with a very heavy fsync() workload, a commit doesn't
> cause the metadata blocks to be written until we have to do a journal
> truncate operation.  A heavy fsync() workload would increase how
> quickly we would use up the journal and need to do a journal truncate,
> though.
>
>   
>> EMC did a ton of automated testing around this when Jens and I did
>> the initial barrier implementations, and they were able to trigger
>> corruptions in fsync heavy workloads with randomized power offs.
>> I'll dig up the workload they used.
>>     
>
> I could imagine a mode which forces a barrier operation for commits
> triggered by fsync()'s, but not commits that occur due to a natural
> closing of transactions.  I'm not sure it's worth it, though, since
> many of the benchmarks that we care about (like Postmark) do use
> fsync() fairly heavily.
>
> The really annoying thing is that what is really needed is a way to
> make write barriers cheaper; we don't need to do a synchronous flush,
> but unfortunately for most drives there isn't any other way of keeping
> disk writes from getting reordered.
>
>   
The workload we used was to run our existing Centera application on a 
rack of boxes. The application is a bit special in that it does a 
digital signature on each file and never returns success for the client 
until an fsync is done on the server (kind of like synchronous NFS).

What we did for our test was to pound away on a rack of these boxes (say 
32 boxes, each with 4 large ATA or S-ATA drives) and then drop power to 
the whole rack.

All of our data file systems were reiserfs, some of the system 
partitions were ext2.

The test would be marked as passed if we could reboot all of the boxes 
and have the client validate  that the digital signature of all files 
written and ack'ed were valid. We also looked for issues seen during the 
reboot (fsck grumbles, corrupted directories, etc).

I didn't run the tests personally, but seem to recall that without 
barriers we routinely saw file system corruption on that reboot.

The hard thing is to figure out how to test this kind of scenario 
without dropping power. To expose the failure mode, it might be 
sufficient to drop power to a drive with smartctl (or, if you have hot 
swap bays, just pull them).

Just a personal note, my last day at EMC was this past Friday. Monday, I 
start working for Red Hat (focused on file systems) so I will have to 
figure out to get this kind of test going without all of my big EMC toys ;-)

ric


  reply	other threads:[~2008-05-18 18:49 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-16 19:02 [PATCH 0/4] (RESEND) ext3[34] barrier changes Eric Sandeen
2008-05-16 19:05 ` [PATCH 1/4] ext3: enable barriers by default Eric Sandeen
2008-05-19  8:58   ` Pavel Machek
2008-05-16 19:07 ` [PATCH 2/4] ext3: call blkdev_issue_flush on fsync Eric Sandeen
2008-05-16 22:15   ` Jamie Lokier
2008-05-16 19:08 ` [PATCH 3/4] ext4: enable barriers by default Eric Sandeen
2008-05-16 19:09 ` [PATCH 4/4] ext4: call blkdev_issue_flush on fsync Eric Sandeen
2008-05-20  2:34   ` Theodore Tso
2008-05-20 15:43     ` Jamie Lokier
2008-05-20 15:52       ` Eric Sandeen
2008-05-20 20:14         ` Jens Axboe
2008-05-20 19:54       ` Jens Axboe
2008-05-20 22:02         ` Jamie Lokier
2008-05-21  7:30           ` Jens Axboe
2008-05-16 20:05 ` [PATCH 0/4] (RESEND) ext3[34] barrier changes Andrew Morton
2008-05-16 20:53   ` Eric Sandeen
2008-05-16 20:58     ` Andrew Morton
2008-05-16 21:45       ` Jamie Lokier
2008-05-16 22:03         ` Eric Sandeen
2008-05-16 22:09           ` Jamie Lokier
2008-05-16 22:03     ` Jamie Lokier
2008-05-16 22:21       ` Eric Sandeen
2008-05-16 22:53         ` Jamie Lokier
2008-05-17  0:20           ` Theodore Tso
2008-05-17  0:35             ` Andrew Morton
2008-05-17 13:43               ` Theodore Tso
2008-05-17 17:59                 ` Andreas Dilger
2008-05-17 20:44                 ` Theodore Tso
2008-05-20 14:45                   ` Jamie Lokier
2008-05-18  0:48               ` Chris Mason
2008-05-18  1:36                 ` Theodore Tso
2008-05-18 14:49                   ` Ric Wheeler [this message]
2008-05-20 14:42                     ` Jamie Lokier
2008-05-20 23:48                     ` Jamie Lokier
     [not found]                   ` <4830420D.4080608__28835.4277647615$1211137279$gmane$org@gmail.com>
2008-05-18 19:59                     ` Andi Kleen
2008-05-18 16:07                       ` Ric Wheeler
2008-05-20 23:44                 ` Jamie Lokier
2008-05-18 20:03         ` Andi Kleen
2008-05-19  0:43           ` Theodore Tso
2008-05-19  2:29             ` Eric Sandeen
2008-05-19  4:11               ` Andrew Morton
2008-05-19 17:16                 ` Chris Mason
2008-05-19 18:39                   ` Chris Mason
2008-05-19 22:39                     ` Jan Kara
2008-05-20  0:29                       ` Chris Mason
2008-05-20  3:29                         ` Timothy Shimmin
2008-05-20 12:04                           ` Chris Mason
2008-05-20  8:25                     ` Jens Axboe
2008-05-20 12:17                       ` Chris Mason
2008-05-21 11:22                     ` Pavel Machek
2008-05-21 12:32                       ` Theodore Tso
2008-05-21 18:03                       ` Andrew Morton
2008-05-21 18:15                         ` Eric Sandeen
2008-05-21 19:43                           ` Jamie Lokier
2008-05-21 18:29                         ` Theodore Tso
2008-05-21 18:49                           ` Andrew Morton
2008-05-21 19:42                             ` Jamie Lokier
2008-05-21 19:36                           ` Jamie Lokier
2008-05-21 19:40                             ` Chris Mason
2008-05-21 19:54                         ` Jamie Lokier
2008-05-20 14:58                   ` Jamie Lokier
2008-05-21 22:30                   ` Daniel Phillips
2008-05-20 23:35               ` Jamie Lokier
2008-05-19  0:28       ` Theodore Tso
2008-05-20 15:13         ` Jamie Lokier
2008-05-21 20:25           ` Greg Smith
2008-05-16 22:30   ` Jamie Lokier
2008-05-18 19:54   ` Andi Kleen
2008-05-19 13:26     ` Chris Mason
2008-05-19 14:46       ` Theodore Tso
2008-05-20  2:51         ` [PATCH, RFC] ext4: Fix use of write barrier in commit logic Theodore Tso
2008-05-20 15:23           ` Jamie Lokier
2008-05-23 18:33         ` [PATCH 0/4] (RESEND) ext3[34] barrier changes Ric Wheeler
2008-05-20 15:36       ` Jamie Lokier
2008-05-20 16:02         ` Chris Mason
2008-05-20 16:27           ` Jamie Lokier
2008-05-20 17:08             ` Chris Mason
2008-05-20 22:26               ` Jamie Lokier
2008-05-19  9:04   ` Pavel Machek
2008-05-29 13:36   ` Eric Sandeen

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=4830420D.4080608@gmail.com \
    --to=ricwheeler@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=chris.mason@oracle.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sandeen@redhat.com \
    --cc=tytso@mit.edu \
    /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;
as well as URLs for NNTP newsgroup(s).