From owner-freebsd-current Mon Apr 9 17:39:49 2001 Delivered-To: freebsd-current@freebsd.org Received: from Awfulhak.org (awfulhak.demon.co.uk [194.222.196.252]) by hub.freebsd.org (Postfix) with ESMTP id 26C1B37B422 for ; Mon, 9 Apr 2001 17:39:38 -0700 (PDT) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [172.16.0.12]) by Awfulhak.org (8.11.3/8.11.3) with ESMTP id f3A0dWU38166; Tue, 10 Apr 2001 01:39:32 +0100 (BST) (envelope-from brian@lan.Awfulhak.org) Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.11.3/8.11.3) with ESMTP id f3A0dBP09449; Tue, 10 Apr 2001 01:39:11 +0100 (BST) (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <200104100039.f3A0dBP09449@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.3.1 01/18/2001 with nmh-1.0.4 To: Jason DiCioccio Cc: "'current@freebsd.org'" , brian@Awfulhak.org Subject: Re: FW: Filesystem gets a huge performance boost In-Reply-To: Message from Jason DiCioccio of "Mon, 09 Apr 2001 14:05:43 PDT." <657B20E93E93D4118F9700D0B73CE3EA0166D772@goofy.epylon.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 10 Apr 2001 01:39:11 +0100 From: Brian Somers Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Another important change is that it is no longer necessary to run > tunefs in single user mode to activate soft updates. All that is > needed is to add the "softdep" mount option to the partitions you > want soft updates enabled on in /etc/fstab." [.....] > I especially like not having to run tunefs :-) [.....] Having the softdep option in fstab(5) doesn't gel well with the recent background-fsck work being introduced by Kirk - although it works from what I can tell. In both OpenBSD and NetBSD, a filesystem mounted with the ``softdep'' option will update the super-block flags with the FS_DOSOFTDEP bit, so it's easy for fsck(8) to tell how an unclean filesystem was last mounted. In fact, OpenBSD has ``if 0''d code that allows unclean filesystem mounts if they have that FS_DOSOFTDEP bit set (NetBSD doesn't seem to have this). The problem I think is where a ``mount -u'' is done to downgrade a filesystem from soft-udpates to no soft-updates. Both OpenBSD and NetBSD have comments to the effect /* * Flush soft dependencies if disabling it via an update * mount. This may leave some items to be processed, * so don't do this yet XXX. */ and both ignore the problem (leaving soft-updates set). I don't think there's a satisfactory way of doing this - in much the same way as downgrading a read-write filesystem to read-only doesn't quite work. If certain operations are in effect (like a background fsck in the first instance or a reference is held to a file with a zero link count in the second), all hell can break loose. Having said all that, I quite like the softdep option in OpenBSD & NetBSD, despite it only being a half-option :-) > The second improvement, contributed by > gluk@openbsd.org, is a new directory allocation policy (codenamed > "dirpref"). Coupled with soft updates, the new dirpref code offers up > to a 60x speed increase in gluk's tests, documented here:" > > http://groups.google.com/groups?q=dirpref&num=100&hl=en&lr=&safe=off&rnum=2&seld=905073910&ic=1 I do like the dirpref stuff, but I can't comment much on it except that it looks like a good change that should be fairly easy to bring into FreeBSD. I'm not 100% convinced about the algorithm to avoid clusters filling up with directory-only entries (it looks like a worst-case would fill a cluster with 50% directories and 50% files leaving a bad layout when the directories are populated further), but then the non-dirpref scheme has some far worse worst-case scenarios ;-) -- Brian Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message