From owner-freebsd-questions Wed Jan 30 16:15:32 2002 Delivered-To: freebsd-questions@freebsd.org Received: from ptavv.es.net (ptavv.es.net [198.128.4.29]) by hub.freebsd.org (Postfix) with ESMTP id 41CED37B416 for ; Wed, 30 Jan 2002 16:15:24 -0800 (PST) Received: from ptavv.es.net (localhost [127.0.0.1]) by ptavv.es.net (Postfix) with ESMTP id 236215D0B; Wed, 30 Jan 2002 16:15:24 -0800 (PST) To: "Brian T. Schellenberger" Cc: Espen Tagestad , questions@FreeBSD.ORG Subject: Re: Softupdates In-reply-to: Your message of "Wed, 30 Jan 2002 14:14:38 EST." <20020130191439.323464078@i8k.babbleon.org> Date: Wed, 30 Jan 2002 16:15:24 -0800 From: "Kevin Oberman" Message-Id: <20020131001524.236215D0B@ptavv.es.net> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > From: Brian T.Schellenberger > Date: Wed, 30 Jan 2002 14:14:38 -0500 > Sender: owner-freebsd-questions@FreeBSD.ORG > > On Wednesday 30 January 2002 06:47 am, Espen Tagestad wrote: > > On Wed, Jan 30, 2002 at 12:34:11PM +0100, Christer Gundersen wrote: > > > As i read the RELEASE NOTES, i see that SOFTUPDATES will be activated by > > > default under install. but it also says that it will not enable > > > SOFTUPDATES on the root ( / ) fs . why? is that bad? > > > > Because with SoftUpdates read/write operations often delay, sometimes > > up to 30 seconds before it's done. Then, if a machine crash occurs it > > may lead to a larger loss of data. That can cause unrecoverable damage > > to your system. > > As long as you turn off write caching, this isn't true (if it were > true, then softupdates would be a disaster for *all* filesystems, > not just root). That is, things may be delayed but they are in a > consistent state at all times, and never corrupt. At worst, the > last files you deleted will "undelete" themselves and the last files > you created may not be there, but no file-system corruption will > occur. Brian, This message makes it quite clear that you don't really understand softupdates or it risks and benefits. It IS true that softupdates can greatly delay the time it takes for freed blocks to be marked as free. This is a function of softupdates and is not relatd to disk cache use. That is the primary reason it is not the default for root. An installworld will likely overflow the available space on 50 MB root (the long time default size) because new files ate disk space, but deleted files space was not freed up for some time. The installworld would fail because the device showed up as full. > Now it IS a bad idea (even though many people do it without happening to get > burned) to run with write caching *and* softupdates both on. In general, > it's a bad isea to run with write caching, period, but combining it with > softupdates makes things a lot worse, but softupdates without write caching > is safer than the other way 'round. Of course, turning both off is safest > and slowest, so pick your poison. I use softupdates on ALL file systems and > turn off write caching myself. > > (To turn off write-caching, put this in /boot/loader.conf: > > # write cache considered dangerous > hw.ata.wc=0 > ) > > The reason for the general advice to turn it off on / is because it does > introduce a delay and / is traditionally rather small. The delay effectively > gives you less space in a file system since freed space may not be freed yet, > but if you make / larger than usual and turn on softupdates you'll get the > speed benefit of softupdates and yet won't risk running out of disk space. > > (It seems an especial shame to turn off softupdates on whatever file system > contains /tmp since the benefits are larger on a file system with lots of > writes.) > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message