Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Nov 2001 08:28:04 -0600
From:      Bob Willcox <bob@immure.com>
To:        "Brian T. Schellenberger" <bts@babbleon.org>
Cc:        "Patrick O'Reilly" <patrick@mip.co.za>, Nils Holland <nils@tisys.org>, FreeBSD Question List <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Softupdates
Message-ID:  <20011127082804.A4524@luke.immure.com>
In-Reply-To: <01112623573601.00696@i8k.babbleon.org>; from bts@babbleon.org on Mon, Nov 26, 2001 at 11:57:36PM -0500
References:  <NDBBIMKICMDGDMNOOCAIOENHDPAA.patrick@mip.co.za> <01112609195201.00903@i8k.babbleon.org> <20011126172050.A63285@luke.immure.com> <01112623573601.00696@i8k.babbleon.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Nov 26, 2001 at 11:57:36PM -0500, Brian T. Schellenberger wrote:
> On Monday 26 November 2001 18:20, Bob Willcox wrote:
> > On Mon, Nov 26, 2001 at 09:19:52AM -0500, Brian T.Schellenberger wrote:
> >
> >   [snip]
> >
> > > Also, you most definately should turn off write-caching if you turn on
> > > softupdates.  In fact, you should do this anyway: softupdates are really
> > > rather safe, but write caching is quite dangerous, and doubly so with
> > > softupdates enabled.
> > >
> > > To do this, set
> > >
> > >    hw.ata.wc=0
> > >
> > > in your  /boot/loader.conf (assuming IDE devices).
> 
> If you use softupdates *and* enable write caching then you will screw up your 
> disk with a simple sequence like
> 
> rm -r foo/*
> shutdown -p now
> 
> because the softupdates process will just finish writing its updates before 
> the power is clobbered.

Well, my systems don't power down on shutdown (sounds like yours maybe
do). I have to push the power off button so my disk usually has quite a
bit of time to flush its cache.

> 
> At least that happens with my hardward, so softupdates is not compatible with 
> write-cache-enabled.
> 
> And from what I can tell (no rigorous testing), softupdates w/o write cache 
> is just as fast as non-softupdates w/ write cache, but lots safer.

Try some benchmarks.  An IBM DTLA 45GB drive that I tested with bonnie
gave me these results with and without write caching:

              -------Sequential Output-------- ---Sequential Input-- --Random--
IBM DTLA      -Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks---
WITH WC  1000 26068 34.4 26180 12.7 13990 10.3 27597 57.0 29819 12.4 344.3  1.3
W/O  WC  1000  9768 13.1  9784  4.8  7547  5.5 26801 55.9 31608 13.8 172.5  0.8

This was on the exact same hardware (a 1.33 GHz Athlon system). As you
can see in the second case (w/o write caching) the write performance
is considerably down. Since bonnie is a simple benchmark program that
writes a single file softupdates won't help. This is where I saw the
performance penalty, writing large files. I suspect that without write
caching enabled in the drive the system was not able to send the
next block of data to the disk in time for it to not have to take an
additional revolution in order to write it.

> I know 
> that I've crashed 8 times in the last 36 hours and I'm darn glad I don't 
> enable write caching!  (Of course that's not the norm, but sometimes I manage 
> that sort of thing.)

I still contend that as long as you don't suddenly lose power and the
drive's firmware has a reasonable write behind behavior (i.e., it
will eventually write the data within a reasonable period...I can't
confirm this one), then the blocks that reside in the disk's cache will
be written to the disk even with a system crash (not involving power
failure).

BTW, all of my really critical data is kept on a separate system on SCSI
disks. Also, usually none of my "production" systems crash as many as 8
times in a year. :-)

Of course, it's your data. :-) If you don't feel safe doing it then by
all means don't.  I'm certainly not trying to talk you into it...just
expressing a different point of view.

Bob

-- 
Bob Willcox             Boucher's Observation:
bob@vieo.com               He who blows his own horn always plays the music
Austin, TX                 several octaves higher than originally written.

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




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