From owner-freebsd-fs Tue Feb 10 00:29:44 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA09039 for freebsd-fs-outgoing; Tue, 10 Feb 1998 00:29:44 -0800 (PST) (envelope-from owner-freebsd-fs@FreeBSD.ORG) Received: from smtp02.primenet.com (smtp02.primenet.com [206.165.6.132]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA09030 for ; Tue, 10 Feb 1998 00:29:42 -0800 (PST) (envelope-from tlambert@usr05.primenet.com) Received: (from daemon@localhost) by smtp02.primenet.com (8.8.8/8.8.8) id BAA24768; Tue, 10 Feb 1998 01:29:38 -0700 (MST) Received: from usr05.primenet.com(206.165.6.205) via SMTP by smtp02.primenet.com, id smtpd024761; Tue Feb 10 01:29:32 1998 Received: (from tlambert@localhost) by usr05.primenet.com (8.8.5/8.8.5) id BAA21865; Tue, 10 Feb 1998 01:29:23 -0700 (MST) From: Terry Lambert Message-Id: <199802100829.BAA21865@usr05.primenet.com> Subject: Re: Soft update usage To: roark_hilomen_at_meridian@meridian-data.com Date: Tue, 10 Feb 1998 08:29:23 +0000 (GMT) Cc: freebsd-fs@FreeBSD.ORG In-Reply-To: <9802098870.AA887071056@meridian-data.com> from "roark_hilomen_at_meridian@meridian-data.com" at Feb 9, 98 04:43:15 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > Does anyone know if "Soft Updates" has been in use in the industry > or is OpenBSD and now FreeBSD the first to implement it? BSDI has them. The original Ganger/Patt work was done in SVR4 (if you are familiar with SVR4 internals, this is obvious from looking at the published Appendix A code). > How extensively has it been tested (outside the current FreeBSD flurry)? Kirk would be a better person to answer that. > And for that matter, is anyone testing it on a large multi-client system? I don't know; they should. > Has anyone tried crashing it and seeing if FSCK works well and as advertised > with Soft Updates? That's Kirk's testbed. He uses a SCSI drive and two machines; he halts the one from the other, randomly, and fsck's (among other tests). He claims many, many months of reliable operation. > I'm trying to see how cutting edge this technology is. It's "medium". It's a good leap past current implementations, but the paper was published several years ago, and it does not support general updates between layered FS's. Effectively, Ganger and Patt did this: 1) Determine all operations that could be done on SVR4 UFS 2) Determine the events that would result from these operations, as small DAG fragments (directed acylic graphs). 3) Invent a structure called a "dependency" that defined relationships between these DAG's. 4) Invent a mechanism for ensuring ordering of operations in dependency order (this mechanism is superior to DOW -- delayed ordered writes -- a USL patent-pending technology, because there is, in effect, write gathering and meta-data ordering without flush -- unlike DOW). 5) Hard-code (rather than parametrically code) these dependency queueing events. This is the step that degeneralizes the Ganger/Patt code, and makes it a lot of work to port -- at a 3-5% performance increase (negligible in comparison to the win of soft updates themselves over using sync writes to guarantee ordering of operations). The DOW mechanism is basically the classic "banker's algorithm", which determines potential cycles in a graph and denies operations based on the possibility of cycles. The soft updates mechanism (effectively) precomputes transitive closure over the graph, so any insertion that would result in a cycle is seen as depending on prior insertions. The difference in these mechisms can be best characterized by: DOW: Prevent operations which are dangerous. Also, using back-tracking via Howard's algortihm, prevent operations which *may* be dangerous, even if it ends up that they *aren't* dangerous. SU: Prevent only operations which are dangerous. I *seriously* recommend the following books: Algorithms in C++ Robert Sedgewick Addison-Wesley Publishing Company ISBN 0-201-51059-6 The Art Of computer Programming _Volume 1: Fundamental Algorithms_ Donald Knuth Addison-Wesley Publishing Company ISBN 0-201-03809-9 UNIX Systems for Modern Architectures _Symmetric Multiprocessing and Caching for Kernel Programmers_ Curt Schimmel Addison-Wesley Publishing Company ISBN 0-201-63338-8 For more information on graphical algorithms. Don't be put off by the Sedgewick book; it is very light on the code and heavy on the graph theory (chapters 29 through 34 -- I recommend chapters 24 through 28, on geomentric algorithms, as well). For example, if you were to implement a lock manager using graphical representations and cycle detection, you could probably expect to do about 20,000 transactions a second (this is the measured rate through the NetWare for UNIX lock manager, which used an intention mode lock manager based on graphical algorithms). Of course, you may not want to use this in an SMP kernel, since it's only two orders of magnitude faster than Tuxedo, which used the same algorithm as the BSD lockmgr code. If you used a graphical soloution to locking in an SMP kernel, you'd have to put up with your kernel being faster, more highly concurrent, and unfortunately scalable to a larger number of processors than SVR4 or Solaris could every hope to support. Then where would you be? Oh. Yeah. You'd be at the cutting edge. Couldn't have that... Heh. 8-). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message