Synchronous updates on ext3?

Lawrence Greenfield leg+ at andrew.cmu.edu
Thu Aug 29 08:54:28 EDT 2002


   Date: Thu, 29 Aug 2002 09:50:44 -0300
   From: Henrique de Moraes Holschuh <hmh at debian.org>

   On Thu, 29 Aug 2002, Lawrence Greenfield wrote:
   >    Date: Thu, 29 Aug 2002 08:53:09 -0300
   >    From: Henrique de Moraes Holschuh <hmh at debian.org>
   > [...]
   >    Don't try to second-guess the user. If anyone is dumb enough to enable
   >    data=writeback in ext3, he deserves what he gets.
   > 
   > data=writeback is also safe, since Cyrus specifically calls fsync()
   > before doing any crucial metadata operations.

   Nice to know that :-)  So we can sum it up like this:

   1. Cyrus needs that the filesystem metadata be kept sane, and that fsync()
   is honoured.
   2. Ext3 always does this, in all three modes of operation. Sync writes are
   never needed.
   3. Ext2 only does this in sync mode.

That's correct.

   data=writeback might be slower than data=journal for ext3 mail spools. One
   has to benchmark his particular fs, I suppose.

I would guess that data=writeback is faster than data=ordered. I would
guess that the speed of data=journal is going to depend on hardware
and specific workloads. (It's not clear to me that data=journal is a
win on a system with many concurrent changes pending.)

In practice, the mmap()/write() bug with data=journal makes it
impossible for me to recommend since I don't want to waste the brain
cells on tracking which kernel versions (and distributions) have the
bug.

Larry





More information about the Info-cyrus mailing list