Ext3: Why data=journal is better than data=ordered when data needs to be read from and written to disk at the same time

Ted Ts'o tytso at mit.edu
Sat Mar 26 23:53:11 UTC 2011


On Sat, Mar 26, 2011 at 07:20:08PM -0400, Jidong Xiao wrote:
> Hi,
> 
> I see many literatures mentioned this, but I have never seen any one
> explains it in detail.(Although this link exposed the original story:
> http://lkml.indiana.edu/hypermail//linux/kernel/0107.1/0364.html)
> 
> "Journal mode: This mode is the slowest except when data needs to be
> read from and written to disk at the same time where it outperform all
> others mode."

I didn't see any reference to that in that mail thread (which seemed
to be mostly about reiserfs).  It is true that you have a bursty,
fsync-heavy workload, you can reduce latency by using data=journal
mode, because it avoids seeks --- the data and metadata blocks are
written into the journal, and this allows the fsync() to finish more
quickly.  There are some applications where this might be useful, such
as NFS file serving, where the NFS server is not allowed to send an
acknowledgement back to the client until the data is written to stable
store.

	  	    	 	      	    	 - Ted




More information about the Ext3-users mailing list