linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [ext4] Documentation patch
@ 2008-12-01 16:46 Harald Arnesen
  2008-12-01 16:57 ` Christoph Hellwig
  0 siblings, 1 reply; 8+ messages in thread
From: Harald Arnesen @ 2008-12-01 16:46 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-ext4, tytso

My first patch, hope it goes through ok! 
Applies to 2.6.28-rc6-00184-gd9d060a.

Compare ext4's journalling with anything but ext3's. These use the same
journalling modes, most other Linux filesystems do only metadata
journalling.

Signed-off-by: Harald Arnesen <harald@skogtun.org>

========================================================================
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt
index 174eaff..5bbe79e 100644
--- a/Documentation/filesystems/ext4.txt
+++ b/Documentation/filesystems/ext4.txt
@@ -61,7 +61,7 @@ Note: More extensive information for getting started with ext4 can be
   - When comparing performance with other filesystems, remember that
     ext3/4 by default offers higher data integrity guarantees than most.
     So when comparing with a metadata-only journalling filesystem, such
-    as ext3, use `mount -o data=writeback'.  And you might as well use
+    as jfs or xfs, use `mount -o data=writeback'.  And you might as well use
     `mount -o nobh' too along with it.  Making the journal larger than
     the mke2fs default often helps performance with metadata-intensive
     workloads.
-- 
Hilsen Harald.

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [ext4] Documentation patch
  2008-12-01 16:46 [ext4] Documentation patch Harald Arnesen
@ 2008-12-01 16:57 ` Christoph Hellwig
  2008-12-01 17:58   ` Eric Sandeen
  0 siblings, 1 reply; 8+ messages in thread
From: Christoph Hellwig @ 2008-12-01 16:57 UTC (permalink / raw)
  To: Harald Arnesen; +Cc: linux-kernel, linux-ext4, tytso

On Mon, Dec 01, 2008 at 05:46:56PM +0100, Harald Arnesen wrote:
>      So when comparing with a metadata-only journalling filesystem, such
> -    as ext3, use `mount -o data=writeback'.  And you might as well use
> +    as jfs or xfs, use `mount -o data=writeback'.  And you might as well use

data=ordered comes closest to what xfs does for quite a long time..


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ext4] Documentation patch
  2008-12-01 16:57 ` Christoph Hellwig
@ 2008-12-01 17:58   ` Eric Sandeen
  2008-12-01 20:58     ` Theodore Tso
  0 siblings, 1 reply; 8+ messages in thread
From: Eric Sandeen @ 2008-12-01 17:58 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Harald Arnesen, linux-kernel, linux-ext4, tytso

Christoph Hellwig wrote:
> On Mon, Dec 01, 2008 at 05:46:56PM +0100, Harald Arnesen wrote:
>>      So when comparing with a metadata-only journalling filesystem, such
>> -    as ext3, use `mount -o data=writeback'.  And you might as well use
>> +    as jfs or xfs, use `mount -o data=writeback'.  And you might as well use
> 
> data=ordered comes closest to what xfs does for quite a long time..

Agreed; that whole bit which mentions other filesystem comparisons
should probably be stricken, unless it can be
proven/demonstrated/substantiated that ext3 really does "offer higher
data integrity guarantees than most" at this point.

data=ordered ensures that stale data won't be exposed on a crash; xfs
won't do this (it'd be a security bug) and I'd be surprised if jfs or
reiserfs do either.    And it probably *should* be mentioned that
data=writeback bears this risk.

And until ext3 turns on barriers by default, I don't think it's fair to
talk too much about integrity guarantees.  :)

-Eric

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ext4] Documentation patch
  2008-12-01 17:58   ` Eric Sandeen
@ 2008-12-01 20:58     ` Theodore Tso
  2008-12-06 22:25       ` Theodore Tso
  0 siblings, 1 reply; 8+ messages in thread
From: Theodore Tso @ 2008-12-01 20:58 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: Christoph Hellwig, Harald Arnesen, linux-kernel, linux-ext4

On Mon, Dec 01, 2008 at 11:58:52AM -0600, Eric Sandeen wrote:
> Christoph Hellwig wrote:
> > On Mon, Dec 01, 2008 at 05:46:56PM +0100, Harald Arnesen wrote:
> >>      So when comparing with a metadata-only journalling filesystem, such
> >> -    as ext3, use `mount -o data=writeback'.  And you might as well use
> >> +    as jfs or xfs, use `mount -o data=writeback'.  And you might as well use
> > 
> > data=ordered comes closest to what xfs does for quite a long time..
> 
> Agreed; that whole bit which mentions other filesystem comparisons
> should probably be stricken, unless it can be
> proven/demonstrated/substantiated that ext3 really does "offer higher
> data integrity guarantees than most" at this point.
> 
> data=ordered ensures that stale data won't be exposed on a crash; xfs
> won't do this (it'd be a security bug) and I'd be surprised if jfs or
> reiserfs do either.    And it probably *should* be mentioned that
> data=writeback bears this risk.

Well, the original text was written by David Kleikamp, so it might be
the case that jfs doesn't handle the stale data block case well.  I
haven't checked.  However, the sense of that paragraph got mangled
badly in commit 93e3270c, and what's there clearly doesn't make any
sense.

I agree the best thing to do is to nuke that whole paragraph.  The one
thing that's worth mentioning (as a replacement paragraph) is that
ext4 (and many other filesystems) has barreiers on by default, and
ext3 has barriers off by default, so that's something that should be
taken into account when doing head-to-head comparisons.

							- Ted

P.S.  Speaking of barriers, there was a rumor floating around that
someone was working on patches so at least in the case of RAID 0 and
RAID 1, that the LVM and MD stack would actually pass barier requests
down to the block device layer.  Whatever happened to that?  Is that
bug in the LVM layer going to get fixed any time soon?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ext4] Documentation patch
  2008-12-01 20:58     ` Theodore Tso
@ 2008-12-06 22:25       ` Theodore Tso
  2008-12-06 23:33         ` Eric Sandeen
  0 siblings, 1 reply; 8+ messages in thread
From: Theodore Tso @ 2008-12-06 22:25 UTC (permalink / raw)
  To: Eric Sandeen, Christoph Hellwig, Harald Arnesen, linux-kernel,
	linux-ext4

This is what I have added to the ext4 patch queue.

							- Ted

Update Documentation/filesystems/ext4.txt

Fix paragraph with recommendations on how to tune ext4 for benchmarks.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt
index 845e691..19bb93f 100644
--- a/Documentation/filesystems/ext4.txt
+++ b/Documentation/filesystems/ext4.txt
@@ -58,13 +58,18 @@ Note: More extensive information for getting started with ext4 can be
 
 	# mount -t ext4 /dev/hda1 /wherever
 
-  - When comparing performance with other filesystems, remember that
-    ext3/4 by default offers higher data integrity guarantees than most.
-    So when comparing with a metadata-only journalling filesystem, such
-    as ext3, use `mount -o data=writeback'.  And you might as well use
-    `mount -o nobh' too along with it.  Making the journal larger than
-    the mke2fs default often helps performance with metadata-intensive
-    workloads.
+  - When comparing performance with other filesystems, it's always
+    important to try multiple workloads; very often a subtle change in a
+    workload parameter can completely change the ranking of which
+    filesystems do well compared to others.  When comparing versus ext3,
+    note that ext4 enables write barriers by default, while ext3 does
+    not enable write barriers by default.  So it is useful to use
+    explicitly specify whether barriers are enabled or not when via the
+    '-o barriers=[0|1]' mount option.  When tuning ext3 for best
+    benchmark numbers, it is often worthwhile to try changing the data
+    journaling mode; '-o data=writeback,nobh' can be faster for some
+    workloads.  A large journal can also be helpful for
+    metadata-intensive workloads.
 
 2. Features
 ===========

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [ext4] Documentation patch
  2008-12-06 22:25       ` Theodore Tso
@ 2008-12-06 23:33         ` Eric Sandeen
  2008-12-07 18:39           ` Theodore Tso
  0 siblings, 1 reply; 8+ messages in thread
From: Eric Sandeen @ 2008-12-06 23:33 UTC (permalink / raw)
  To: Theodore Tso, Eric Sandeen, Christoph Hellwig, Harald Arnesen,
	linux-kernel, linux-

Theodore Tso wrote:
> This is what I have added to the ext4 patch queue.
> 
> 							- Ted
> 
> Update Documentation/filesystems/ext4.txt
> 
> Fix paragraph with recommendations on how to tune ext4 for benchmarks.
> 
> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
> diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt
> index 845e691..19bb93f 100644
> --- a/Documentation/filesystems/ext4.txt
> +++ b/Documentation/filesystems/ext4.txt
> @@ -58,13 +58,18 @@ Note: More extensive information for getting started with ext4 can be
>  
>  	# mount -t ext4 /dev/hda1 /wherever
>  
> -  - When comparing performance with other filesystems, remember that
> -    ext3/4 by default offers higher data integrity guarantees than most.
> -    So when comparing with a metadata-only journalling filesystem, such
> -    as ext3, use `mount -o data=writeback'.  And you might as well use
> -    `mount -o nobh' too along with it.  Making the journal larger than
> -    the mke2fs default often helps performance with metadata-intensive
> -    workloads.
> +  - When comparing performance with other filesystems, it's always
> +    important to try multiple workloads; very often a subtle change in a
> +    workload parameter can completely change the ranking of which
> +    filesystems do well compared to others.  When comparing versus ext3,
> +    note that ext4 enables write barriers by default, while ext3 does
> +    not enable write barriers by default.  So it is useful to use
> +    explicitly specify whether barriers are enabled or not when via the
> +    '-o barriers=[0|1]' mount option.  

That sentence doesn't quite parse...

> + When tuning ext3 for best
> +    benchmark numbers, it is often worthwhile to try changing the data
> +    journaling mode; '-o data=writeback,nobh' can be faster for some
> +    workloads.  

It should probably be made obvious that this has a security implication
(stale data exposed, right?)

-Eric

> + A large journal can also be helpful for
> +    metadata-intensive workloads.
>  
>  2. Features
>  ===========


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ext4] Documentation patch
  2008-12-06 23:33         ` Eric Sandeen
@ 2008-12-07 18:39           ` Theodore Tso
  2008-12-07 20:43             ` Eric Sandeen
  0 siblings, 1 reply; 8+ messages in thread
From: Theodore Tso @ 2008-12-07 18:39 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: Christoph Hellwig, Harald Arnesen, linux-kernel, linux-ext4

Good points.  OK, how about this?
     	      
  - When comparing performance with other filesystems, it's always
    important to try multiple workloads; very often a subtle change in a
    workload parameter can completely change the ranking of which
    filesystems do well compared to others.  When comparing versus ext3,
    note that ext4 enables write barriers by default, while ext3 does
    not enable write barriers by default.  So it is useful to use
    explicitly specify whether barriers are enabled or not when via the
    '-o barriers=[0|1]' mount option for both ext3 and ext4 filesystems
    for a fair comparison.  When tuning ext3 for best benchmark numbers,
    it is often worthwhile to try changing the data journaling mode; '-o
    data=writeback,nobh' can be faster for some workloads.  (Note
    however that running mounting with data=writeback can potentially
    leave stale data exposed in recently written files in case of an
    unclean shutdown, which could be a security exposure in some
    situations.)  Configuring the filesystem with a large journal can
    also be helpful for metadata-intensive workloads.

							- Ted

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ext4] Documentation patch
  2008-12-07 18:39           ` Theodore Tso
@ 2008-12-07 20:43             ` Eric Sandeen
  0 siblings, 0 replies; 8+ messages in thread
From: Eric Sandeen @ 2008-12-07 20:43 UTC (permalink / raw)
  To: Theodore Tso, Eric Sandeen, Christoph Hellwig, Harald Arnesen,
	linux-kernel, linux-

Theodore Tso wrote:
> Good points.  OK, how about this?
>      	      
>   - When comparing performance with other filesystems, it's always
>     important to try multiple workloads; very often a subtle change in a
>     workload parameter can completely change the ranking of which
>     filesystems do well compared to others.  When comparing versus ext3,
>     note that ext4 enables write barriers by default, while ext3 does
>     not enable write barriers by default.  So it is useful to use
>     explicitly specify whether barriers are enabled or not when via the
>     '-o barriers=[0|1]' mount option for both ext3 and ext4 filesystems
>     for a fair comparison.  When tuning ext3 for best benchmark numbers,
>     it is often worthwhile to try changing the data journaling mode; '-o
>     data=writeback,nobh' can be faster for some workloads.  (Note
>     however that running mounting with data=writeback can potentially

I'd say "running mounted with data=writeback...."

other than that it looks good to me :)

(sorta nitpicky but it probably won't be touched again for 5 years so
may as well get it right now) :)

-Eric

>     leave stale data exposed in recently written files in case of an
>     unclean shutdown, which could be a security exposure in some
>     situations.)  Configuring the filesystem with a large journal can
>     also be helpful for metadata-intensive workloads.
> 
> 							- Ted


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-12-07 20:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-01 16:46 [ext4] Documentation patch Harald Arnesen
2008-12-01 16:57 ` Christoph Hellwig
2008-12-01 17:58   ` Eric Sandeen
2008-12-01 20:58     ` Theodore Tso
2008-12-06 22:25       ` Theodore Tso
2008-12-06 23:33         ` Eric Sandeen
2008-12-07 18:39           ` Theodore Tso
2008-12-07 20:43             ` Eric Sandeen

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).