Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 May 2003 14:49:21 -0700
From:      Michael Collette <metrol@metrol.net>
To:        "Kevin Oberman" <oberman@es.net>
Cc:        FreeBSD Mailing Lists <freebsd-mobile@FreeBSD.org>
Subject:   Re: When do files syncronize?
Message-ID:  <200305271449.21525.metrol@metrol.net>
In-Reply-To: <20030527211912.751165D04@ptavv.es.net>
References:  <20030527211912.751165D04@ptavv.es.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 27 May 2003 02:19 pm, Kevin Oberman wrote:
> You now know exactly why there is a strong recommendation that write
> cache be disabled on boxes that are subject to power failure. Files are
> synced just fine, but that only gets updates to the write cache. There
> is no way of being sure just when the data will actually get written to
> the disk and, if the system loses power, the answer is never. This also
> screws up write ordering needed by soft updates to make sure that the
> metadata stays consistent.
>
> You case is a "worst case" in that you had probably just updated this
> file and the metadata for it was still queued up. You sent it off to
> sleep, which spin down the disk. Since the metadata was never updated,
> the file ceased to exist (even though all of the data had probably made
> it to the disk).

I just had me a REAL hard lesson in that.  I now have a nice clean KMail 
configuration though! :)  Nothing like a total wipeout to provide some set 
aside time for a little clean up.

> The cost of turning off write cache is high. I have demonstrated a factor
> of 8 slow-down for dd with write cache disabled.

So far, it's just barely noticeable that anything has changed.  It's just a 
wee bit sluggish is all.

What I have yet to do is compile or install anything since I made this change.  
Ack!  That's that, I'm never going to upgrade KDE again! :(

> A possible alternative is to make sure that you wait a minute after
> terminating use of the system before suspending,

Not exactly a reassuring method.

> Another is to do a
> hibernate instead of a suspend. This will write all of you memory to
> disk before turning off. (This also cuts battery use as the system is
> REALLY off when you hibernate.) You will need to create a hibernation
> slice on your hard disk to do this. A utility to create it is available
> from the IBM web site. http://www.pc.ibm.com/qtechinfo/MIGR-4PESMK.html

Many thanks to you and Dave Tweten for that link.  Sounds like a full system 
reinstall to get that slice in play.  I'm assuming that it won't just go 
about adjusting partitions already in play.  Good or bad assumption?

Ah well, worse case scenario is I wait for 5 to hit stable and run through a 
clean install.  Might even be fun to load Windows on here again in the 
interim to ease getting all the bios updates on there.  That, and for the 
sheer joy of removing Windows :)

Later on,
-- 
"Always listen to experts.  They'll tell you what can't be done, and why.  
Then do it."
- Robert A. Heinlein



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