Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 05 May 2001 05:52:51 -0700
From:      Cy Schubert - ITSD Open Systems Group <Cy.Schubert@uumail.gov.bc.ca>
To:        stable <stable@FreeBSD.ORG>
Subject:   Re: soft update should be default 
Message-ID:  <200105051253.f45CrHW01020@cwsys.cwsent.com>
In-Reply-To: Your message of "Sat, 05 May 2001 00:58:39 PDT." <Pine.BSF.4.33.0105050055420.16321-100000@sdmail0.sd.bmarts.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <Pine.BSF.4.33.0105050055420.16321-100000@sdmail0.sd.bmarts.c
om>, Go
rdon Tetlow writes:
> On Fri, 4 May 2001, Nick Sayer wrote:
> 
> > Mike Smith wrote:
> >
> > >> Hi,
> > >>
> > >> Why 'soft update' is not default?
> > >> It adds performance and stability, doesn't it?
> > >
> > >
> > > It requires disabling of write caching, which typically reduces
> > > performance (significantly).
> > >
> > Why wouldn't a similar requirement (disabling write caching) apply to
> > non-softupdates filesystems? The disk doesn't know whether the write is
> > synchronous or not, after all.
> 
> That's the thing about it. If you have write-caching enabled then all bets
> are off in any case (ie, you might as well run in async). In addition,
> soft updates does some really smart things even over async.

I sense (maybe incorrectly, so forgive me if I sense wrong) that people 
think that w/o softupdates turned on that FreeBSD performs sync writes. 
 By default the *BSDs perform synchronous metadata (SMD) writes.  That 
means that metadata, e.g. inode and directory writes are synchronously 
written, while the data itself is asynchronously written.  Softupdates 
orders the metadata writes in such a manner that batches of metadata 
writes, each batch being synchronously written, are asynchronously 
written out.  The data itself, e.g. user data, is asynchronously 
written out when SMD or softupdates is used.  If you have a critical 
database, it is no more protected by softupdates than SMD.  In that 
case a DBMS would need to issue fsync() after each commit or the 
filesystem would have to be mounted synchronously.

Of course as Gordon writes above, all bets are off if your disk does 
write-caching.

There is an excellent paper entitled, Soft Updates:  A Solution to the 
Metadata Update Problem in File Systems, by Gergory R. Granger and Yale 
N. Patt at EECS, University of Michigan.  The paper is at 
http://www.ece.cmu.edu/~ganger/papers/CSE-TR-254-95/.


Regards,                         Phone:  (250)387-8437
Cy Schubert                        Fax:  (250)387-5766
Team Leader, Sun/Alpha Team   Internet:  Cy.Schubert@osg.gov.bc.ca
Open Systems Group, ITSD, ISTA
Province of BC




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105051253.f45CrHW01020>