Subject: Re: Interactive responsiveness under heavy I/O load
To: Daniel Carosone <dan@geek.com.au>
From: Johnny Billquist <bqt@update.uu.se>
List: netbsd-users
Date: 01/26/2004 23:43:18
On Tue, 27 Jan 2004, Daniel Carosone wrote:

> On Mon, Jan 26, 2004 at 02:12:24PM -0600, Johan A. van Zanten wrote:
> >
> > John Goerzen <jgoerzen@complete.org> wrote:
> >
> > > Have I stumbled across the reason softdep is not enabled by default, or
> > > is there some other logic behind this?
> >
> > My understanding of how soft dependencies works is that file system
> > metadata is cached in memory for a short period of time (like 20
> > seconds?), which means it's at risk (of being lost) if the machine
> > were to loose power.
>
> Two points:
>
>  - The question of "on by default" is shady; softdeps aren't enabled
>    unless you specify the mount option, but I understand sysinst now
>    creates fstab's with that option by default.  So most users would
>    have them enabled on new systems at least. I may be wrong about
>    sysinst, its not something I really ever use.
>
>  - You are right about the metadata being delayed, but it's still
>    written in-order and before the relevant file data. The essential
>    point of softdep is to allow the ordering up updates to the on-disk
>    data structures to be preserved, so the ffs and fsck semantics that
>    depend on these still work, but without requiring synchronous
>    writes that make everything stop and wait. If you sync or fsync at
>    the right time, the previous semantics about data on disk or not
>    still hold.
>
>    Speaking very broadly, if your system crashes, the resulting
>    filesystem state with softdep is similar to if the machine had
>    crashed a little earlier without (unless you sync).
>
>    Softdep is such a huge performance win, especially for tasks like
>    extracting a pkgsrc tree, because lots of metadata writes update
>    the same disk block repetitively (think about adding files one at a
>    time to the same directory). With softdep, each of these updates is
>    done in memory (without the sync disk wait) and the resulting final
>    directory blocks written to disk (again, speaking very broadly).

softdep:s really sounds nice, but last I tried it (a few months ago) it
still crashed my VAX very predictably, so I'd guess it still isn't good
enough to turn on for people in general.

	Johnny

Johnny Billquist                  || "I'm on a bus
                                  ||  on a psychedelic trip
email: bqt@update.uu.se           ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol